NAT and FORWARD with Ubuntu’s ufw firewall · GitHub
https://gist.github.com/kimus/931514029.08.2014 · Uncomment for ipv6 if you want. The final step is to add NAT to ufw’s configuration. Add the following to /etc/ufw/before.rules just before the filter rules. # NAT table rules *nat :POSTROUTING ACCEPT [0:0] # Forward traffic through eth0 - Change to match you out-interface -A POSTROUTING -s 192.168.1.0/24 -o eth0 -j MASQUERADE # don't delete ...