Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mirrored Network: Local DNS resolution does not work #11199

Open
1 of 2 tasks
peterjuras opened this issue Feb 23, 2024 · 5 comments
Open
1 of 2 tasks

Mirrored Network: Local DNS resolution does not work #11199

peterjuras opened this issue Feb 23, 2024 · 5 comments
Labels

Comments

@peterjuras
Copy link

peterjuras commented Feb 23, 2024

Windows Version

Microsoft Windows [Version 10.0.22621.3155]

WSL Version

2.0.14.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.133.1

Distro Version

Ubuntu 22.04

Other Software

No response

Repro Steps

  1. Update networkingMode to NAT in .wslconfig
  2. Run wsl --shutdown
  3. Start a WSL2 shell (Ubuntu in my case)
  4. Ping a local machine on the network with its DNS name (rutzberry in my case)
  5. Ping works, resolved local IP address ✅
  6. Update networkingMode to mirrored in .wslconfig
  7. Run wsl --shutdown
  8. Start a WSL2 shell (Ubuntu in my case)
  9. Ping a local machine on the network with its DNS name (rutzberry in my case)

Expected Behavior

Ping does not work anymore and outputs the error ping: rutzberry: Name or service not known

Note: Pinging the actual local IP address does work.

Actual Behavior

Ping should work, just as with networkingMode=NAT.

Diagnostic Logs

https://1drv.ms/u/s!AsTaR5LHyZP9tMJB_nJZr7sGE7XfSA?e=wsNDrt

@byjrack
Copy link

byjrack commented Feb 27, 2024

I am in the same boat where some flows seem to work in "mirrored", but DNS seems to fail by default. I also enabled dnsTunneling and no change.

Scenarios tested w "mirrored"

  • host example.com -> 127.0.0.1:53 connection refused
  • host example.com 1.2.3.4 -> resolves via known good DNS
  • ping 1.2.3.4 -> ICMP seems to be fine
  • curl https://9.8.7.6 -> works fine bypassing dns

I did do a netsh trace and no DNS packets when using the 127.0.0.1 proxy were captured, but ones with the known good server were fine. I checked firewall logs and not seeing any DROPs. Any recommendations on debugging if one of our other network controls might be stepping on this specific proxying feature?

@DaWei-GeGe
Copy link

I'm in the same situation.
wsl and windows , cannot access applications through 127.0.0.1,Only through Windows ip

@D9RS
Copy link

D9RS commented May 2, 2024

Same issue for me. Guys, maybe you found some solution?

@chanpreetdhanjal
Copy link

Hi. Can you please collect networking logs by following the instructions below?
https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues

@peterjuras
Copy link
Author

@chanpreetdhanjal From a different perspective: Is there any user that has working local DNS with mirrored network mode?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants