Triggering stuff after connecting to a network
June 24, 2007 5:51 AM   Subscribe

OS X: Automatically trigger actions after connecting to a network.

I often change networks during the day, and always connect to my office network through a VPN. I want to automate the process to do something like this:

1) After connecting to an arbitrary network, connect to my VPN
2) Mount a share on the VPN
3) When going to sleep mode, unmount share and disconnect from VPN

I have so far only found pearPort. It's a step in the right direction, but it does only work for WLAN, not for Bluetooth (cellphone modem) nor Ethernet. It also only connects to a VPN, and can't trigger other actions.

The ideal solution would be something that simply listens to new connections, and can be configured to then call arbitrary apps/applescripts, as that would be the most flexible solution.

Does something like this exist?
posted by uncle harold to Computers & Internet (5 answers total) 2 users marked this as a favorite
If ssh is acceptable as an alternative or if your vpn connects quickly enough, MacFusion can connect on wake and disconnect on sleep.
posted by stereo at 5:56 AM on June 24, 2007

Best answer: I can't vouch for them, but I saw this article on Lifehacker that specifically mentioned two or three different pieces of software that might do what you want.
posted by procrastination at 6:50 AM on June 24, 2007

Best answer: Seconding what procrastination said. I use Homezone myself. You can set your computer to do certain actions based upon the network address, bluetooth device, or Airport Network you are set up to. I use it for bluetooth though, which is neat: set it up to respond to your phone and password protect the computer and your computer is secured whenever you leave your desk. Hopefully that does what you are looking for
posted by TheFuse at 7:36 AM on June 24, 2007

I actually use Marco Polo to do a similar thing with my Macbook Pro (I switched to it after using LocationX for a long time. Marco Polo seems to work better, and easier...and it's also free).

Unfortunately, it doesn't directly support VPN connections out of the box, although the developer is working on it. It does allow you to run arbitrary scripts and apps, based on network detection, though.

I created an Automator workflow that I saved as a .app (I previously used an Applescript, which also worked well) that automatically mounts my Windows SMB shares on my Macbook Pro whenever Marco Polo detects that my home wireless network is in range. It's awesome.
posted by melorama at 8:11 AM on June 24, 2007

Response by poster: Thanks! Homezone seems to be the way to go - Marco Polo seems to require mor configuration (setting up locations).
posted by uncle harold at 10:06 AM on June 24, 2007

« Older Free/cheap VJ software with FLV support and sound...   |   Low cost MRI????? Newer »
This thread is closed to new comments.