Forcing a particular IP address out to an interface
nick4soup_at_yahoo.com.au
Date: 10/12/05
- Next message: johnny: "Re: best practices to secure home's network"
- Previous message: Moe Trin: "Re: Do "network overruns" indicate a prooblem?"
- Next in thread: Floyd L. Davidson: "Re: Forcing a particular IP address out to an interface"
- Reply: Floyd L. Davidson: "Re: Forcing a particular IP address out to an interface"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 11 Oct 2005 17:33:46 -0700
Hi,
I have two machines, both running 2.6.{8,9} kernels
+-----left------+ +-----right-----+
| | | |
| 192.168.1.23 +-ppp0---+ 192.168.1.10 |
| 192.168.1.49 | | |
| 192.168.1.75 | | iptables masq |
| . . . . . . . | | to/from ppp0 |
| | | |
| 192.168.0.23 +-eth0---+ 192.168.0.10 |
| | | |
+---------------+ +---------------+
The 192.168.1.xxx are bound to the ppp0 connection (xxx.23 by the usual
pppd option, the 49/75 by using "ifconfig ppp0:0 ...49" and "ifconfig
ppp0:1 ...75"
What I want (for testing purposes) is when I
nick@left $ ping 192.168.1.49
I want the ping packets to travel to eth0, to 'right', and 'right' will
forward over ppp0 back to 'left'. Similar for ...23 and ...75
However the result is I get very short ping times, making me suspect
that it stayed entirely within the machine.
nick@left $ telnet 192.168.1.49 80 ## I have a web server
and
nick@left $ netstat -a -n | grep -w 80
gives
source = 192.168.1.49:<random_port>
destin = 192.168.1.49:80
What I like to see
source = 192.168.1.10:<random_port> (ie masq'd from 'right')
destin = 192.168.1.49:80
====================
Question:
====================
How do I force the packets for 192.168.1.xxx out over eth0?
What I tried so far:
root@left $ route add -host 192.168.1.49 gw 192.168.0.10
seems to have no effect
nick@left $ route -n
gives a default route to 192.168.0.10 (as intended)
nick@right $ route -n
gives a default route to 192.168.1.23 (as intended, via ppp)
====================
Notes:
====================
1. If I had 3 machines, I'd use them!
(left)--eth0--(right)--ppp0--(extra)
2. It seems I could use vmware, or I can use iptables/DNAT, but are
there any easier approaches?
Nick Bishop
-----
email replies ignored
-----
Proposed additions to the PDP11 instruction set:
GWN Generate Whining Noise
FDP Fill Desk with Paper
TT Tangle Threads
-oOo-
- Next message: johnny: "Re: best practices to secure home's network"
- Previous message: Moe Trin: "Re: Do "network overruns" indicate a prooblem?"
- Next in thread: Floyd L. Davidson: "Re: Forcing a particular IP address out to an interface"
- Reply: Floyd L. Davidson: "Re: Forcing a particular IP address out to an interface"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|