Nov 142011
 

OpenConnect is an excellent replacement for Cisco’s AnyConnect VPN client. After a lot of frustration trying to get AnyConnect to work on SliTaz, I finally jumped ship and got OpenConnect working with SliTaz Cooking in no time.

First, open a terminal, switch to root, download OpenConnect from the Debian repository and install it:

wget http://ftp.debian.org/debian/pool/main/o/openconnect/openconnect_3.02-2_i386.deb
tazpkg convert ./openconnect_3.02-2_i386.deb
tazpkg install ./openconnect-3.02-2.tazpkg

OpenConnect requires VPNC which is found in the SliTaz repository:

tazpkg get-install vpnc

This VPNC script works right out of the box:

wget http://git.infradead.org/users/dwmw2/vpnc-scripts.git/blob_plain/HEAD:/vpnc-script
mv ./vpnc-script /etc/vpnc/vpnc-script

Now that OpenConnect and VPNC is installed, you can create a script to connect to your VPN. I named it vpnconnect. My script resembles the following. You may find that you need to add or remove some of the options I’ve shown here. Read the documentation for OpenConnect’s option list. Change the stuff in caps to fit your needs.

#!/bin/sh
openconnect REMOTE.HOST.COM \
--no-dtls \
--auth-group=GROUP_NAME \
-u USERNAME \
--no-cert-check \
-s /etc/vpnc/vpnc-script \
-b

Now run the script, still as root:

./vpnconnect

At this point, you’ll be prompted for your password on the remote system. Once the VPN connection is established it will background itself (the -b option in the script above).

All done!

One note: I originally tried doing all of this on SliTaz 3.0. OpenConnect complained that libssl.so.1.0.0 and libcrypto.so.1.0.0 were not found. I created symlinks to libssl.so.0.9.8 and lib.so.0.9.8 and OpenConnect carried on happily but this isn’t a recommended solution.