Skip to content

Instantly share code, notes, and snippets.

@professormahi
Created July 15, 2016 04:50
Show Gist options
  • Save professormahi/971469b0384ace969ec057e66a1d7b2c to your computer and use it in GitHub Desktop.
Save professormahi/971469b0384ace969ec057e66a1d7b2c to your computer and use it in GitHub Desktop.
# In the server
sysctl net.ipv4.ip_forward=1 # enable ip forwarding
iptables -t nat -A POSTROUTING -o <output> -j MASQUERADE # accept ip forwarding
# In the client
ip r add default via <ip> dev <dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment