I have WSL Version 2 running on my Windows 10 Laptop. I'm using the WSL distribution Ubuntu-20.04. When I connect to a VPN network domain name resolution doesn't work so I can't access the Internet.
VPN Client in use is "Cisco AnyConnect Secure Mobility Client"
I tried the following steps to resolve this problem.
- Opening the Windows command prompt in admin mode
- Execute following commands
netsh winsock reset
netsh int ip reset all
netsh winhttp reset proxy
ipconfig /flushdns
reboot
That worked once, I had access to the internet. But as soon as I disconnected the VPN connection and connected again, I had the same problem all over again. I tried to just execute the commands again and rebooted, but now thats not working anymore.
What is a permanent fix for this problem?