Re: avoid NAT for one address?
|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
On Saturday 24 July 2004 6:00 pm, Les Mikesell wrote: > So, the long story comes down to this question: is there a simple > statement I can add to force all packets to a certain destination > to skip over all the other special cases and go directly out the > right interface with no nat or other changes? I'd like to keep the > changes to a minimum since everything else works. iptables -I POSTROUTING -t nat -d a.b.c.d -j ACCEPT where a.b.c.d is the destination address for packets you don't want anything changed on. The "-I" will insert this rule at the top of the POSTROUTING chain, and "-j ACCEPT" will skip all the other rules in the chain. If you want to do this for a block of addresses, you can use a.b.c.d/x, or if you want to do it for multiple unrelated addresses, just repeat the rule for each address. Regards, Antony. -- If at first you don't succeed, destroy all the evidence that you tried. Please reply to the list; please don't CC me.