MacOS – Connect automatically to VPN when connecting to wifi access point

macosvpnwifi

Is it possible to automatically connect to a VPN when one is connected to a WIFI access point?

To manually connect to a VPN after connecting to a WIFI access point works, but it is so easy to forget.

I am using Mavericks on a Macbook Pro Retina.

Best Answer

ControlPlane

You want to have an automated action after you connect to a certain WiFi point. An easy way to do this, is using ControlPlane (formally known as MarcoPolo). This software makes your computer context aware and can execute scripts and programs when your location changes. Some examples that ControlPlane is aware of:

  • Current Audio Output device (headphones/internal speakers)
  • Discoverable Bluetooth devices
  • Advertised Bonjour (Zeroconf) services
  • Attached FireWire devices
  • Assigned IP addresses
  • Ambient Light level
  • Attached Monitors
  • Active Network Links
  • Power source (power adapter/battery)
  • Running Applications
  • Current Time Of Day
  • Attached USB devices
  • Visible WiFi networks

edit (21 aug 2014, thanks to @Rainer): Marcopolo is now ControlPlane. ControlPlane was created using code from version 2.5.1 of the MarcoPolo project still available at http://www.symonds.id.au/marcopolo/. ControlPlane is a direct port of MarcoPolo and in fact, much of the configuration from MarcoPolo still works with ControlPlane, just better!

ControlPlane supports 32 and 64bit Intel based Macs running Snow Leopard through Lion.