On Wed, Apr 17, 2002 at 08:03:43PM -0400, mok2 wrote: > my box has four ips on eth0 > eth0 192.168.0.1 > eth0:0 192.168.0.2 > eth0:1 192.168.0.3 > eth0:1 192.168.0.4
Is that really eth0:0, and then 0:1 twice, or is the last one "eth0:2"? > i want to force all outgoing packets to change ther src add from .1 to .4 > > for some reason this doesnt work > iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to 192.168.0.4 > > any ideas I don't have a network handy that I can play on, but presuming that the fourth IP should have been eth0:2 192.168.0.4 then try route add default dev eth0:2 which *may* do what you want, depending on your local setup... do check with tcpdump though. -- FunkyJesus System Administration Team
