27

Following my previous experiences with setting up Cisco AnyConnect VPN connections on Ubuntu 14.04 I tried the same approach here by installing packages:

sudo apt-get install -y network-manager-openconnect-gnome network-manager-openconnect network-manager-vpnc network-manager-vpnc-gnome vpnc vpnc-scripts

Even after this an option to create Anyconnect compatible VPN connection does not appear.

Ubuntu 16.04 64bit, stock.

1
  • 1
    Note: If anyone thinks they can get by with just network-manager-openconnect and not network-manager-openconnect-gnome because they're not running GNOME, no: you need the -gnome package, because it provides the actual /usr/lib/x86_64-linux-gnu/NetworkManager/libnm-vpn-plugin-openconnect.so file referred to by the files installed by network-manager-openconnect :(
    – unhammer
    Commented Dec 21, 2017 at 8:59

6 Answers 6

21

I am having the same problem on fresh install of Ubuntu 16.04. You can however connect via terminal :

sudo openconnect https://<remote.host.here> 

after that you should be prompted for user name and password.

5
  • Thanks, but I really need the GUI here. Until that is fixed no Ubuntu 16.04 for me... Commented Apr 24, 2016 at 12:39
  • I appreciated the tip! GUI would be nice, but none of the proposed solutions have worked for me. So until the bug is fixed, I at least can have a handy connection script ready.
    – Maura
    Commented May 14, 2016 at 18:03
  • Worked for me on Ubuntu 16.04, after trying every possible solution google could provide.
    – L42
    Commented Jun 14, 2016 at 7:54
  • pardon my ignorance, but I'm running a non-gui version of Ubuntu Server 16. If I run this command it just says "Established" and I don't get a prompt back. How can I connect "in the background"? Commented Feb 14, 2017 at 20:45
  • 1
    @Scott try "sudo openconnect <host> -u <username> -p <password> -b" see "man openconnect" for more options.
    – bart
    Commented Feb 25, 2017 at 14:29
10

I had same problem. use package in this page (or build it if you don't trust) http://tomtomtom.org/networkmanager-openconnect/

It works for me

On Ubuntu 16.04 the network-manager-openconnect and network-manager-openconnect-gnome plugins are not usable because they are to old to use with the current version of network-manager.

This is the english version of this guide from a german ubuntu support forum.

Unofficial built packages are available here:

http://tomtomtom.org/networkmanager-openconnect_1.1.93-1_i386.deb

http://tomtomtom.org/networkmanager-openconnect_1.1.93-1_amd64.deb

NOTE: You won´t get any security updates for this! It is just a workaround until the packages will have been fixed in the official repository!

Using VPN is a security feature - so it is better to build the package manually from source because you don´t know what I put into the packages. :-P

At first remove the unusable packages

sudo apt-get purge network-manager-openconnect network-manager-openconnect-gnome

You will need the build-dependencies.

sudo apt-get build-dep network-manager-openconnect

(NOTE: For this the 'deb-src'-Sources in /etc/apt/sources.list must be active.)

You can do this with sed e.g.

sudo sed -i s/#deb-src/deb-src/g /etc/apt/sources.list

the new dependency for the new version.

sudo apt-get install libnm-dev

and the sourcecode from GNOME project.

wget http://ftp.gnome.org/pub/GNOME/sources/NetworkManager-openconnect/1.1/NetworkManager-openconnect-1.1.93.tar.xz

Unpack the tarball

tar -xf NetworkManager-openconnect-1.1.93.tar.xz

change to the unpacked directory

cd NetworkManager-openconnect-1.1.93

and run the configure script.

./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
            --libexecdir=/usr/lib/NetworkManager/ 
            --enable-more-warnings=yes --disable-static

start compiling .

make

and install manually

sudo make install

install the dependency for use the software

sudo apt-get install openconnect

or build a package with checkinstall

sudo checkinstall

If you do so enter this:

networkmanager-openconnect as package name

adduser, libc6, libdbus-glib-1-2, libglib2.0-0, libnm-glib-vpn1, libnm-util2, network-manager, openconnect as requirements

and

network-manager-openconnect, network-manager-openconnect-gnome

as conflicts.

If you get errormessages by installing the package try

sudo apt-get -f install

to resolve unmet dependencies.

To use the software it is necessary to add a systemuser for this

sudo adduser --system --quiet --home /var/lib/NetworkManager
             --no-create-home 
             --gecos "NetworkManager OpenConnect plugin" 
             --group nm-openconnect}

At last restart the system.

2
  • Not working for me :(. May try this process again later.
    – Pabru
    Commented May 20, 2016 at 22:29
  • how do you use this?
    – user2413
    Commented Mar 9, 2017 at 19:21
8

There seems to be an official fix in xenial-proposed. If you enable pre-release updates and then do:

sudo apt install network-manager-openconnect network-manager-openconnect-gnome

it will start working. Well, it worked for me at least :)

3
  • Yep, this is what I needed to get the pulse secure compatibility working, and for the UI to work with the Ubuntu 17 network settings.
    – jerome
    Commented Oct 27, 2017 at 23:44
  • This is the fix for this issue on 17.10 as well. Need the *-gnome package. Commented Apr 15, 2018 at 2:53
  • This is still all I need for Ubuntu 19.10 as well.
    – jerome
    Commented Nov 17, 2019 at 17:19
1

I think the issue appears to be that the openconnect plugin is missing a library that network manager now requires.

If I examine the files in /etc/NetworkManager/VPN I see that all of the plugins except openconnect have a section that looks like the following:

[libnm]
plugin=/usr/lib/x86_64-linux-gnu/NetworkManager/libnm-vpn-plugin-vpnc.so

network-manager-openconnect-gnome does not appear to provide a similar library and nor does any package in the ubuntu repository. I think this libnm library is some new requirement of NetworkManager and the version of openconnect in ubuntu doesn't support it yet.

Since I upgraded to 16.04 from 15.10 I still have my VPN connection defined. I can select and login from the NM GUI. However I cannot edit the connection via the GUI nor can I add a new VPN connection using openconnect.

2
  • I thought that at first as well, but then I went back and looked at the files in the 15.04 version and it didn't have the plugin either (but worked). In fact, all of the same files are present in the deb file for 15.04 and 16.04. Commented Apr 27, 2016 at 13:00
  • 2
    When this happened to me it was because I had installed the "network-manager-vpnc" package, but forgot to also install "network-manager-vpnc-gnome". Commented Jun 3, 2016 at 21:56
1

To supplement Morteza Pourkazemi's answer, the answer works for me, but I need to install the following packages which are required by the configure command.

sudo apt-get install intltool libxml2-dev libgtk-3-dev libsecret-1-dev libopenconnect-dev network-manager-dev libnm-util-dev libnm-glib-dev libnm-glib-vpn-dev
1
  • You misspelled "secret" in "libseceret-1-dev".
    – brews
    Commented Apr 27, 2016 at 2:18
0

It is not at all difficult to do this with a CLI instead of a GUI:

openconnect -c ~/path/to/your/client_cert.pem  \
            -k ~/path/to/your/private_key.pem  \
            -b #for background
            $VPN_Address

There are also options for giving it your username / password - so throw those in and add the script to startup, and you'll never even have to think about it.

2
  • I am aware of that option but it is not what I want. I want full GUI working without that I can stick with 14.04. Commented Apr 25, 2016 at 19:26
  • Well, in case you or anyone out there needs an "get me connected immediately" solution. Looks like I'll be rolling back too -_-
    – rm-vanda
    Commented Apr 26, 2016 at 13:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .