Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Enabling IP forwarding and NAT from console for Mac OS X (Mavericks)
$ sudo sysctl -w net.inet.ip.forwarding=1
$ sudo natd -interface en1
$ sudo ipfw add divert natd ip from any to any via en1

You mention Mavericks, but use ipfw, which has been deprecated for a while now, and replaced with pf since OSX 10.9. Did you test this on 10.9?

Agreed. As above I don't have ipfw, but also don't have natd available by default. Are there additional steps required?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment