iptables
-t nat -A PREROUTING -p TCP -i eth2 -d 10.0.1.172 --dport 80 -j DNAT --to-destination
10.0.0.169
The command specifies for any incoming packets at eth2 with destination
IP=10.0.1.172 and TCP port 80 will be applied (j option for jump) with
DNAT service and its destination IP address will be substituted with 10.0.0.169
and routed to lamb.
# The nat table can be displayed with the following command:
root@b2b:~#
iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DNAT tcp -- anywhere 10.0.1.172 tcp dpt:http to:10.0.0.169
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination