exempt some source addresses from nat??

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday 07 November 2002 12:58 am, Yogini Parkhi wrote:

> Hi All,
>
> Just curious, if I have a nat rule that snats a certain network. How do I
> exempt certain addresses from this nat rule? Do I write ACCEPT rules in the
> POSTRUTING chain for those?

Yes, that's a sensible way to do it.

Suppose you have a rule:

iptables -A POSTROUTING -t nat -s 192.168.42.0/24 -j SNAT --to 172.16.11.22

But you don't want this to apply to address 192.168.42.18 (you want that to 
pass through without being SNATted).   Simply insert this rule before the one 
above:

iptables -I POSTROUTING -t nat -s 192.168.42.18 -j ACCEPT

Antony.

-- 

What is this talk of software 'release' ?
Our software evolves and matures until it becomes capable of escape,
leaving a bloody trail of designers and quality assurance people in its wake.



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux