Cisco Anyconnect Ubuntu 20



  1. My workplace uses Cisco AnyConnect VPN to connect to our internal network. The VPN requires us to login to our account using Microsoft login. Months ago (few months before quarantine), we can use our ID #, and that worked fine, but now we need to login via our Exchange email.
  2. Dec 16, 2019 Install Cisco AnyConnect on Ubuntu / Debian / Fedora Connect To VPN Server with Cisco AnyConnect from Linux Terminal If you used the installation method covered in our guide, the vpn script used to connect, disconnect, and check the status of VPN is located in the directory below.
  1. Installing Cisco Anyconnect Vpn Client On Ubuntu 20.04
  2. Install Cisco Anyconnect Ubuntu 20
  3. Cisco Anyconnect Ubuntu 2018
  4. Ubuntu 20.04 Cisco Anyconnect

For 64-bit clients: '˜tar xvfz anyconnect-linux64x.0217-k9.tar.gz' Open the newly-extracted folder to find the VPN folder. Right-click the 'vpninstall.sh' file. Double-click Run. Use the GUI to install the Cisco AnyConnect Secure Mobility Client at the root level. For some versions of Linux, such as Ubuntu, using the CLI will be necessary.

CiscoCisco Anyconnect Ubuntu 20

I have been waiting in anticipation for WSL2 (Windows Subsystem for Linux) and on May 28th when the update released for general availability I updated immediately.

At first I was super hyped. WSL2 and the Ubuntu 20.04 image just worked and ran smoothly and quickly. Combined it with the release version of Windows Terminal it was a real delight.

I also went and grabbed Docker Desktop for Windows as it now has support for WSL2 as the underlying system. And joy it just installed and worked. Now being capable of running Docker containers directly from my shell without doing some of doing it the way I did before having a Ubuntu VM running in VMware Workstation and connecting to it via docker-machine on my WSL1 Ubuntu image. A hassle to get to work and not a very smooth operation.

Having the option to just start Docker containers is amazing!

But then I had to get some actual work done and booted up VMware Workstation to boot a VM. And it failed. With a Device Guard error. I followed the guides and attempted to disable Device Guard to no avail. Then it dawned on my. WSL2 probably enables the Hyper-V role! And that is exactly what happened.

Hyper-V and Workstation (or VirtualBox for that matter) do not mix well – that is until VMware released Workstation 15.5.5 to fix this exact problem just the day after WSL2 released. Perfect timing!

Simple fix – just update Workstation to 15.5.5 and reboot and WSL2 and Workstation now coexisted fine!

I played a bit more with WSL2 in the following days but ended up hitting some wierd issues where networking would stop working in the WSL2 image. No real fixes found. Many indicate DNS issues and stuff like that. Just Google “WSL2 DNS not working” and look at the mountains of issues.

But I suspected something else because DNS not working was just a symptom – routing out of the WSL2 image was not working. Pinging IPs outside the image did not work. Not even the gateway IP. And if the default gateway is not working of course DNS is not working.

I found that restarting fixed the issue so got past it that way but today it was back. I was very interested in figuring out what happened. And then I realized the potential problem and tested the fix. I was connected to my work network via Cisco AnyConnect. I tried disconnecting from VPN and testing connectivity in WSL again – now it works. Connected to VPN again and connectivity was gone.

Ubuntu

Okay – source found – what’s the fix? I found this thread on Github that mentions issues with other VPN providers even when not connected. Looking through the comments I found a reference to a different issue of the same problem but regarding AnyConnect specifically.

Cisco Anyconnect Ubuntu 20

Installing Cisco Anyconnect Vpn Client On Ubuntu 20.04

Cisco anyconnect ubuntu 20 4

Install Cisco Anyconnect Ubuntu 20

I looked through the comments and many fixes around changing DNS IP and other things but the fix that seem to do the trick was running the following two lines of Powershell in an elevated shell after connecting to VPN

Those two lines change the Interface Metric so that the WSL interface has a higher priority than the VPN connection. This inadvertently also fixed an issue that I had with local breakout when on VPN not working correctly.

Cisco Anyconnect Ubuntu 2018

Downside of the fix is that this needs to be run every time you connect to VPN. I implemented a simple Powershell function in my profile so I just have to open an elevated shell and type “Fix-WSLNet”.

Ubuntu 20.04 Cisco Anyconnect

That is all for now!