Cisco AnyConnect in Gnome on Fedora 25+

26 Jun 2017
Submitted by Gangrif

For work, I have to use Cisco Anyconnect as a VPN connection.  For a long time I would just use the Cisco AnyConnect official client for linux.  This software is problematic, buggy, and just plain out gives me heartburn.  So one day I came across OpenConenct, which is an open source alternative to the AnyConnect client.  It will talk to an AnyConnect gateway, and can be directly installed via Fedora's package manager.  This also works on Ubuntu, but I don't run Ubuntu, so you're on your own.

There's even a decent Gnome and NetworkManager plugin, so you can add the OpenConenct vpn connection to gnome's NetworkManager UI, and fire up your VPN sessions right from your gnome-shell session.  So I started using that, and things were awesome.

When I upgraded from Fedora 24 to 25, I found that the gnome integration flat out stopped working.  I'd select my vpn connection, and it would act like it did something, but no session would connect, no username/password prompt, just... nothing.  So for a brief period I started using the CLI for openconenct to get things done.  One day I decided to sit down and figure out why Fedora's OpenConnect integration had simply stopped working.

I removed my VPN config, and tried to add it again from scratch, and I came across an odd issue.  I could add it, select OpenConnect as the type, give it a name, but there were no configuration options.  Nowhere to set my username, the VPN gateway, nothing.  So I went to google, and found others with a similar problem.  It had to do with the various gnome plugins that made openconnect work.  After installing the right packages, OpenConnect started working properly again.

Here's what I did.

First, here's a screenshot of a Fedora 25 system I just installed a few days ago, note the error message stating that it cant find the openconnect pieces.  That wasn't there a few months back when I first encountered the problem. If it had been, it wouldn't have been nearly as confusing.

Simply installing these two packages (and of course their dependencies) adds in the bits that Gnome and NetworkManger need to make OpenConnect work properly again.

[gangrif@starwind ~]$ sudo dnf install NetworkManager-openconnect NetworkManager-openconnect-gnome

Turns out that just NetworkManager-openconnect-gnome was missing from my system, but both are requred to make this happen. 

After installing that package, I tried to add my VPN session, and sure enough, all of the options are available.

So there you have it! I hope this helps someone of the time-sink that it caused me when I encountered it.