Skip to content

Instantly share code, notes, and snippets.

@DecentM
Created August 23, 2017 19:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DecentM/0a28cb6de3b8bf023899267a141f1fe7 to your computer and use it in GitHub Desktop.
Save DecentM/0a28cb6de3b8bf023899267a141f1fe7 to your computer and use it in GitHub Desktop.
Forward 10.20.0.0/16 from my VPN to LAN
iptables -I FORWARD -i tun0 -o enxb827ebf29db7 -s 10.8.0.0/24 -d 10.20.0.0/16 -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