Re: Forcing a particular IP address out to an interface
nick4soup_at_yahoo.com.au
Date: 10/13/05
- Previous message: Fred: "Re: Do "network overruns" indicate a prooblem?"
- In reply to: Floyd L. Davidson: "Re: Forcing a particular IP address out to an interface"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 12 Oct 2005 15:44:08 -0700
Floyd L. Davidson wrote:
> It never gets anywhere near the route table though. If the IP
> address is assigned to an interface on the host, it goes to the
> lo device regardless of what is in the route table.
As they would say in New Zealand, BUGGER.
Next approach: pretend that the ppp0 interface on the 'left' box has IP
addresses:
192.168.3.xx, and use iptables to mangle the destination address of
the packet somewhere along its route.
1. Therefore on left, I ping 192.168.3.23.
2. It will route out to 'right', via eth0
3. when right receives the packet, it will forward to the ppp0
connection, courtesy of its default route (we also have masquerading
here, changes source addr to 192.168.1.10)
4. in 'left', I will have to use iptables to mangle the incoming
packet to alter the destination address to 192.168.1.23
It requires I use something like (please excuse syntax):
iptables -t nat -A PREROUTING -i ppp+ --dst 192.168.3.23 -j DNAT
--todestination-addr 192.168.1.23
I already tried mangling the outgoing packet on left using
iptables -t nat -A OUTPUT --dst 192.168.3.23 -j DNAT
--todestination-addr 192.168.1.23
but I ran into the same razor.
Nick Bishop, email replies ignored.
-----
Position vacant: suicide bomber.
Previous experience essential.
-oOo-
- Previous message: Fred: "Re: Do "network overruns" indicate a prooblem?"
- In reply to: Floyd L. Davidson: "Re: Forcing a particular IP address out to an interface"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|