Tuesday, August 7, 2012

OSX VPN Add route on connection

On OSX, you can automatically add a route when the VPN is connected:

In the terminal:

sudo nano /etc/ppp/ip-up
Add the lines:

/sbin/route add -interface $1

 is the subnet you want to route to. The $1 will automatically be populated with the correct interface name.

Add as many routes as required.

Save and exit

sudo chmod a+x /etc/ppp/ip-up

Connect to your VPN, and you route should be created.

No comments:

Post a Comment