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

WSL guest does not receive response packets except from the Windows host #11091

Open
1 of 2 tasks
Elemecca opened this issue Jan 29, 2024 · 5 comments
Open
1 of 2 tasks
Labels

Comments

@Elemecca
Copy link

Elemecca commented Jan 29, 2024

Windows Version

Microsoft Windows [Version 10.0.22621.3007]

WSL Version

2.0.9.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.133.1-1

Distro Version

Ubuntu 22.04

Other Software

No response

Repro Steps

In a WSL guest on my computer, attempt to establish any network connection to the public Internet, or to any host other than the machine running WSL. For the logged session, I tried to reach 1.1.1.1 with ping, plus dig in case the issue was specific to ICMP.

Unfortunately I don't have any idea how to reproduce this on a different computer / fresh Windows install. My laptop, which is running the same version of Windows and is connected to the same network, works fine.

Expected Behavior

WSL VMs should be able to connect to networks outside the host machine.

Actual Behavior

No response packets are received by the WSL VM.

maia@kelpie:~$ ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
^C
--- 1.1.1.1 ping statistics ---
14 packets transmitted, 0 received, 100% packet loss, time 13543ms

maia@kelpie:~$ dig @1.1.1.1 example.com
;; communications error to 1.1.1.1#53: timed out
;; communications error to 1.1.1.1#53: timed out
;; communications error to 1.1.1.1#53: timed out

; <<>> DiG 9.18.18-0ubuntu0.22.04.1-Ubuntu <<>> @1.1.1.1 example.com
; (1 server found)
;; global options: +cmd
;; no servers could be reached

In the network traces attached in pcaps.zip below, the expected response packets are visible from Windows when monitoring the vEthernet interface, but are not visible from inside the WSL VM.

I can ping the host at 172.24.16.1.

Diagnostic Logs

WslNetworkingLogs-2024-01-29_04-08-12.zip: captured with the collect-networking-logs.ps1 script linked in CONTRIBUTING.md

pcaps.zip: windows.pcapng captured from Windows with Wireshark on the "vEthernet (WSL (Hyper-V firewall))" interface, and ubuntu.pcapng captured from within the WSL VM with tcpdump -i eth0 -w ubuntu.pcapng -s0

I checked all of the networking entries in the WSL Troubleshooting Guide. All of them appeared to already be configured correctly or were about DNS issues. Since I'm testing with an IP address, this isn't a DNS issue.

I am not running any sort of VPN or corporate firewall. My computer is attached to a normal home network via wired Ethernet.

I've tried uninstalling WSL and reinstalling it:

  • ran wsl --unregister ubuntu
  • uninstalled "Ubuntu" and two entries for "Windows Subsystem for Linux" in Settings -> Apps -> Installed apps
  • removed "Virtual Machine Platform" via the Windows Features dialog
  • rebooted
  • installed WSL via the Microsoft Store
  • ran wsl --install ubuntu
  • rebooted again

I've looked at ip address show and ip route show in Ubuntu and everything appears correct.

I checked both iptables -L -vn and nft list tables in Ubuntu; neither iptables nor nftables seems to be configured to block anything.

I don't know enough about how the routing and firewalls between Windows and the WSL guest work to debug this any further on my own.

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.

@ghost ghost added the network label Jan 30, 2024
@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

@Elemecca
Copy link
Author

@chanpreetdhanjal I think I already did... Is there something wrong with the WslNetworkingLogs-2024-01-29_04-08-12.zip file I provided?

@b-a-merritt
Copy link

I believe I share this issue. The only difference is that the problem exists only on certain types of wifi networks. For example, everything works on a mobile hotspot.

I do not know enough about WiFi networks to tell if this is helpful. Those that have worked have Wi-Fi 5 protocols and those that don't have a Wi-Fi 6 protocol. I am not sure if that is coincidental.

Windows Version

Microsoft Windows [Version 10.0.22631.3737]

WSL Version

2.2.4.0 (WSL 2)

Kernel Version

5.15.153.1-2

Distro Version

Ubuntu 20.04.6 LTS

Diagnostic Logs

WslNetworkingLogs-2024-07-04_13-40-00.zip

@b-a-merritt
Copy link

This issue could be related
Setting networkingMode=mirrored fixed all my issues.

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

3 participants