Cisco AnyConnect on Surface Pro 3

If you get the dreaded “failed to initialize connection subsystem” error when trying to use AnyConnect on the Surface Pro 3, or on Windows 8.1 in general for that matter (though it works fine for me on my ThinkPad T540p), there’s a lot of differing opinions on how to fix it so I thought I’d share the one that worked for me.

What absolutely did not work for me (but that apparently works for other people based on frequency with which I encountered this solution) is just running AnyConnect through the Troubleshoot Compatibility wizard. That had zero effect for me.
What did work is this:
  1. Hit the Windows key and start typing “AnyConnect” to bring up AnyConnect in the search/launcher thingee (as I call it)
  2. Right-click on AnyConnect and choose “Open file location”
  3. Right-click on AnyConnect in Windows Explorer and choose “Properties”
  4. Click on the Compatibility tab
  5. Check the “Run this program in compatibility mode for” box and select “Windows 7” in the drop-down
  6. If you have a high-resolution display and AnyConnect looks fuzzy, and you care, you can also check the “Disable display scaling on high DPI settings” box
  7. Hit OK to save the changes.
  8. Reboot for good measure.
There have also been some previous issues with IE 11 updates breaking AnyConnect (yeah, wrap your head around that one) but those seem to have been resolved as long as you have your machine all patched up.

Cisco AnyConnect VPN Client vs. OpenConnect on 64-Bit Linux Mint 12

Last night I decided to replace my Ubuntu 11.10 installation on my System76 Serval Pro with Linux Mint 12. I’ve used Linux Mint on and off since version 9, and Linux Mint 10 and 11 were my full-time OSes until I ran into some lockup issues with Mint 11 on my System76 Lemur Ultra-Thin, at which point I decided to give Ubuntu 11.10 with Unity a real shot.

Not to get sidetracked on the real topic of this post, but Unity isn’t nearly as bad as many make it out to be. After using it for a week I actually started to like it and found myself quite productive with it. That said, since I’ve also always loved Mint I figured I better kick the tires on their latest release which is now the most popular GNU/Linux distribution, having recently bumped Ubuntu from the top spot.

If you’ve seen all my previous posts on getting Cisco AnyConnect running on GNU/Linux you’ll know that this is an ever-changing series of problems and fixes over the years, but with Ubuntu 11.10 and Cisco finally releasing a native 64-bit version of the AnyConnect client the steps were finally limited to simply install and launch.

For some reason that isn’t the case with Linux Mint 12 and as in the past the fixes that worked previously don’t seem to apply to Mint 12. Downloading and installing the client is the same as previously, and the installation works fine, but at least on my machine when I try to connect I get a different certificate-related error than I’ve received in the past and I haven’t yet determined how to resolve it.

In the mean time, some folks commented on a previous post to try OpenConnect, which is an open source VPN client designed to work with Cisco hardware. I’d tried it in the past without success against my specific VPN server but since I wasn’t having much luck with AnyConnect (and to be fair, I probably only fought with it for about 30 minutes so there may well be a solution–if you know what it is I’d love to hear it!) I decided to try OpenConnect again. (An aside: my apologies for not responding to comments to that post. Posterous is having notification issues and I haven’t received comment notifications for a while.)

Installation of the client and the integration with the Mint network manager is easy enough:
sudo apt-get install openconnect network-manager-openconnect

After installation completes you go to Network Settings and configure your VPN connection, which basically just requires the host name of your VPN server. With that configured you can then click on the network connection icon on the top right of the screen and select your VPN connection from the VPN list, and in my case it connected fine.

I did try running OpenConnect from a terminal and even when starting with sudo (which you have to do in order for the tunnel to be created), I got the error “No –script argument provided; DNS and routing are not configured” so although it connected to the VPN server fine, I couldn’t do anything once I was connected. Using the network manager piece resolved that issue for some reason. The issue with running from a terminal is probably just a configuration thing but using the network manager is more convenient anyway, so I didn’t dig into that either.

So for now at least I’ll be using OpenConnect instead of AnyConnect, though if/when I install Mint 12 on one of my other machines I may try to figure out what’s wrong with AnyConnect to satisfy my curiosity if nothing else. For now I just had to get something working since tomorrow it’s back to work after the Thanksgiving holiday.

If anyone has AnyConnect running on Mint 12 and has ideas of what to try I’d be very interested to hear how you got things running, and I’ll do a follow-up post if I figure it out when I work on it on another machine.

Installing Cisco AnyConnect on 64-Bit Ubuntu 11.10

Every six months for the past few years I’ve been posting how to install Cisco AnyConnect on the latest 64-bit releases of Ubuntu and for a couple of cycles Linux Mint since I was using that as my primary OS for a while.

This time around it’s finally downright boring, which is a good thing. No more installing 32-bit libraries, creating symlinks to Firefox libraries, etc. etc. you just do the following:

  1. Hit your company’s VPN server in a browser and log in with your user name and passcode
  2. Click the AnyConnect link on the left
  3. Click “Start AnyConnect”
  4. This will attempt to install AnyConnect via your browser’s Java plugin. If this works, you’re done! If this doesn’t work (give it at least 60 seconds), read on.

In my case on the two machines on which I attempted this it didn’t work. The browser-based install just hung even though I verified I have Java installed and the browser plugin is working.

If you don’t have Java installed, however, the browser-based installation will detect that and give you a download link for the installer. So what I did was in Firefox I went to Edit -> Preferences -> Manage Add-Ons -> Plugins and I disabled the IcedTea-Web Plugin, which is the Java plugin that Firefox ships with.

I then restarted Firefox and repeated the steps above, only this time on step 4 it detected I didn’t have Java installed and provided a link to the 64-bit installer. Download that file (vpnsetup.sh), chmod +x it, run it, and you’re done.

I’m a little disappointed I didn’t have to the usual dance on this, but it finally just works.

Cisco AnyConnect VPN Client on 64-Bit LinuxMint 11

I’ve posted before about getting Cisco AnyConnect running on Ubuntu 9.10 and Ubuntu 10.04, but I’ve since started using LinuxMint as my daily driver and did a clean install of MInt 11 today. Mint is based on Ubuntu so on Mint 10 the previous strategy to get AnyConnect running worked fine, but I had to take a different approach after installing Mint 11. (I suspect it’ll be the same issue on Ubuntu 11.04 but I haven’t tried it.)

In doing a bit of research I came across this link that explains quite correctly that you don’t need to actually download and extract Firefox to get this all working, which is what I had been doing previously. The Cisco client (for some stupid reason) expects certain things to be in a /usr/local/firefox directory but you can simply create that directory, download some other files, and then create the appropriate symlinks in /usr/local/firefox to make AnyConnect happy.

I also ran into some inexplicable weirdness related to a certificate file in my ~/.mozilla/firefox profile directory but I’ll cover that as I outline the steps I took to get AnyConnect working.

Summary of Steps

Follow these and if you’re lucky it’ll work; if it doesn’t read the information that follows for more details and troubleshooting ideas.

  1. Follow the steps in this blog post, which are as follows:

    1. sudo apt-get install ia32-libs lib32nss-mdns
    2. sudo mkdir /usr/local/firefox
    3. sudo ln -s /usr/lib32/libnss3.so /usr/local/firefox
    4. sudo ln -s /usr/lib32/libplc4.so /usr/local/firefox
    5. sudo ln -s /usr/lib32/libnspr4.so /usr/local/firefox
    6. sudo ln -s /usr/lib32/libsmime3.so /usr/local/firefox
    7. sudo ln -s /usr/lib32/nss/libsoftokn3.so /usr/local/firefox
  2. Download the AnyConnect installer from somewhere. The usual method of browsing to your VPN server and logging in may not work, so see below for details.
  3. Run the installer from the directory to which it was downloaded (sudo ./vpnsetup.sh). The daemon may fail to start at this point but don’t worry if it doesn’t.
  4. If the daemon failed to start, start the VPN daemon: sudo /etc/init.d/vpnagentd_init start

    1. You shouldn’t get an error regarding /opt/cisco/vpn/bin/vpnagentd not being found at this point if you followed the above steps accurately. If you do, read on to see if any ideas come out of any of the subsequent discussion.
  5. Start the AnyConnect client. It should be in your Internet programs menu.

    1. If you get a “server certificate problem” error, stop Firefox and delete ~/.mozilla/firefox/YOUR_PROFILE.default/cert8.db where YOUR_PROFILE is whatever random string Firefox assigned your default profile (you should only have one directory with .default at the end of it in ~/.mozilla/firefox). In my case this problem didn’t rear its head until after I rebooted, so you might want to reboot at the end of all of this to make sure everything’s working.

If you’re still getting errors read on for more info …

Downloading AnyConnect

I ran into problems right out of the gate on Mint 11. On Mint 10 as well as previous versions of Ubuntu I could at least hit my VPN server in a browser, try to fire up the Java applet, and when that fails it prompts you to download, but this time around the “launching Java applet” screen on the VPN server just hung. I verified that Java is enabled in Firefox and tested with other applets so I’m not sure what the issue is there, particularly since this did work on my 32-bit machine with Mint 11.

So word of caution: you need to get the installer elsewhere, or at least I did. There may be a solution to this I haven’t yet come up with so if you know what’s up here, please be sure and comment.

Luckily I had the installer backed up from when I copied my home directory to an external hard drive prior to installing Mint 11, so I ran the installer from my home directory.


sudo ./vpnsetup.sh

This at least got the daemon installed for me, but it failed to start after installation (usually it starts fine after it’s installed), throwing an error about /opt/cisco/vpn/bin/vpnagentd file not being found. The file’s definitely there so I’m not sure what its problem is, but this gets resolved in the subsequent steps so you can ignore that error for now.

Install Necessary Libraries and Create Symlinks

See the above steps for details (all the steps under #1 above). In my case this resolved the file not found error the daemon was throwing when I tried to install AnyConnect prior to creating those symlinks. If you do that step first everything should work.

Launch the VPN Daemon


sudo /etc/init.d/vpnagentd_init start

If that throws errors doublecheck all the symlinks you created above. Note that in previous versions one of the things you were supposed to install and symlink to was sqlite3.so but that does not seem to be necessary.

Launch the AnyConnect Client

You should now be able to launch AnyConnect from your Internet programs menu. If you get a “server certificate problem” error, for me this seemed to be related to a certificate file in my Firefox profile.

How I came across this was after I rebooted and started Firefox on my 32-bit machine, since my home page is my Google Mail login, Firefox immediately threw a “Could not initialize the browser’s security component” error. I found information on that error on Mozilla’s site, so on GNU/Linux this means stopping Firefox and deleting the cert8.db file that’s in your profile (~/.mozilla/firefox/YOUR_PROFILE.default).

On my 64-bit machine the behavior was slightly different. Everything seemed to work with AnyConnect until I rebooted, at which point it threw the server certificate error. I then launched Firefox and it popped up a completely blank alert window, but when I closed that window and Firefox finished loading, I noticed I couldn’t browse to any sites. No matter what I put in the location box the top of the Firefox UI was completely unresponsive.

Since I’d happened to have the security component issue on my 32-bit machine, I figured even though on the 64-bit machine it wasn’t actually showing me the error, that might be the problem. Sure enough when I deleted the cert8.db file Firefox then began to work, as did the AnyConnect client. I rebooted to make sure it wasn’t a fluke and thus far everything is working.

Remaining Issues

At this point the only remaining issue is that for some reason when I connect to the VPN, AnyConnect doesn’t minimize itself into that little “stacked blue balls” icon thingee over near the clock. It just minimizes itself and shows up in your task bar like any other program. Minor annoyance but it does behave correctly on my 32-bit machine so I’m not sure what’s going on there.

Hope that helps some others who are trying to get this running!