My Old LibTech Blog (2013-2016)

UVic VPN in Ubuntu

Author: John Durno
Date: 2013-12-17

****
Update January 5 2015: This article is out of date. Openconnect now appears to work without the VPNC script, so sudo openconnect https://vpn.uvic.ca should be all you need.
****


Don't know whether it's just me, but I've never been able to get the VPN working via the network settings GUI in Ubuntu (12.04). So I use an alternate method, which I will describe here in case it helps anyone else.

First, I install vpnc:
sudo apt-get install vpnc

Next, I install openconnect:
sudo apt-get install openconnect

[The only reason to install vpnc is to get the vpnc-script so you probably don't actually need to install vpnc if you grab a copy of the script from the openconnect site]

Finally, I create a text file called uvicvpn.sh that looks like this:

sudo bash <<EOF
openconnect --script /etc/vpnc/vpnc-script https://vpn.uvic.ca
EOF


I save it to my ~/bin directory, and make it executable (chmod +x).

Running the command in the terminal prompts me to enter my local password, my group ("Default"), my netlink ID, and my netlink password (in that order).

This successfully activates VPN. The error message "DTLS handshake failed: 2" appears repeatedly, but it's not really a problem.

Regrettably, UVic Systems doesn't support VPN for linux, so I can't make any promises this will work for everyone or that it will continue to work into the future. But for now it works for me.

Of course, the ability to connect to VPN isn't all that helpful if you can't connect to the network. I've found Martin Holmes' wireless connection info invaluable in that regard.

If anyone has any suggestions for ways to make this work better, please post them in the comments ...