Anyconnect Ubuntu 20.04



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.

  1. Anyconnect Ubuntu 20.04 Windows 10
  2. Anyconnect Ubuntu 20.04 64-bit
  3. Ubuntu 20.04 Anyconnect Vpn
  4. Cisco Anyconnect For Linux Ubuntu
Anyconnect ubuntu downloadAnyconnect ubuntu download

I just set up 20.04 (Xubuntu) on a a new machine. The first thing I did was install the anyconnect client (4.6, since that's all I get from my university and the download page on Cisco site won't let me do 4.8). It worked perfectly, launched immediately without sudo. Then I went about setting up my machine, installing new software, etc. In this guide, you will learn how to connect to VPN automatically on Ubuntu 20.04/Ubuntu 18.04 desktop systems, OpenVPN clients. Connect to VPN Automatically on Ubuntu 20.04/18.04 One of important assumptions we make before we can proceed is that you already have your VPN client configuration file.

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.

Anyconnect Ubuntu 20.04 Windows 10

Anyconnect

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.

Anyconnect Ubuntu 20.04 64-bit

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.

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.

Ubuntu 20.04 Anyconnect Vpn

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”.

Cisco Anyconnect For Linux Ubuntu

Anyconnect Ubuntu 20.04

That is all for now!