WSL Name resolution failure when connected to company VPN
Windows Build Number
Microsoft Windows [Version 10.0.19042.1110]
WSL Version
- [X] WSL 2
- [ ] WSL 1
Kernel Version
Linux version 4.19.128-microsoft-standard
Distro Version
20.04
Other Software
No response
Repro Steps
My Windows 10 machine has environmental variable set with our company proxy setting.
But when i disconnect my company vpn name resolution is happening fine and able to connect to internet.
Expected Behavior
My WSL machine needs to connect to internet while connected to company VPN. Checked the company firewall and there is no blocking
Actual Behavior
When i ping google its failing with
root@NIDICULA1:/# ping www.google.com ping: www.google.com: Temporary failure in name resolution
Diagnostic Logs
root@NIDICULA1:/# ping www.google.com ping: www.google.com: Temporary failure in name resolution
Issue happening when my company VPN is connected. We have checked the company firewall but there is no blocking happening from my machine .
What VPN are you using? Are you able to collect logs for this issue? Instructions below! /logs
Hello! Could you please provide more logs to help us better diagnose your issue? You can find instructions on how to attach logs here, please make sure to post the link to the Feedback Hub item in this chat so we can see it.
Thank you!
Hi, same thing on our side even on the company's internal network (without vpn). Due to the fact that the IP range of DHCP for the vm is conflicting with our internal network IP range. So with the company routing rules, the packets sent cannot get back to the vm. We had the same issue with docker containers on 172.16 or 172.17 subnets, easy to fix on docker : simply create a docker network on a subnet not conflicting. Same for virtualbox. But unfortunately this is not possible in WSL, quite confusing ... A lot of people are complaining about this, you can look for issues like static IPs feature requests and so on. A lot of blogs propose workarounds, create dummy interfaces so that WSL choose other subnets etc. It would be so simple just to add a configuration line in the wsl config file to specify the NAT subnet ... But it seems MS doesn't want to do it like this ... So on our side, we tried to use WSL, we think it's a great solution, but totally useless for us because of the network configuration conflicting with our real subnets. So we keep using virtualbox, it's a pitty ...
@craigloewen-msft we are using CISCO VPN ANY CONNECT.
I have also set environment variables in my windows machine which proxy is mentioned

My doubt is there any thing that we have to mention or configure in WSL machine to allow internet access .We have checked the firewall logs in the office and there was no blocking from my Host machine or this WSL machine IP
see if switching to wsl version 1 will work as a temporary fix. Mentioned here: #6039
@nidiculageorge could you please try updating to the latest Cisco AnyConnect version? Are you able to use the Store version? They mentioned in I believe version 4.10 or higher that they added in WSL 2 specific fixes.
Does upgrading fix you?

This is the current version used in our company.The Network team need to update the version.
workaround https://gist.github.com/pyther/b7c03579a5ea55fe431561b502ec1ba8
I am seeing this on OS build 19042.1237. I have tried all of the troubleshooting steps listed in the various forums. I got DNS working at one point (now that I'm using 2FA, it no longer does, I don't know why), but even with custom resolv.conf, wsl.conf, etc., it does not work now.
Setting the priority of the VPN interface to 4000 or 6000 or whatever is a terrible idea. This appears to have something to do with NAT not working from Cisco interface -> vEthernet (WSL) interface.
PS C:\windows\system32> .\wsl.exe --status
Default Distribution: Ubuntu
Default Version: 2
Windows Subsystem for Linux was last updated on 10/6/2021
WSL automatic updates are on.
Kernel version: 5.10.16
It could be that local network routing isn't allowed on VPN. We had that issue when using Pulse Secure. For WSL2 to function on VPN, local network access had to be allowed.
I can share my experience related to Pulse Secure and WSL 2. If you are using Pulse Secure and full tunneling then it will do changes in the routing table for all known interfaces it sees to go into the tunnel. To get it to work you need split tunneling for Pulse Secure to be allowed. However, it might work for some to connect to the VPN first before starting any WSL 2 instance. Then the WSL 2 network interface in Windows will be created afterwards and routing on that for some will not be changed hence the network will work as expected inside the WSL 2 instance.
Same issue with Pulse Secure VPN, so it is impossible to work. @haxorof the "split tunneling for Pulse Secure" is on server side right ?
Same issue with Pulse Secure VPN, so it is impossible to work. @haxorof the "split tunneling for Pulse Secure" is on server side right ?
Yes, so the company may manage that centrally. It is a configuration on the server-side which is set on the client when it get assigned a role.
For reference: https://docs.pulsesecure.net/WebHelp/PDC/9.0R1/Content/PDC_AdminGuide_9.0R1/Pulse_Connect_Secure_Split.htm
Same issue with Pulse Secure VPN, so it is impossible to work. @haxorof the "split tunneling for Pulse Secure" is on server side right ?
Yes, so the company may manage that centrally. It is a configuration on the server-side which is set on the client when it get assigned a role.
For reference: https://docs.pulsesecure.net/WebHelp/PDC/9.0R1/Content/PDC_AdminGuide_9.0R1/Pulse_Connect_Secure_Split.htm
Here is an updated page. Scroll down to the heading 'Pulse Client Split Tunneling Summary' and look at the second graphic to allow local network access.
Same issue with Pulse Secure VPN, so it is impossible to work. @haxorof the "split tunneling for Pulse Secure" is on server side right ?
Yes, so the company may manage that centrally. It is a configuration on the server-side which is set on the client when it get assigned a role.
For reference: https://docs.pulsesecure.net/WebHelp/PDC/9.0R1/Content/PDC_AdminGuide_9.0R1/Pulse_Connect_Secure_Split.htm
Here is an updated page. Scroll down to the heading 'Pulse Client Split Tunneling Summary' and look at the second graphic to allow local network access.
Local access might not be an option depending on how restrictive the company is, since it is less secure than the "full tunnel".
Same issue with Pulse Secure VPN, so it is impossible to work. @haxorof the "split tunneling for Pulse Secure" is on server side right ?
Yes, so the company may manage that centrally. It is a configuration on the server-side which is set on the client when it get assigned a role.
For reference: https://docs.pulsesecure.net/WebHelp/PDC/9.0R1/Content/PDC_AdminGuide_9.0R1/Pulse_Connect_Secure_Split.htm
Here is an updated page. Scroll down to the heading 'Pulse Client Split Tunneling Summary' and look at the second graphic to allow local network access.
Local access might not be an option depending on how restrictive the company is, since it is less secure than the "full tunnel".
Without doing this, Pulse is sending all WSL traffic into the tunnel since WSL has its own local network on the computer. You could apply this to a group of people in the org to limit scope.
Same issue with Pulse Secure VPN, so it is impossible to work. @haxorof the "split tunneling for Pulse Secure" is on server side right ?
Yes, so the company may manage that centrally. It is a configuration on the server-side which is set on the client when it get assigned a role. For reference: https://docs.pulsesecure.net/WebHelp/PDC/9.0R1/Content/PDC_AdminGuide_9.0R1/Pulse_Connect_Secure_Split.htm
Here is an updated page. Scroll down to the heading 'Pulse Client Split Tunneling Summary' and look at the second graphic to allow local network access.
Local access might not be an option depending on how restrictive the company is, since it is less secure than the "full tunnel".
Without doing this, Pulse is sending all WSL traffic into the tunnel since WSL has its own local network on the computer. You could apply this to a group of people in the org to limit scope.
That is all true, in the end it is up to what the organization allow. 🙂
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.
Thank you!