IP Masquerading Mac OS X I am trying to figure out how to use this command with mac os x

iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE


The only thing I have found that seems like it might work is

ipfw add m all from me to 0.0.0.0/0


but I get: ipfw: invalid action m\n'

Does anybody know how I could translate the iptable code to mac compatible code?
If you are just trying to share your internet connection, you can do this from System Preferences > Sharing > Internet Sharing

If that's not why you posted this and you still do it manually(see Eir Nym's post). Don't forget to:

    sudo sysctl -w net.inet.ip.forwarding=1