Skip to content

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
Copy link

joostrijneveld commented Feb 7, 2015

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?

Copy link

ianleeder commented May 18, 2015

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