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

Alternative connection to network and host machine in mirrored mode #10952

Closed
1 of 2 tasks
PhyX-Meow opened this issue Dec 25, 2023 · 6 comments
Closed
1 of 2 tasks

Alternative connection to network and host machine in mirrored mode #10952

PhyX-Meow opened this issue Dec 25, 2023 · 6 comments
Labels

Comments

@PhyX-Meow
Copy link

Windows Version

Microsoft Windows [Version 10.0.26016.1012]

WSL Version

2.0.15.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.133.1-1

Distro Version

Archlinux

Other Software

I also have wsa installed and running.

Repro Steps

Start an http server on host machine, say python -m http.server.
(1) Try wget www.google.com.
(2) try curl localhost:8000.

Expected Behavior

Both commands should work.

Actual Behavior

Sometimes, usually when I just reboot my computer, (1) works normally and (2) hangs. Sometimes, usually after I run wsl --shutdown then restart wsl, (1) shows that no route to host but (2) works.

Diagnostic Logs

Please let me know what logs I can provide.

Copy link

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please 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. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@PhyX-Meow
Copy link
Author

#10791
This may be related. Also, here is my .wslconfig

[wsl2]
localhostForwarding=true
networkingMode=mirrored
#networkingMode=NAT
dnsTunneling=true
firewall=false
autoProxy=false

[experimental]
autoMemoryReclaim=gradual
sparseVhd=true

@orobardet
Copy link

I have the exact same issue.

I'm using a professionnal VPN on my windows host. Until the network mirror mode appears, we had to do some trick with WSL-VPNkit to have networking inside WSL.
Now with the new networking mode, vpnkit is not needed anymore (way much easier to setup a working WSL), but from time to time, I have the issue mentioned here:

  • my wsl distro does not have outoing network access
  • and/or from windows I can't access with localhost on a service listening in the wsl distro (but it's accessible from within the wsl)

My .wslconfig:

[wsl2]
memory=20GB
swapFile=C:\\wsl-run\\wsl2-swap.vhdx

[experimental]
sparseVhd=true
autoMemoryReclaim=gradual
networkingMode=mirrored
#dnsTunneling=true

My /etc/wsl.conf:

[boot]
systemd=true

[network]
generateResolvConf=true

@PhyX-Meow
Copy link
Author

Added: I'm using latest insider preview build 26016, there's no issue on 23xxx channel.

@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

@PhyX-Meow
Copy link
Author

This is somehow fixed in latest wsl and latest Windows insider build.

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

4 participants