WSL: After Windows Update 24H2 WSL cannot access the internet

Windows Version

Microsoft Windows [Version 10.0.26100.2314]

WSL Version

2.3.26.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.167.4-1

Distro Version

any / all

Other Software

No response

Repro Steps

All of the below started after installing Windows Update 24H2. I had no WSL network issues in the days prior.

  1. Open any WSL distribution (example below with Alpine)

  2. Try to ping an external IP:

    > wsl ping -c 3 microsoft.com
    PING microsoft.com (20.112.250.133): 56 data bytes
    
    --- microsoft.com ping statistics ---
    3 packets transmitted, 0 packets received, 100% packet loss
    
  3. Observe 100% packet loss

  4. Verify that DNS resolution works:

    > wsl nslookup microsoft.com
    Server:         10.255.255.254
    Address:        10.255.255.254:53
    
    Non-authoritative answer:
    Name:   microsoft.com
    Address: 20.236.44.162
    Name:   microsoft.com
    Address: 20.231.239.246
    Name:   microsoft.com
    Address: 20.76.201.171
    Name:   microsoft.com
    Address: 20.70.246.20
    Name:   microsoft.com
    Address: 20.112.250.133
    
    Non-authoritative answer:
    Name:   microsoft.com
    Address: 2603:1030:c02:8::14
    Name:   microsoft.com
    Address: 2603:1020:201:10::10f
    Name:   microsoft.com
    Address: 2603:1030:20e:3::23c
    Name:   microsoft.com
    Address: 2603:1030:b:3::152
    Name:   microsoft.com
    Address: 2603:1010:3:3::5b
    
  5. Verify host Windows can ping the same addresses successfully

    PS A:\> ping -n 3 microsoft.com
    
    Pinging microsoft.com [20.236.44.162] with 32 bytes of data:
    Reply from 20.236.44.162: bytes=32 time=63ms TTL=109
    Reply from 20.236.44.162: bytes=32 time=66ms TTL=109
    Reply from 20.236.44.162: bytes=32 time=67ms TTL=109
    
    Ping statistics for 20.236.44.162:
       Packets: Sent = 3, Received = 3, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
       Minimum = 63ms, Maximum = 67ms, Average = 65ms
    
  6. Test http

WSL fails:

> wsl wget --timeout=5 --no-verbose https://google.com
Connecting to google.com (142.251.211.238:443)
wget: download timed out

Windows host succeeds:

 > wget.exe --timeout=1 --no-verbose https://google.com
2024-12-07 07:43:25 URL:https://www.google.com/ [20094] -> "index.html.2" [1]

Remedies Attempted

1. WSL Network Reset

  • Executed wsl --shutdown
  • Restarted WSL service
  • Rebooted entire system
  • Result: No change

2. Firewall Configuration

  • Added explicit allow rules for WSL executable
  • Added allow rules for all WSL network traffic
  • Verified firewall profiles (Domain, Private, Public all set to BlockInbound,AllowOutbound)
  • Result: No change

3. Network Configuration

  • Attempted to reset WSL network settings by removing registry entries:
    • HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss\NatGatewayIpAddress
    • HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss\NatNetwork
  • Adjusted MTU on WSL network adapter to match other interfaces (1280)
  • Result: No change

4. Basic Network Verification

  • Confirmed routing table is correct (default route via 172.21.176.1)
  • Verified network interface configuration
  • Confirmed WSL can’t reach its own gateway (100% packet loss to 172.21.176.1)

Current Situation

  • Host Windows networking works perfectly
  • WSL instances can resolve DNS names but cannot transmit/receive packets
  • All WSL distributions affected
  • Problem persists across WSL restarts and system reboots
  • Network configuration appears correct but packets are not reaching/returning from the gateway

Expected Behavior

connection to and response from any normally accessible internet host.

Actual Behavior

see repo steps

Diagnostic Logs

No response

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 2
  • Comments: 19

Commits related to this issue

Most upvoted comments

I had this problem, but unlike maphew, changing Hyper-V DefaultOutboundAction did help. Before I realized this, I could get networking to work with .wslconfig using virtioproxy or with firewall=false. Mirrored networking was broken for me.

[wsl2]
networkingMode=nat
#networkingMode=virtioproxy
firewall=false

After testing this, had a look at maphew’s comment and Microsoft docs , after which I changed the default outbound action via an elevated PowerShell:

PS C:\WINDOWS\system32> Get-NetFirewallHyperVVMCreator
VMCreatorId  : {40E0AC32-46A5-438A-A0B2-2B479E8F2E90}
FriendlyName : WSL

PS C:\WINDOWS\system32> Get-NetFirewallHyperVVMSetting -PolicyStore ActiveStore -Name '{40E0AC32-46A5-438A-A0B2-2B479E8F2E90}'
Name                  : {40E0AC32-46A5-438A-A0B2-2B479E8F2E90}
Enabled               : True
DefaultInboundAction  : Block
DefaultOutboundAction : Block
LoopbackEnabled       : True
AllowHostPolicyMerge  : True

PS C:\WINDOWS\system32> Set-NetFirewallHyperVVMSetting -Name '{40E0AC32-46A5-438A-A0B2-2B479E8F2E90}' -DefaultOutboundAction Allow
PS C:\WINDOWS\system32> Get-NetFirewallHyperVVMSetting -PolicyStore ActiveStore -Name '{40E0AC32-46A5-438A-A0B2-2B479E8F2E90}'
Name                  : {40E0AC32-46A5-438A-A0B2-2B479E8F2E90}
Enabled               : True
DefaultInboundAction  : Block
DefaultOutboundAction : Allow
LoopbackEnabled       : True
AllowHostPolicyMerge  : True

After this, I re-enabled firewall in .wslconfig and started Ubuntu instance, networking seems to work like it did before. My pings and curls were towards 8.8.8.8 so DNS resolution shouldn’t be in play here, though that seems to be working fine as well. Unfortunately YMMV since seemingly the same steps had no effect for maphew, posting this here since it comes up fairly high in search results.

My wsl.conf:

❯ cat /etc/wsl.conf
[boot]
systemd=true

[network]
generateHosts = true
generateResolvConf = true

Version info:

PS C:\WINDOWS\system32> wsl --status
Default Distribution: Ubuntu
Default Version: 2

PS C:\WINDOWS\system32> wsl --version
WSL version: 2.3.26.0
Kernel version: 5.15.167.4-1
WSLg version: 1.0.65
MSRDC version: 1.2.5620
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.26100.2605

+1 Here, I’ve tried (recluctantly) reinstalling WSL, Hyper-V etc but no avail. I also noticed the name of the Hyper-V adapter is corrupted: Image

As I rely on WSL for work it’s brought me to a grinding halt and we’re supposed to be on the latest Windows updates as part of our company policies.

Hopefully there will be a fix soon.

Had the same wsl issue after upgrading to windows 11 24H2. Using windows update - update history - uninstall updates and uninstall KB5048667 resolved the connectivity issue with WSL (after restart of laptop). Not a solution, but might give some relief. (also paused the updates for 3 weeks, not sure if it pauses the security updates as well…)


updated changing the “DefaultOutboundAction” as described below: https://github.com/microsoft/WSL/issues/12353#issuecomment-2574765709 worked for me with KB5048667 installed.

Thanks @jvitammela

Same problem here after 24H2 update. Using “virtioproxy” enables connectivity for https at least, but ping is not working.

Couple additional details:

  • With “virtioproxy” it seems that the connection may work for a while and then stop working suddenly
  • Using “Restore Default Policy” from Windows Defender Firewall with Advanced Security seem to resolve issue temporarily: WSL connectivity is normal without “virtioproxy” configuration, but only until next Windows reboot after which the default policy needs to be restored again.