NAT Using iptables
So far, we discussed general NAT principles, NAT types, and what every sort of NAT does.
netfilter/iptables can be used to perform NAT in any of the ways that we discussed. Actually, there are many things that you can do with iptables in this area and we will try to cover as much as possible in this chapter. Before we get there, let's see what we need to be able to successfully perform NAT on Linux.
Setting Up the Kernel
Usually, every Linux distribution comes with a kernel compiled with netfilter support, iptables tool, and all the modules needed for performing Network Address Translation.
A very good HowTo on compiling Linux 2.4 and 2.6 kernels is written by Kwan Lowe and can be found at http://www.digitalhermit.com/linux/ ...