Private Networking
and the IP Network Address Translator (NAT) |
Prof. David Bernstein
|
Computer Science Department |
bernstdh@jmu.edu |
iptables
on the gateway
iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -j SNAT -to 1.2.3.4
iptables -t nat -A PREROUTING -p tcp -d 1.2.3.4 -dport 23 -j DNAT -to 192.168.1.3:23