Skip to content

Instantly share code, notes, and snippets.

@John-K
Created April 1, 2016 03:15
Show Gist options
  • Save John-K/027e400af2edd28a1f7b40585ff28d57 to your computer and use it in GitHub Desktop.
Save John-K/027e400af2edd28a1f7b40585ff28d57 to your computer and use it in GitHub Desktop.
#!/bin/sh
natd -interface tun0
ipfw -f flush
ipfw add divert natd ip from any to any via tun0
ipfw add pass all from any to any
sysctl -w net.inet.ip.forwarding=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment