Configuring Linux as an internet gateway using iptables
Edit sysctl.conf file by doingadmin@suresh$ vi /etc/sysctl.conf
now turn on IP forwarding in sysctl.conf config file by setting the value to 1
the ip tables command for nat masquerade(masquerade mean All computers appear to have the same IP)
admin@suresh$ iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADEadmin@suresh$ iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADEcheck the iptables effect by
admin@suresh$ iptables-save
(note : iptables-save inside the file /etc/sysconfig/iptables )