🚀 NEW in v2.4.29: 35+ Speed Optimizations added today!Download Now →

Home/Fix/WSL Network Not Working — No Internet in Linux Subsystem

How to Fix WSL Network Not Working — No Internet in Linux Subsystem on Windows

WSL (Windows Subsystem for Linux) has no internet, DNS resolution failing, or can't reach network resources from Linux? Fix WSL networking.

📖

Main Troubleshooting Guide

How to Fix No Internet Connection

Complete symptoms, causes, and step-by-step solutions

Symptoms

You might be experiencing this problem if you notice:

  • apt update / apt install fails with network errors in WSL
  • ping: Name or service not known inside WSL
  • curl/wget can't connect to any URLs from WSL
  • WSL network was working but broke after Windows or VPN update
  • DNS resolution fails but IP connections work in WSL
  • WSL can't access host machine or LAN resources

Common Causes

  • WSL DNS configuration auto-generated incorrectly
  • VPN software breaking WSL network routing
  • Windows Firewall blocking WSL network traffic
  • Hyper-V virtual switch misconfigured
  • resolv.conf being overwritten on each WSL start
  • WSL 2 networking mode incompatible with network setup

Solutions

Solution 1: Fix DNS Resolution

  1. 1Most common WSL network issue is DNS:
  2. 2In WSL terminal: sudo nano /etc/resolv.conf
  3. 3Replace contents with: nameserver 8.8.8.8
  4. 4Save and test: ping google.com
  5. 5To prevent WSL from overwriting resolv.conf:
  6. 6sudo nano /etc/wsl.conf
  7. 7Add: [network]\ngenerateResolvConf = false
  8. 8Then: wsl --shutdown (from Windows CMD) and restart WSL

Solution 2: Fix VPN Conflicts

  1. 1VPNs often break WSL2 networking because of routing:
  2. 2Option 1: In .wslconfig (Windows user folder):
  3. 3[wsl2]\nnetworkingMode=mirrored
  4. 4This mirrors Windows network config into WSL (requires Win11 22H2+)
  5. 5Option 2: Disconnect VPN, test WSL network, reconnect
  6. 6Option 3: Configure VPN split tunneling to exclude WSL subnet
  7. 7WSL2 default subnet: check with "ip addr" in WSL

Solution 3: Reset WSL Networking

  1. 1From Windows CMD/PowerShell:
  2. 2wsl --shutdown
  3. 3netsh winsock reset
  4. 4netsh int ip reset
  5. 5Restart Windows
  6. 6Start WSL again — network adapter should recreate
  7. 7If still broken: wsl --update (updates WSL kernel)
  8. 8Nuclear option: wsl --unregister Ubuntu && wsl --install Ubuntu
FIXES THIS IN 5 MINUTES

Fix WSL Network Not Working — No Internet in Linux Subsystem Automatically

RescuePC Toolkit includes 109+ automated repairs that fix this problem with one click. No command line knowledge required.

Download Now - Free Trial

No credit card required • Works on Windows 10 & 11

Automated Repairs for This Issue

Browse More Network & Internet Guides

Share this:XRedditLinkedInEmail