
ally after having switched on the gateway, or to write a script in the /etc/rc directory
in order to automatize the NAT execution when starting the gateway.
Irrespective of the kernel used, the /etc/network/options file must first be modi-
fied using the vi command, for example, and modifying the ip_forward=no line to
ip_forward=yes.
For the 2.2 kernels, the ipchains command is used for managing the NAT:
/sbin/ipchains –A forward –i ppp0 –s 10.0.0.0/24 –j MASQ
ppp0 is the interface connected to the Internet.
For the 2.4 and 2.6 kernels, the iptables command must be used:
/sbin/iptables –t nat –A POSTROUTING –o ppp0 –s 10.0.0.0/24 –j
MASQUERADE
ppp0 is the interface connected to the Internet.
As indicated before, the PLC network can be viewed as a level 2 infrastructure
(Ethernet) used for connecting the various IP terminals between themselves. The IP
configuration of the devices connected to this network is therefore that usually
found in all the IP networks (IP addressing, DHCP, and NAT functionalities, and so
forth).
Configuring a DHCP Client Under Linux 271
Comentarios a estos manuales