Cisco AnyConnect and WSL2
Submitted by Erik Wegner
on
Body
There is an annoying issue when using Cisco AnyConnect to establish the VPN tunnel to your corporate network. The Linux Subsystem for Windows gets blocked because of priorities of certain network interfaces.
In my case, the VPN client is configured to send all traffik through the VPN tunnel. But as the WSL2 network stack lives something alongside the Windows network adapters, there are priority issues.
The most helpful pages for that topic are this and this. But, to get it to work in my setup, I had to add another parameter to the interface configuration:
Get-NetAdapter | Where-Object {$_.InterfaceDescription -Match "Cisco AnyConnect"} | Set-NetIPInterface -InterfaceMetric 6000 -AutomaticMetric 0
The result can be seen in the following screen: