-
Notifications
You must be signed in to change notification settings - Fork 821
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 networking does not loopback the entire 127.0.0.0/8 range #11766
Comments
Logs are required for review from WSL teamIf this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. How to collect WSL logsDownload and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
The scipt will output the path of the log file once done. Once completed please upload the output files to this Github issue. Click here for more info on logging View similar issuesPlease view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it! Open similar issues:
Closed similar issues:
|
/emailed-logs |
Diagnostic information
|
it looks like support is progressing in WSL 2.3.11.
ok 127.0.0.1 -> 127.0.0.0/8 but
|
hello. thanks for reporting the issue this is currently by design - only 127.0.0.1 can be used for communicating between Windows and Linux. one of the reasons is that systemd uses IP 127.0.0.53 as its DNS resolver. it's preferred for traffic to this IP to stay inside Linux instead of going to Windows over the loopback0 interface and back to Linux on the loopback0 interface, as this can risk something on Windows blocking the traffic and breaking systemd |
It would be good if we could at least get some support or documentation on how we could expand even parts of the local range. |
Windows Version
Microsoft Windows [Version 10.0.22635.3858]
WSL Version
2.2.4.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.153.1-2
Distro Version
Fedora 40
Other Software
Ncat: Version 7.95 ( https://nmap.org/ncat )
netcat.x86_64 1.226-3.fc40 @fedora
Believe this is also the root cause of docker/for-win#14184
Repro Steps
Using
netcat
from within a WSL2 session andncat
from a Powershell session on the same machine.Executing the
nc -l
commands before attempting thencat
connectionswsl.conf
excerptExpected Behavior
Binding to any loopback address within 127.0.0.0/8 is mirrored/relay to the Windows OS.
127.20.30.1:12345
in WSL2 <->127.20.30.1:12345
within WindowsActual Behavior
Only when binding to 127.0.0.1, all-hosts (0.0.0.0) or another specific IP assigned to the machine (only when )
hostAddressLoopback=true
has no impact on the loopback behaviour - will only every pass through127.0.0.1
.Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: