This is one of those “I had to figure it out the hard way, so I hope I’ll save someone else the trouble” posts. My university requires the use of a VPN in order to access your network drive on campus. They have a link to the Cisco software, but refuse to support it. That said, apparently Cisco’s software is not horribly functional on Linux boxen, and isn’t all that great on Windows either. I couldn’t get the software to connect (it claimed something was corrupted) both on my Ubuntu machine and a XP box.
So I figured out another way.
How to connect to a Cisco AnyConnect or EasyConnect VPN via Linux.
I’m using Ubuntu 10.04 LTS; this guide worked for me using my university’s setup. Some bits (especially step #8) may be slightly different from you.
There is no warranty express or implied. Your computer might start voting for that other political party and eating puppies for breakfast. Or kittens. You never know. Break your computer at your own risk. (Then again, you’re running linux, so crap like that doesn’t scare you.)
1. Install openconnect from repositories (sudo apt-get install openconnect openssl) or from http://www.infradead.org/openconnect.html . Many of these directions come from that website. If you are on a lighter distro (for example, using PCMan file manager), you may need to explicitly install the samba packages (sudo apt-get install samba gvfs-bin gvfs-backends) and all dependencies. TuxCommander, GnomeCommander, and Nautilus all have plugins for VFS systems like this already in place. (See this thread for more guidance if needed: http://ubuntuforums.org/showthread.php?t=1623346 )
2. Copy the text of the file vpnc-script from http://git.infradead.org/users/dwmw2/vpnc-scripts.git .
sudo gedit /etc/vpnc/vpnc-script
in a terminal window. Feel free to use your editor of choice. Paste clipboard contents into it. Save.
4. In a terminal window (that you’re going to keep open), type:
sudo openconnect –script /etc/vpnc/vpnc-script https://wsu-vpn.wright.edu/
5. When prompted in the terminal window, enter your w# and password
6. You should see some text like the below:
POST https://wsu-vpn-3.wright.edu/+webvpn+/index.html Got CONNECT response: HTTP/1.1 200 OK CSTP connected. DPD 30, Keepalive 20 Connected tun0 as 126.96.36.199, using SSL Established DTLS connection
7. Leave the terminal window open. Open Nautilus.
This is the bit that is specific to your institution. I snagged the answers for this part from Mac instructions. Useful that OSX is based off of *nix code!
8. Navigate to smb://shared.wright.edu/home/ in Nautilus’ address bar (press Ctrl-L). A window will pop up.
When prompted, put In the Name: field, type one of the following:
Faculty & Staff: Type (without the brackets) wright.edu[your campus “w” username].
Students: Type in your “w” username.
Type your campus password into the Password: field,
9. Realize exactly how slow 50KiBs upstream is when you’re putting a video clip for your class on the shared drive.