Aug 7, 2009 Configure NAT With iptables And ufw iptables : 1. Open /etc/sysctl.conf and uncomment net.ipv4.ip_forward=1. 2. Use iptables command as below : # iptables -t nat -I POSTROUTING -s source network -o output Ethernet -j SNAT --to gateway IP address Ex. # iptables -t nat -I POSTROUTING -s 192.168.0.0/24 -o eth0 -j SNAT --to 192.168.1.1 3. Save your configuration and export to a file : a. i