9.5. More About Network Address Translation
The netfilter
software is capable of many different types of NAT. IP masquerade is
one simple application of it.
It
is possible, for example, to build NAT rules that translate only
certain addresses or ranges of addresses and leave all others
untouched, or to translate addresses into pools of addresses rather
than just a single address, as masquerade does. You can in fact use
the iptables command to generate NAT rules that
map just about anything, with combinations of matches using any of
the standard attributes, such as source address, destination address,
protocol type, port number, etc.
Translating the source address of a
packet is referred to as Source NAT, or SNAT, in
iptables. Translating the destination address of
a packet is known as Destination NAT, or DNAT.
SNAT and DNAT are targets that
you may use with the iptables command to build
more sophisticated rules.