Configuring |
NAT
NAT (Network Address Translation) protocol translates IP addresses used on one network into different IP addresses used on another network. One network is designated the inside network and the other is the outside network. Typically, the
NOTE Click the following link for more information about iptables and NAT:
NAT Example
The IP addresses of all packets leaving LAN1 are changed to 192.168.3.127 (you will need to load the module ipt_MASQUERADE):
1.#echo 1 > /proc/sys/net/ipv4/ip_forward
2.#iptables
or
3.#iptables
Enabling NAT at Bootup
In most real world situations, you should use a simple shell script to enable NAT when the
1.setting iptables
2.
3.vi /etc/rc
4. | Append | echo 1 > /proc/sys/net/ipv4/ip_forward |
5. | Append |