All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martijn Lievaart <m@rtij.nl>
To: MKS <rekordmeister@gmail.com>
Cc: netfilter@lists.netfilter.org
Subject: Re: packets to local addresses
Date: Fri, 06 Apr 2007 18:12:07 +0200	[thread overview]
Message-ID: <46167157.3080409@rtij.nl> (raw)
In-Reply-To: <fad2fb270704060522r4322a223g4e2e40605b3fb6a@mail.gmail.com>

MKS wrote:
> Hello list
>
> I have a scenario the a computer has 2 PPP connections, where the
> computer is the ppp client.
>
> $ifconfig
>
> ppp0   inet  10.0.0.1 p-t-p  192.168.1.1 mask 255.255.255.255
>
> ppp1 inet  10.0.1.1 p-t-p 192.168.1.1 mask  255.255.255.255
>
> for testing purpuses I want packets from ppp0 to ppp1 to actually go
> over the physical connection
>
> e.g.
>
> ping  10.0.0.1 -I ppp1 should send the packet over the ppp1 (and out
> underlyging physical interface eth0) and it should arrive on the ppp0
> interface. (routing is taken care of at the ppp server)

The -I flag only changes the source address of the packets, not the 
routing. And as the packet is destined for the machine itself, it goes 
over the loopback interface. Maybe adding the -r flag does what you 
want, but I doubt it.

Hping2 probably can do this:

       -I --interface interface name
              By default on linux and BSD systems hping2 uses default  
routing
              interface.   In  other systems or when there is no default 
route
              hping2 uses the first non-loopback interface.  However  
you  are
              able  to  force  hping2 to use the interface you need 
using this
              option. Note: you don't need to  specify  the  whole  
name,  for
              example  -I  et will match eth0 ethernet0 myet1 et cetera. 
If no
              interfaces match hping2 will try to use lo.

HTH,
M4



  reply	other threads:[~2007-04-06 16:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-06 12:22 packets to local addresses MKS
2007-04-06 16:12 ` Martijn Lievaart [this message]
2007-04-07 14:13   ` MKS
2007-04-07 15:45     ` Martijn Lievaart
2007-04-07 18:40       ` Jan Engelhardt
2007-04-07 19:27         ` Pascal Hambourg
2007-04-07 21:39         ` Martijn Lievaart
2007-04-10 11:52           ` MKS
2007-04-10 15:21             ` Jan Engelhardt
2007-04-10 15:53               ` MKS
2007-04-10 16:20                 ` Jan Engelhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46167157.3080409@rtij.nl \
    --to=m@rtij.nl \
    --cc=netfilter@lists.netfilter.org \
    --cc=rekordmeister@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.