sudo iptables -A FORWARD -i eth1 -o eth0 -s 192.168.0.0/24 -m conntrack --ctstate NEW -j ACCEPT
sudo iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
Finally we made NAT:
sudo iptables -A POSTROUTING -t nat -j MASQUERADE
Configure the gateway for routing between two interfaces by enabling IP forwarding:
sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
Edit /etc/sysctl.conf and add these lines or uncomment by removing # or ; in front of them if they are commented:
To be able to have this configuration at every start-up, you should do something like this example. Please note that this is just an example. There are many ways to configure ics to run at boot. I found this easier.