Skip to content

Instantly share code, notes, and snippets.

@rudylacrete
Created August 31, 2015 09:40
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 rudylacrete/748cc8b8044c70098dc2 to your computer and use it in GitHub Desktop.
Save rudylacrete/748cc8b8044c70098dc2 to your computer and use it in GitHub Desktop.
mac masquerading
#!/bin/sh
interface=utun0
/usr/sbin/natd -interface $interface
/sbin/ipfw -f flush
/sbin/ipfw add divert natd all from any to any via $interface
/sbin/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