Source and Destination Network Address Translation (SNAT / DNAT) with iptables

A colleague of mine approached me with a need to do some IP address translation.

He had a machine (A) with an IP of 10.10.10.99 and he wanted any connections coming to this machine to get rerouted to another machine (B) with an IP address of 192.168.1.101.

Machine A was a linux system and was the default gateway for machine B (*). This was a perfect fit for a  SNAT/DNAT using iptables.

Read more of this post

Advertisements