Hi DasFox,
Ticking the "Send all traffic over VPN connection" will ensure all of your network traffic goes over the VPN connection while you are connected.
As for killing your network connection if the VPN connection drops (to ensure you don't leak any network traffic), there are a number of approaches:
1. Using Viscosity's Disconnected Script FeatureViscosity will run the Disconnected script whenever the VPN connection enters the disconnected state (a drop out or manual disconnect occurs). You can write a script that disables your network connection and specify it as a Disconnected script. For information on how to do this see:
http://www.thesparklabs.com/support/run ... when_conn/As an example, if you use wireless to connect to the network, you're AppleScript code may look something like:
- Code: Select all
do shell script "networksetup -setairportpower en1 off"
2. Using OpenVPN Down ScriptsYou could also use OpenVPN's scripting support to disable the network in a similar fashion to that above. If you go down this road I'd recommend using the latest beta 1.3 version of Viscosity, as version 1.2.3 and earlier will overwrite your down script if you have DNS support turned on for your connection. See the --up and --down entries on
OpenVPN's Manual Page for further information.
3. Using The Routing TableYou can override Mac OS X's default route so when the VPN connection disconnects it tears down the default route, leaving you with no network connectivity. To regain network access you'll need to disable and reenable your network connection. You can specify a default route like so:
1. Edit your connection in Viscosity
2. Click on the Networking tab
3. Click the small "+" button to add a new route. Enter "0.0.0.0" as the Route/IP, "0.0.0.0" as the mask, "vpn_gateway" as the Gateway, and leave the Metric field blank. Click Add.
4. Click Save and test what happens when a dropout occurs.
Cheers,
James