Examples of SNAT and Private LANs
Source NAT is by far the most common form of NAT. Using NAT to give outgoing Internet access to local, privately addressed hosts was the original purpose of NAT. The following sections provide some simple, real-world examples of using the nat table's MASQUERADE and SNAT targets.
Masquerading LAN Traffic to the Internet
The MASQUERADE version of source NAT is intended for people with dial-up accounts who get a different IP address assigned at each connection. It also is used by people with always on connections, but whose ISP assigns them a different IP address on a regular basis.
The simplest example is a PPP connection. These sites often use a single rule to masquerade all outgoing connections from the LAN: ...
Get Linux Firewalls, Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.