Cisco AnyConnect and WSL
Recently, I was brought in as a consultant for a big corporation and got handed a fairly locked down ThinkPad. It runs Windows 11 and is tightly locked down, as is common for huge corporations.
As my work typically is rather technical, I have been granted Administrator Access (by request) to my local machine, so I can install tooling that isn’t pre-authorized.
Naturally, this brought me to install WSL on the machine, as I believe the UX is much better with CLI tooling for the work that I do.
When I work remote, I use Cisco AnyConnect to get on the approved networks, to being able to connect to the infrastructure I work on. Cisco AnyConnect is somewhat aggressive in the way it deals with the routing table on Windows, and as thus the bridged networking in WSL doesn’t work out of the box.
The core problem
I noticed that while I could get an IP address just fine, DNS queries didn’t want to go through the correct device.
The Solution
In the Windows 11 22H2 update, it became rather simple to get it working again for WSL2.
In the $HOME folder on Windows, you would simply add a .wslconfig file with the following contents:
[wsl2]
networkingMode=mirrored
dnsTunneling=true
Microsoft writes about mirrror mode networking on Learn, if you need to modify the firewall as well. I didn’t need this.
Updates & Revision History
- 08 Jan 2026: Initial publication