9

Mac command to copy gateway from VPN and apply to Ethernet

view full story
linux-howto

http://superuser.com – 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? #!/bin/sh 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 (HowTos)