NAT with MASQUERADE only for eth2 ?
This is my Linux box with NAT (Slackware 12):
eth0: [public IP] eth1: 192.168.1.1 eth2: 172.16.1.1 iptables configuration: Code:
modprobe iptable_nat Is this possible make NAT with MASQUERADE only for eth2 ? |
Yeah, specify an input interface (-i) and/or source IP range (-s) in the iptables rule.
e.g. Code:
iptables -t nat -A POSTROUTING -i eth2 -o eth0 -j MASQUERADE Code:
iptables -t nat -A POSTROUTING -s 172.16.1.1/<netmask> -o eth0 -j MASQUERADE Code:
ip addr show dev eth2 |
All times are GMT -5. The time now is 08:27 PM. |