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

Running script after built-in Cisco IPSec VPN connected and disconnected

I need to run a script after VPN connection established and disconnected. Seems like /etc/ppp/ip-up and ip-down aren't called when Cisco IPSec is used. Is there another set of scripts that are called in this case?


Any suggestion will be greatly appreciated.

Mac OS X (10.7.2)

Posted on Oct 29, 2011 11:09 PM

Reply
Question marked as Best reply

Posted on Nov 1, 2011 12:16 AM

After looking some more into it, figured out the following:

  • /etc/ppp/ip-* aren't called because IPSec connections not managed by pppd. They are managed by racoon
  • providing script configuration parameters for phase1_up and phase1_down would be perfect option... but configuration for racoon created on the fly and I couldn't find a way to hook into it

With above options exhausted, I turned to concept laid out by Onne Gorter here: http://tech.inhelsinki.nl/locationchanger/. Script gets called when Network configuration changes, analyses whether VPN is up or down and acts accordingly. It is not exactly what I wanted since it called on every network configuration change but close enough.


Any other ideas, please share.

1 reply
Question marked as Best reply

Nov 1, 2011 12:16 AM in response to shmeltex

After looking some more into it, figured out the following:

  • /etc/ppp/ip-* aren't called because IPSec connections not managed by pppd. They are managed by racoon
  • providing script configuration parameters for phase1_up and phase1_down would be perfect option... but configuration for racoon created on the fly and I couldn't find a way to hook into it

With above options exhausted, I turned to concept laid out by Onne Gorter here: http://tech.inhelsinki.nl/locationchanger/. Script gets called when Network configuration changes, analyses whether VPN is up or down and acts accordingly. It is not exactly what I wanted since it called on every network configuration change but close enough.


Any other ideas, please share.

Running script after built-in Cisco IPSec VPN connected and disconnected

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