Moxa V2406-24I-T-XPE [37/81] Nat example

Moxa V2422-XPE [37/81] Nat example
V2406/2422/2426 Linux User’s Manual Managing Communications
3-13
ATTENTION
In Example 8, remember to issue the command # modprobe ipt_mac first to load the module ipt_mac.
NAT (Network Address Translation)
The NAT (Network Address Translation) protocol translates IP addresses used on one network into IP
addresses used on a connecting network. One network is designated the inside network and the other is the
outside network. Typically, the V2406/2422/2426-LX connects several devices on a network and maps local
inside network addresses to one or more global outside IP addresses, and un-maps the global IP addresses on
incoming packets back into local IP addresses.
ATTENTION
Click on the following link for more information about NAT:
http://www.netfilter.org/documentation/HOWTO//packet-filtering-HOWTO.html
NAT Example
The IP address of all packets leaving LAN1 are changed to 192.168.3.127 (you will need to load the module
ipt_MASQUERADE):
Enabling NAT at Bootup
In most real world situations, you will want to use a simple shell script to enable NAT when the
V2406/2422/2426-LX boots up. The following script is an example.
#!/bin/bash
# If you put this shell script in the /home/nat.sh
# Remember to chmod 744 /home/nat.sh
# Edit the rc.local file to make this shell startup automatically.
# vi /etc/rc.local
# Add a line in the end of rc.local /home/nat.sh

Содержание

Похожие устройства

Скачать