I'm trying to make NAT routing persistent on my Ubuntu 12.04 EC2 instance (for OpenVPN; currently I need to run it every time after boot):
ubuntu@vpn:~$ cat /etc/network/if-up.d/vpn-routing iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
But it's not working:
ubuntu@vpn:~$ sudo iptables -t nat -L POSTROUTING Chain POSTROUTING (policy ACCEPT) target prot opt source destination
Any ideas why? Does it matter that I have
ufw enabled? I didn't see anything interesting/relevant in syslog (though I wasn't sure what to look for). Thanks in advance.