Tuesday, May 15, 2012

iptables NAT notes

I have an IP that I need to exclude on the masquerading, after google, this is what been functional. 10.254.1.87 need to bypass NAT. Below are the entry, the rest of the 10.254.x.x should be NAT.


iptables -A POSTROUTING -t nat -s 10.254.1.87/255.255.255.255 -j ACCEPT
#
iptables -A POSTROUTING -t nat -s 10.254.0.0/255.255.0.0 -d 192.168.0.0/255.255.0.0 -o eth0 -j MASQUERADE




Well, just copied the information from this link. Thanks!