Skip to content

Instantly share code, notes, and snippets.

@guerrerocarlos
Created May 14, 2013 15:13
Show Gist options
  • Save guerrerocarlos/5576721 to your computer and use it in GitHub Desktop.
Save guerrerocarlos/5576721 to your computer and use it in GitHub Desktop.
To enable a computer to act as a wifi gateway in MacOSX
#!/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