nbdd0121 / wsld

WSL Daemon - Stable X11 connection and time synchronisation for WSL2
Apache License 2.0
298 stars 24 forks source link

Feature request: DNS resolution #20

Open s-seidel opened 2 years ago

s-seidel commented 2 years ago

Would it be possible to add a DNS resolver to wsld? I imagine that one could then set /etc/resolv.conf to 127.0.0.1 and wsldhost.exe would perform the DNS lookup on the Windows host. That would solve a lot of issues with the current state of it, for example that the Windows Firewall blocks the WSL interface by default.

nbdd0121 commented 2 years ago

What's the issue with DNS lookup in WSL? I haven't observed any weird with it.

s-seidel commented 2 years ago

https://github.com/microsoft/WSL/issues/4285 There are workarounds, but for example my employer forces a firewall that doesn't allow exceptions for the WSL network interface, so most of those workarounds don't work for me.

nbdd0121 commented 2 years ago

Wouldn't setting the DNS server in WSL to the same server used by Windows work?

s-seidel commented 2 years ago

Well, but that changes depending on which network the host is connected to and also doesn't work with VPN and split DNS for example.

slonopotamus commented 2 years ago

also doesn't work with VPN

No it does. I have WSL2 DNS happily working together with OpenVPN connection. And you even can access VPN resources from WSL2.