linux nat

sysctl net.ipv4.ip_forward=1
edit /etc/sysctl.conf:
net.ipv4.ip_forward=1
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
eth0 — interface with access to internet