Skip to content

Instantly share code, notes, and snippets.

@lyhcode
Created January 25, 2013 17:21
Show Gist options
  • Save lyhcode/4636256 to your computer and use it in GitHub Desktop.
Save lyhcode/4636256 to your computer and use it in GitHub Desktop.
Let VPN clients access to server LAN using iptables and route
# ubuntu vpn server
sudo iptables -t nat -A POSTROUTING -s 192.168.100.0/24 -d 192.168.0.0/24 -j MASQUERADE
# mac os x client
sudo route add 192.168.0.0/24 192.168.100.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment