What is a good App for OSX that locks your Macbook when outside "known" wifi area

Solution 1:

You can use ControlPlane where you can set up rules based on various criteria.

ControlPlane supports multiple contexts where a context is defined as a location or activity you are performing. Using evidence sources you can create a set of rules that tell ControlPlane what context to apply to your environment. When ControlPlane enters or leaves a context a set of Actions are performed.

Solution 2:

1) Well, you can compare the current SSID against a list of all known Wi-Fi networks easily enough:

#!/bin/sh 

# This may be 'en1' on computers with a built-in Ethernet port
WIFI_PORT='en0'

SSID=$(/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | awk -F': ' '/ SSID/{print $NF}')

KNOWN=$(networksetup -listpreferredwirelessnetworks "${WIFI_PORT}" | egrep -v '^Preferred networks on' | sed 's#^   ##g')

echo "$KNOWN" | egrep -q "^${SSID}$"

EXIT="$?"

if [[ "$EXIT" != "0" ]]
then
        echo "$NAME: Unknown network!"

        exit 1
fi

# EOF

You can do whatever you want instead of exit 1 to lock the computer.

You could trigger it using SleepWatcher from http://www.bernhard-baehr.de.

The problem is: then what do you do when you are on a new friendly Wi-Fi network that you want to add to your list of known networks?

2) There’s also Sidekick which might be able to help. See http://oomphalot.com/support.html for more.