11-06-2020 02:33 AM - edited 11-06-2020 02:35 AM
After starting anyconnect I find network connectivity stops working under WSL2 (Windows Substem for Linux)
the fix seems to be:
Get-NetAdapter | Where-Object {$_.InterfaceDescription -Match "Cisco AnyConnect"} | Set-NetIPInterface -InterfaceMetric 4000
Get-NetIPInterface -InterfaceAlias "vEthernet (WSL)" | Set-NetIPInterface -InterfaceMetric 1
we are using version 4.5.000 I have searched the release notes and can find no metion of wsl so I presume it's still broken in the latest
Is it possible this change could be incorporated into the product?
12-14-2021 01:00 AM
I've now switched to using https://gitlab.com/openconnect/openconnect-gui/-/releases though I have had to turn off IPv6 on the adaptor appart from that it works without any messing arround with metrics and connects more reliably and is in every way a better experience
05-17-2023 04:13 PM
Is anyone from Cisco here? This is a big deal for developers & engineers.
https://github.com/sakai135/wsl-vpnkit was a workaround but this should be something that is handled native. I've had issues with Hyper-V as well. Please get with Microsoft and others or you may have no customers left as many are moving to https://www.paloaltonetworks.com/sase/globalprotect. Please fix these issues with WSL and other MS ASAP. Sorry to be annoying but I & others have wasted hours on this issue and it shouldn't be hard to figure out in the applicatoin.
09-01-2023 02:37 PM
I found that I always needed to run the PowerShell script in Windows and then the fix in WSL to work around this problem.
I spent a little time today to find a way to just execute a single shell script that will work, whether I am connected or not connected to AnyConnect. I have created a repository on GitHub containing the steps that I have taken:
scotttyso/wsl-dns-fix: Settings to Fix DNS Settings when using WSL with AnyConnect (github.com)
04-18-2024 11:22 AM
CIsco, please fix this issue. My company is moving to PaloAlto and this among other reasons are why we are leaving.
07-02-2025 09:36 AM
Configure "networkingMode=mirrored" as described here https://learn.microsoft.com/en-us/windows/wsl/wsl-config#main-wsl-settings . It works like a charm. No other tweaks and tools are needed.
07-07-2025 11:04 AM
You can configure a Virtual subnet bypass policy and enable local LAN access in Cisco Secure Connect..
You can also enable Local LAN access by updating XML file and have <LocalLanAccess UserControllable="false">true</LocalLanAccess> set to "fasle">true -- This is case sensitive .
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide