vpnmon - A VPN connection monitor for Ubuntu

Post date: 15-Dec-2012 03:39:49

The Problem

Most of us using a VPN connection to our workplace have had the secure connection occasionally drop. When that occurs and we don't notice, all of the connections applications make to our office go unsecured and become prone to malicious snooping. More often than not we cannot afford that, which is why we never leave a computer connected via VPN unattended or we employ other inconvenient schemes to avoid information leakage.

vpnmon

What we have here is a simple open source tool for Ubuntu that monitors the state of your VPN connection. Whenever your connections drops, vpnmon will either immediately disable your entire networking, or it will execute a custom command in case you provided one. The tool will also display a notification whenever it takes an action.

Dependencies

vpnmon should work fine on any Linux distribution that satisfies its dependencies. In general it needs python, gobject, dbus, NetworkManager and pynotify. There isn't any sort of dependency checking mechanism at this time, so running Ubuntu is considered a requirement. This requirement makes sure all dependencies are satisfied. Naturally, if you know what you're doing, you don't need to stick to it.

Getting The Software

Unfortunately I haven't packaged vpnmon for Ubuntu yet, but I may end up doing that in the future. For now you can follow the steps below. They were tested on Ubuntu 12.04, but should also work on most recent version as well:

  1. Change directory to a temporary location:
      1. cd /tmp
  2. Download the archive:
      1. wget -O vpnmon.tar.gz https://github.com/lightrush/vpnmon/archive/v0.1.2.tar.gz
  3. Extract it:
      1. tar zxf vpnmon.tar.gz
  4. Change directory to vpnmon:
      1. cd vpnmon-0.1.2
  5. Install vpnmon:
      1. ./install
  6. Remove temporary files:
      1. rm -rf /tmp/vpnmon*
  7. Log out, then log in.

Make sure to test it out and make sure it works before leaving your VPN connection unattended. That's about it!

Source

The source for vpnmon can be found here. Please do not hesitate to fork it, modify it or do whatever else permissible by the license. You can also email me if you encounter any issues I may be able to help with.

vpnmon notifications