NetFilter
[Top] [All Lists]

Re: packets to local addresses

To: MKS <rekordmeister@gmail.com>
Subject: Re: packets to local addresses
From: Martijn Lievaart <m@rtij.nl>
Date: Fri, 06 Apr 2007 18:12:07 +0200
Cc: netfilter@lists.netfilter.org
Delivered-to: sp-com-lists@consult.net
Delivered-to: netfilter-list1@securepoint.com
In-reply-to: <fad2fb270704060522r4322a223g4e2e40605b3fb6a@mail.gmail.com>
List-archive: </pipermail/netfilter>
List-help: <mailto:netfilter-request@lists.netfilter.org?subject=help>
List-id: General discussion and user questions <netfilter.lists.netfilter.org>
List-post: <mailto:netfilter@lists.netfilter.org>
List-subscribe: <https://lists.netfilter.org/mailman/listinfo/netfilter>, <mailto:netfilter-request@lists.netfilter.org?subject=subscribe>
List-unsubscribe: <https://lists.netfilter.org/mailman/listinfo/netfilter>, <mailto:netfilter-request@lists.netfilter.org?subject=unsubscribe>
References: <fad2fb270704060522r4322a223g4e2e40605b3fb6a@mail.gmail.com>
Sender: netfilter-bounces@lists.netfilter.org
User-agent: Thunderbird 1.5.0.10 (X11/20070302)
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



<Prev in Thread] Current Thread [Next in Thread>