Skip to content

Instantly share code, notes, and snippets.

@vijayanandnandam
Created May 4, 2018 03:47
Show Gist options
  • Save vijayanandnandam/1e1b2545563a46ce86da61031fb8f566 to your computer and use it in GitHub Desktop.
Save vijayanandnandam/1e1b2545563a46ce86da61031fb8f566 to your computer and use it in GitHub Desktop.
OpenVpnSetup Howto
Do all in https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-ubuntu-16-04
iptables -I FORWARD -i tun0 -o eth0 \
-s 10.8.0.0/24 -m conntrack --ctstate NEW -j ACCEPT
iptables -I FORWARD -m conntrack --ctstate RELATED,ESTABLISHED \
-j ACCEPT
iptables -t nat -I POSTROUTING -o eth0 \
-s 10.8.0.0/24 -j MASQUERADE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment