NAT

Set up IP FORWARDing and Masquerading

iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE

iptables --append FORWARD --in-interface eth1 -j ACCEPT

Enables packet forwarding by kernel

echo 1 > /proc/sys/net/ipv4/ip_forward

Apply the configuration

service iptables restart