Anyconnect Linux Download



One of my planned uses for this blog is sharing tips that came in handy for me. Today I finally got around to getting AnyConnect going on my Ubuntu 16.04 OS. I relied on the great instructions put together by Jeff Stern. I’m reproducing part of those instructions below for posterity, in case the original content disappears into the internet void.

Anyconnect

Stern put these instructions together for folks at UC Irvine. I’ve made small changes to the instructions to generalize them.

Hi, I can't install Cisco Anyconnect Secure Mobility Client in my computer with Debian 10. I have tried to install Anyconnect client with a file called anyconnect-linux64-4.4.03034-core-vpn-webdeploy-k9.sh provided for a server of my university.

Stern also put together instructions for installing OpenConnect using the built-in Debian/Ubuntu OpenVPN drivers.

Anyconnect Linux Download

Summary

  • A vulnerability in the interprocess communication (IPC) channel of Cisco AnyConnect Secure Mobility Client could allow an authenticated, local attacker to cause a denial of service (DoS) condition on an affected device. To exploit this vulnerability, the attacker would need to have valid credentials on the device. The vulnerability is due to insufficient validation of user-supplied input.
  • Download the correct 'anyconnect-predeploy-linux' file (32 or 64 bit). This file should be saved to a directory on your computer. Open a terminal window by going to the Dash Home icon in the opper left hand corner of the screen and typing terminal into the text box at the top.
  • The Cisco AnyConnect Secure Mobility Client v3.x has been retired and is no longer supported. End-of-Sale Date: 2015-03-02. End-of-Support Date: 2018-03-31. Cisco's End-of-Life Policy. You can view a listing of available Cisco AnyConnect Secure Mobility Client offerings that best meet your specific needs.

In the instructions below, I’ll walk you through installing the Cisco VPN client on a Debian or Ubuntu system. When you’re done, you’ll have two commands available at the command-prompt, which you can run to connect to the campus VPN: ‘vpn’ (text mode) and ‘vpnui’ (graphical/windowing).

Installing the Cisco AnyConnect client

  1. First, make sure you have the necessary Debian/Ubuntu support packages installed:

    $ sudoapt-get update
    $ sudoapt-get install lib32z1 lib32ncurses5
  2. Download the 32 or 64 bit Cisco Anyconnect client as a .gz file. (Note from Cassi: If you are affiliated with a university, you should be able to get access to this software through your university’s software distribution center.)

    • If you are unsure whether you should use the 32 or 64 bit client: Most people are on 64-bit machines now. But if you are unsure, just run the uname command like this:

      $ uname-a
      Linux sporkula 3.19.0-31-lowlatency #36-Ubuntu SMP PREEMPT Wed Oct 7 15:44:16 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
      $_

      As you can see from the above example, my machine has a 64-bit Intel (x86_64) based processor. If you see a ‘386’ somewhere, then you are on a 32-bit machine.

  3. From the command prompt, go to the directory you saved the file to, and unpack it and run. Note you might have to put in some back-slashes because the download file apparently comes with spaces in the file name these days:

    ~$ cd ~/Downloads
    ~/Downloads]$ tar-xzvf anyconnect-predeploy-linux-64-4.3.05017-k9.tar 6.59.23 AM.gz
    anyconnect-4.3.05017/
    anyconnect-4.3.05017/vpn/
    anyconnect-4.3.05017/vpn/vpn_install.sh
    anyconnect-4.3.05017/vpn/vpnagentd
    anyconnect-4.3.05017/vpn/vpnagentd_init
    anyconnect-4.3.05017/vpn/vpn_uninstall.sh
    anyconnect-4.3.05017/vpn/anyconnect_uninstall.sh
    ...
    anyconnect-4.3.05017/posture/libacciscocrypto.so
    anyconnect-4.3.05017/posture/libacciscossl.so
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    ~/Downloads]$ cd anyconnect-4.3.05017
    ~/Downloads/anyconnect-4.3.05017]$ cd vpn
    ~/Downloads/anyconnect-4.3.05017/vpn]$ ls-lh
    $ total 12M
    -rwxr-xr-x1 jas jas 14K Dec 92016 acinstallhelper
    -rw-r--r--1 jas jas 262 Dec 92016 ACManifestVPN.xml
    -rw-r--r--1 jas jas 6.6K Dec 92016 AnyConnectLocalPolicy.xsd
    -rw-r--r--1 jas jas 83K Dec 92016 AnyConnectProfile.xsd
    -rwxr-xr-x1 jas jas 502 Dec 92016 anyconnect_uninstall.sh
    -rw-r--r--1 jas jas 279 Dec 92016 cisco-anyconnect.desktop
    -rw-r--r--1 jas jas 164 Dec 92016 cisco-anyconnect.directory
    -rw-r--r--1 jas jas 603 Dec 92016 cisco-anyconnect.menu
    -rwxr-xr-x1 jas jas 2.6M Dec 92016 libacciscocrypto.so
    -rwxr-xr-x1 jas jas 436K Dec 92016 libacciscossl.so
    -rwxr-xr-x1 jas jas 232K Dec 92016 libaccurl.so.4.3.0
    -rwxr-xr-x1 jas jas 168K Dec 92016 libacfeedback.so
    -rwxr-xr-x1 jas jas 888K Dec 92016 libvpnagentutilities.so
    -rwxr-xr-x1 jas jas 1.6M Dec 92016 libvpnapi.so
    -rwxr-xr-x1 jas jas 530K Dec 92016 libvpncommoncrypt.so
    -rwxr-xr-x1 jas jas 1.7M Dec 92016 libvpncommon.so
    -rwxr-xr-x1 jas jas 1.1M Dec 92016 libvpnipsec.so
    -rw-r--r--1 jas jas 13K Dec 92016 license.txt
    -rwxr-xr-x1 jas jas 480K Dec 92016 manifesttool
    -rw-r--r--1 jas jas 68K Dec 92016 OpenSource.html
    drwxr-sr-x 2 jas jas 4.0K Dec 92016 pixmaps
    -rw-r--r--1 jas jas 10 Dec 92016 update.txt
    -rw-r--r--1 jas jas 1.8K Dec 92016 VeriSignClass3PublicPrimaryCertificationAuthority-G5.pem
    -rwxr-xr-x1 jas jas 65K Dec 92016 vpn
    -rwxr-xr-x1 jas jas 724K Dec 92016 vpnagentd
    -rw-r--r--1 jas jas 2.1K Dec 92016 vpnagentd_init
    -rwxr-xr-x1 jas jas 424K Dec 92016 vpndownloader
    -rwxr-xr-x1 jas jas 396K Dec 92016 vpndownloader-cli
    -rwxr-xr-x1 jas jas 24K Dec 92016 vpn_install.sh
    -rwxr-xr-x1 jas jas 176K Dec 92016 vpnui
    -rwxr-xr-x1 jas jas 8.4K Dec 92016 vpn_uninstall.sh
    ~/Downloads/anyconnect-4.3.05017/vpn]$ sudo ./vpn_install.sh
    ...
    Do you accept the terms in the license agreement? [y/n] y
    You have accepted the license agreement.
    Please waitwhile Cisco AnyConnect Secure Mobility Client is being installed...
    Starting Cisco AnyConnect Secure Mobility Client Agent...
    Done!
    ~/Downloads/anyconnect-4.3.05017/vpn]$ _
  4. If you get the following message at the end instead:

    Failed to start vpnagentd.service: Unit vpnagentd.service failed to load: No such file or directory.

    it most likely means you did not install the two Ubuntu packages up in step 1, above.

    • However, if you have installed those two packages, and are still getting this error, then user Steve Murphy wrote me (2015-12-7) with the tip that running the following did install enough dependent packages as to make it work for him:

      $ sudoapt-get install network-manager-openconnect

      However, while this may help some users, this normally should not be necessary, and was not in my testing.

  5. Now reload systemd, scanning for new or changed units:

  6. The vpn client should now have been
    installed on your system and the vpnagentd process started. You can
    verify this by looking at the active processes:

    $ ps auxw |grep vpnagentd |grep-vgrep
    root 30490.00.21659608356 ? Sl 09:07 0:04 /opt/cisco/anyconnect/bin/vpnagentd
  7. During the installation, the vpnagentd daemon should now be set up
    to be started each time your system is booted. To verify:

    $ find/etc/rc?.d -type l -name'*vpnagentd*'
    /etc/rc2.d/K25vpnagentd
    /etc/rc2.d/S85vpnagentd
    /etc/rc3.d/K25vpnagentd
    /etc/rc3.d/S85vpnagentd
    /etc/rc4.d/K25vpnagentd
    /etc/rc4.d/S85vpnagentd
    /etc/rc5.d/K25vpnagentd
    /etc/rc5.d/S85vpnagentd

    or

    $ ls-l/etc/rc?.d/*vpn*
    lrwxrwxrwx 1 root root 21 Jun 5 09:07 /etc/rc2.d/K25vpnagentd ->/etc/init.d/vpnagentd*
    lrwxrwxrwx 1 root root 21 Jun 5 09:07 /etc/rc2.d/S85vpnagentd ->/etc/init.d/vpnagentd*
    lrwxrwxrwx 1 root root 21 Jun 5 09:07 /etc/rc3.d/K25vpnagentd ->/etc/init.d/vpnagentd*
    lrwxrwxrwx 1 root root 21 Jun 5 09:07 /etc/rc3.d/S85vpnagentd ->/etc/init.d/vpnagentd*
    lrwxrwxrwx 1 root root 21 Jun 5 09:07 /etc/rc4.d/K25vpnagentd ->/etc/init.d/vpnagentd*
    lrwxrwxrwx 1 root root 21 Jun 5 09:07 /etc/rc4.d/S85vpnagentd ->/etc/init.d/vpnagentd*
    lrwxrwxrwx 1 root root 21 Jun 5 09:07 /etc/rc5.d/K25vpnagentd ->/etc/init.d/vpnagentd*
    lrwxrwxrwx 1 root root 21 Jun 5 09:07 /etc/rc5.d/S85vpnagentd ->/etc/init.d/vpnagentd*
  8. Make command aliases to point to the vpn and vpnui commands:

    $ aliasvpn='/opt/cisco/anyconnect/bin/vpn'
    $ aliasvpnui='/opt/cisco/anyconnect/bin/vpnui'
  9. Also add these aliases to the end of your ~/.bashrc or ~/.bash_aliases file:

    $ cat>> ~/.bash_aliases
    aliasvpn='/opt/cisco/anyconnect/bin/vpn'
    aliasvpnui='/opt/cisco/anyconnect/bin/vpnui'
    ^D
    $ _

    (where you don’t actually type the “^D”: it means you hit Ctrl-D to finish).

    If you want to edit your aliases file instead directly, you can run a simple editor, ‘nano’, which is usually available on Debian and Ubuntu systems:

Connecting and Disconnecting

Connecting (Graphical window)

Just run:

$ vpnui

A window should appear. You’ll need to enter an address to connect to. Follow directions provided by your VPN provider. (For example, to connect to UC Berkeley’s VPN, use ‘ucbvpn.berkeley.edu’.)

If you get an error message about an untrusted server or certificate you can fix that following the instructions from Robert in the section NOTE 1 – Connect Error, below.

(By the way, depending on how the installation went, and whatever of the Linux desktop environments you are using (Gnome, Unity, KDE, Mate, Cinnamon, XFCE, etc.) you may also find that the vpnui graphical client now also appears somewhere in your Applications menu. But don’t count on it! This is Linux, after all.. )

Connecting (via command-line)

  1. To start the client from a command-line prompt in a terminal window, using the alias you made above:

  2. At the VPN> prompt, type connect 'vpn.address.here' and press Enter. Where ‘vpn.address.here’ is the address to connect to your VPN. For example, to connect to UC Berkeley’s VPN, use ‘ucbvpn.berkeley.edu’. (If you get an error message about an untrusted server or certificate, you can fix that following the instructions from Robert in the section NOTE 1 – Connect-error, below.)

  3. Follow directions to choose a tunnel type and enter your username and password information. Your VPN provider should have instructions for how to do this.

  4. At the accept? [y/n]: prompt, type y and press Enter. You may get several notices the first time about the downloader performing update checks. At the end you should see a >> state: Connected message and a new VPN> prompt. You are now connected.

  5. Either leave the VPN> prompt open or if you want your terminal back just type quit at the VPN> prompt (the connection will remain active).

NOTE 1 – Connect-error

In most cases I have seen, a connection is made. I have, however, seen the below error before only once. It was when the person was installing on a netbook (running Gnome) which was on campus and using the campus wifi system (though I don’t know if those factors were the cause). It didn’t matter if they answered y or n, they continued to get the error and be denied connection.

------------------------------------------------------------------
Error:
VPN> connect vpn.uci.edu
connect vpn.uci.edu
>> contacting host (vpn.uci.edu)forlogin information...
>> notice: Contacting vpn.uci.edu.
VPN> AnyConnect cannot verify the VPN server: vpn.uci.edu
- Certificate is from an untrusted source.
Connecting to this server may result in a severe security compromise!
Most usersdo not connect to untrusted VPN servers unless the
reason for the error condition is known.
Connect Anyway? [y/n]:
------------------------------------------------------------------

Update 2015-12-6: “Robert” wrote me with a solution to this:

  • ..the connect error… can be resolved by sym-linking the cisco ca directory to the system ca directory as cisco only seems to include one root certificate by default. Or you can install the certificate chain from the VPN provider – sym-linking the system certs worked fine for me.

    $ cd/opt/.cisco/certificates
    $ sudomv ca ca.orig
    $ sudoln-sf/etc/ssl/certs/ ca
    $ sudo/etc/init.d/vpnagentd restart

    Credit goes to: https://plus.google.com/+AndreasKotowicz/posts/2afhvvNZpE6

Thank you, Robert!

To disconnect (gui)

  1. Just click disconnect in the window

To disconnect (command-line)

  1. At the VPN> prompt, type disconnect and hit Enter.

To exit (command-line)

  1. At the VPN> prompt, type quit and hit return.

De-installation / Removal

  1. Run Cisco’s provided un-install script

  2. Optionally, also remove the cisco directory (if you don’t need the .log files that were left behind):

    $ sudorm-rf/opt/cisco

Additional Hints, Tips, and Handling of Errors and Problems Contributed by Users

Several people have written in to me with some additional tips and solutions which I’ll add here:

  • From pierrechauffour:

    Hi !

    Thank you for your web site, a lot of help.

    But in “Section 1”, lib32z1 and lib32ncurses5 are not avalaible for launch anyconnect

    Prefer libpangox-1_0-0 and pangox-compat

    I’m not on debian (DEB) but openSuse (RPM)

    Best regards

  • From zviad aburjania:

    Thank you for the instructions, it was very helpful so far but after I type vpn in terminal I get the message: /opt/cisco/anyconnect/bin/vpn: error while loading shared libraries: libxml2.so.2: cannot open shared object file: No such file or directory

    This turned out to be a missing library fixable by:

  • From zviad aburjania (2):

    Hello Jeff,

    Thank you for your advice! After installing the package you recommended I was able to make alias to point to the vpn command.

    After I did that and typed “vnp” I used to get the error message:
    >> error: VPN Service not available.
    unable to attach to VPN subsystem!

    after searching the internet I found this link that was helpful with that problem.

    After this everything seems to be fine.

    I just wanted to share my experience as I’m very grateful for your help.

    Thank you,
    Zviadi

    (If that link no longer works, it is just recommended to start /opt/cisco/anyconnect/bin/vpnagentd first.)

  • From pascal müller:

    Pascal researched and found that the error, anyconnect was not able to establish a connection to the specified secure gateway is a known problem with Cisco clients before version 4, when these earlier clients are installed on Ubuntu 16.04+. The solution is either to downgrade your Ubuntu, or upgrade your Cisco client. At my university we have upgraded to offering version 4 (anyconnect-predeploy-linux-64-4.3.05017-k9.tar.gz), and this supposedly works with the newer Ubuntus. I did not myself test the new version 4 Anyconnect client with Ubuntus 15.x and 16.x. But I have tested it today (April 27 2017) with my Ubuntu 17.04 system, and it works great.

Featured image source.
Kmgmt-785-AnyConnect-Linux-Ubuntu

Objective

The objective of this article is to guide you through installing, using, and the option of uninstalling AnyConnect VPN Client v4.9.x on Ubuntu Desktop.

Introduction

The Cisco AnyConnect Virtual Private Network (VPN) Mobility Client provides remote users with a secure VPN connection. It provides the benefits of a Cisco Secure Sockets Layer (SSL) VPN client and supports applications and functions unavailable to a browser-based SSL VPN connection. Commonly used by remote workers, AnyConnect VPN lets employees connect to the corporate network infrastructure as if they were physically at the office, even when they are not. This adds to the flexibility, mobility, and productivity of your workers. Cisco AnyConnect is compatible with Windows 7, 8, 8.1, and 10, Mac OS X 10.8 and later, and Linux Intel (x64).

Follow the steps in this article to install the Cisco AnyConnect VPN Mobility Client on a Ubuntu Desktop. In this article, Ubuntu version 20.04 is used.

If you are using a Windows computer, click here to view an article on how to install AnyConnect on Windows.

If you are using a Mac computer, click here to view an article on how to install AnyConnect on Mac.

AnyConnect Software Version

  • AnyConnect - v4.9.x (Download latest)

Table of Contents

Installing AnyConnect Secure Mobility Client v4.9.x

Step 1

Download the AnyConnect Pre-Deployment Package for Linux from Cisco Software Downloads.

The latest release at the time of publication was 4.9.01095.

Anyconnect Linux Download

Step 2

Open the Terminal by pressing Ctrl+Alt+T on your keyboard. To navigate to the folder where you have downloaded the AnyConnect Client Package, use the command, ‘cddirectory name’. For more information on the ‘cd’ command, click here.

In this example, the file is placed on the Desktop.

The directory may be different based on the location of the AnyConnect file download. For long filenames or paths, start typing some characters and press the tab key on your keyboard. The filename will auto-populate. If it doesn't even after you press tab twice, it indicates that you need to type more number of unique characters. Alternately, you can use the 'ls' command to list the files in your current directory.

Step 3

The initial download is a tarball archive (several files packed into one), which must be extracted. The command ‘tar xvffilename’ will extract the contents to the same directory in which the initial file is located.

For more information on the ‘tar’ command, click here.

Step 4

Once the folder is extracted, use the ‘cddirectory name’ command again to navigate into the folder.

cd [Directory Name]

Step 5

After navigating into the main folder, ‘cd’ into the vpn sub-folder.

Step 6

To run the AnyConnect install script, type ‘sudo ./vpn_install.sh’. This will begin the installation process using superuser permissions.

sudo ./vpn_install.sh

For more details on the 'sudo' command, click here.

Step 7

Accept the terms in the license agreement to complete the installation by typing ‘y’.

The AnyConnect installation should complete, and the Terminal window can be closed.

Using AnyConnect Secure Mobility Client v4.9.x

Step 1

To access the Anyconnect app, open the Terminal by pressing Ctrl+Alt+T on your keyboard. Use the command, ‘/opt/cisco/anyconnect/bin/vpnui’.

/opt/cisco/anyconnect/bin/vpnui

If you encounter any errors through the Terminal, you can access the app from the applications menu as shown below.

To access the applications menu using the User Interface (UI), click on the start icon (appears as nine dots on the lower left corner). Choose the Anyconnect app.

Alternatively, press Super+A (Super key is the windows icon key) on your keyboard to bring up the search bar. Start typing 'Anyconnect' and the app will appear.

Step 2

Click on the Anyconnect app.

Cisco Anyconnect Linux Download

Step 3

Enter the IP Address or Hostname of your desired server followed by the port number.

For RV340 family, the default port number is 8443.

Step 4

Some connections may not be secure using a trusted SSL certificate. By default, AnyConnect Client will block connection attempts to these servers.

Uncheck Block connections to untrusted servers to connect to these servers.

Uninstalling AnyConnect Secure Mobility Client v4.9.x

Step 1

Anyconnect 3.1 Linux Download

Using Terminal, navigate to the folder that contains the uninstall shell script using the ‘cd’ command.

In a default installation, these files will be located in /opt/cisco/anyconnect/bin/.

Step 2

To run the Anyconnect uninstall script, enter ‘sudo ./vpn_uninstall.sh’

Anyconnect Linux Download

This will begin the uninstall process using superuser permissions. For more information on the 'sudo' command, click here.

Step 3

At the prompt, enter the sudo password and the client software will complete uninstallation.

Conclusion

There you have it! You have now successfully learned the steps to install, use, and uninstall the Cisco AnyConnect Secure Mobility Client v4.9.x on Ubuntu Desktop.

For community discussions on Site-to-Site VPN, go to the Cisco Small Business Support Community page and do a search for Site-to-Site VPN.

AnyConnect App

The Anyconnect App can be downloaded from the Google Play store or the Apple store.

Additional Resources