Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I found some commands (below) for automatically forwarding the VPN on my mac to my ethernet adaptor. This works just fine, however, sometimes when the gateway changes on the VPN connection, I need to manually set it on my ethernet connection (via system preferences). Does anyone know how I would modify/add to these commands to do that?


natd -same_ports -use_sockets -unregistered_only -dynamic -interface ppp0 -clamp_mss
ipfw -f flush
ipfw add divert natd ip from any to any via ppp0
ipfw add pass all from any to any
sysctl -w net.inet.ip.forwarding=1
share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.