Problem Resolved with windows 10 and Cisco An圜onnect vpn I'd prefer to leverage the built-in HyperV representation of the host network configuration with either a one-time config change or WSL runtime/setup tweak. I'll post an update if I find a work-around aside from manually managing the etc/nf or hacking by local home network. This server responds with an unknown host satisfying the request, but not permitting the alternate servers to take a crack at resolving. The WSL/ubuntu etc/nf has this DNS server first in the list. The 'Home' network interface has DNS Servers = 192.168.1.1 and does not know about the private VPN DNS. The Hyper-V Ethernet Adapter network appears to aggregate all network interfaces I'm assuming to maximize its ability to use the host network abilities (including VPN networks), as evident by the DNS Servers list. : 956306781īased on the above evidence it seems WSL translates via the Hyper-V Virtual Ethernet Adapter (Default Switch) the IPv6 DNS server addresses to the origin adapter addresses (IPv4) and writes them to the linked /etc/nf file. : 192.168.1.1Įthernet adapter vEthernet (Default Switch):ĭescription. : Wednesday, Octo7:38:35 AMĭefault Gateway. : Realtek 8812BU Wireless LAN 802.11ac USB NIC Host Network Ethernet adapter Ethernet 4:ĭescription. To stop automatic generation of this file, add the following entry to /etc/wsl.conf: # This file was automatically generated by WSL. Specific DNS server $ nslookup 10.2.2.10Ĭonfiguration Evidence nf from WSL/Ubuntu cat /etc/nf The issue presents itself as the inability to resolve a hostname that is known via the VPN interface. Thought I'd share my experience/findings. Replace 8.8.8.8 with your preferred functional nameserver.Įxit or in Windows cmd wsl -terminate, wsl -shutdown just to be sure that you've definitely killed everything.Ĭonfirm that your nf changes are still in effect, or just ping a domain name and cry tears of joy after struggling to get this working for far too long. Sudo vim nf to edit it and add this line: nameserver 8.8.8.8 sudo touch nf is as good a method as any. This will kill run/resolvconf/nf and prevent it ever being created again.Įxit or in Windows cmd wsl -terminate, then load it up again.ĭelete the existing nf file (which is still a symlink, but now to nowhere): sudo rm nfĬreate a new nf, however you see fit. The main issue is the symlinked etc/nf file pointing at run/resolvconf/nfĬreate wsl.conf as explained in every issue you can find about this problem: I'm not sure if Microsoft ninjad in some fixes this latest update (it didn't look like it.) but I've finally got this working for me. Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented. When i checked the difference WSL1 is using windows routes instead of bridging with a dedicated host interface.ĭid you ever get WSL2 working with Anyconnect? I have been experiencing your exact issue and have yet to find a solution. Tried multiple things and ended up uninstalling WSL2. As i could see the default route is to reach the gateway on the host, that itself failed. It did work after conversion from WSL1 to 2 and before reboot. I am running Windows 10 Enterprise Version 2004 (OS Build 19041.264) My case it is unable to ping to any of the addresses from WSL 2 when I connect to VPN (Cisco Anyconnect VPN client). Nameserver 8.8.8.8 # Or use your DNS server instead of 8.8.8.8 which is a Google DNS serverħ. If it exists, replace existing one with this new file. Put the following lines in the file in order to ensure the your DNS changes do not get blown awayĥ. Get-NetAdapter | Where-Object | Set-NetIPInterface -InterfaceMetric 6000Ģ. And finally in windows cmd, ps or terminal: wsl -terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).ġ3. echo "nameserver X.X.X.X" | sudo tee -a nf (Append the line in nf)ġ1. echo "nameserver X.X.X.X" | sudo tee nf (Create nf and append the line.)ġ0. With the dns primary and secondary getted replace the numbers in the next step in the X.X.X.Xĩ. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary andĨ. cd ~/././etc (go to etc folder in WSL).Ħ. wsl -terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).ĥ. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).Ĥ. echo "" | sudo tee wsl.conf (Create wsl.conf file and add the first line).ģ. cd ~/././etc (go to etc folder in WSL).Ģ.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |