iptables -t nat -L |
Displays all rules in the NAT table |
iptables -t nat -D POSTROUTING 1 |
Deletes the first rule in the POSTROUTING chain of the NAT table |
iptables -t nat -F |
Deletes all entries in (flushes) the NAT table |
iptables -t nat -A POSTROUTING -j SNAT --to IPAddr1 -s IPAddr2/netmask |
Adds the following rule to the POSTROUTING chain of the NAT table: “in IP datagrams that go to the public network, the IP source address IPAddr2/netmask is changed to IPAddr1” |
Example: iptables -t nat -A POSTROUTING -j SNAT --to 128.195.7.32 -s 10.0.1.0/24 |
the source address of outgoing IP datagrams that match 10.0.1.0/24 is changed to 128.195.7.32 |