Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Adding static routing after SSL VPN connection

Hi all,

I have a little prob 🙂

From time to time i need to connect to my workplace. I'm doing it by running SSL VPN client (FortiNet).

There is a small glitch. When I already connect to my company network - I got IP - and the tunnel is running. But the VPN tunnel traffic route isn't correct at all.. So finally I cannot ping my company's gateway. I wrote a shell script which "manually" set up proper trace for packets.. It looks like this:

cat VPNTUNNEL.command

sudo route add -net 10.1.0.0/16 10.9.9.30

Script adds static route - and the problem is solved.

My question is: how can I make Snow Leopard run mentioned script automatically - every time when system detect that tunnel is running (the ppp1 network interface is up)?

--
Cheers
macosxgeek

Maybe I need to add that on Ubuntu - I just copy shell script to /etc/ppp.d/ directory - and it works.. 🙂

Message was edited by: macosxgeek

Mac Pro, Mac OS X (10.6.6), It's quite neat... ;-)

Posted on Jan 27, 2011 9:51 AM

Reply
3 replies

Jan 27, 2011 10:33 PM in response to macosxgeek

I think that it;s aggod idea to search for solutions in:

https://supportforums.cisco.com/community/netpro/ask-the-expert?view=all

I don't know if you can find something...in a very interesting session that starts at January 31, 2011,concerning "Connect your iPhone/iPad via IPsec and SSLVPN".
The session describes mobile connections via SSL VPN...so i don't know if you can find something about static routes...At least you can take some ideas.Also you can search there for a solution...

Good luck....

Aug 3, 2011 3:12 PM in response to macosxgeek

I found a solution here that works for me: http://www.jms1.net/osx-vpn-routing.shtml


in short: create a file called /etc/ppp/ip-up and make it executable

This file is executed every time a vpn tunnel is activated.


/etc/ppp/ip-up:

#!/bin/sh # VPN_GATEWAY is the remote address of the vpn tunnel # when ppp executes this script it will pass several values to it # $5 will hold the remote gateway VPN_GATEWAY=10.10.0.100 if [ "${5:-}" = "${VPN_GATEWAY}" ] then /sbin/route add 10.20.0.0/24 $5 fi

Adding static routing after SSL VPN connection

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.