Several factors can cause Internet connection problems in WSL 2, including network configuration, firewalls, or problems within the Linux distribution itself.
WSL 2 (Windows Subsystem for Linux 2) is a feature that allows you to run the Linux operating system inside Windows 11. This feature is very useful for developers, administrators, and users who want to use Linux tools without having to install dual boot or virtual machines.
However, there are some problems that you may face when using WSL 2, one of which is internet connection problems. Some users reported they could not access the internet from WSL 2, or that their connection was very slow or unstable.
This can interfere with your work, especially if you need to download packages, install software, or communicate with external servers.

There are several causes of internet connection issues in WSL 2, such as
- Incorrect network configuration
- The conflict between Windows firewall and WSL 2
- Bug or error in the version of WSL 2 or Windows 11 you are using
- Interruption in DNS or DHCP services
To fix internet connection issues in WSL 2, you can try some of the following solutions:
1] Check your internet connection status
The first step you should do is check if your internet connection works properly on Windows 11. You can do this by opening a web browser and trying to visit some websites. If you can access the website with no problems, then your internet connection is not a problem.
However, if you cannot access the website or are getting error messages like “no internet connection” or “server not found”, then there is a possibility that your internet connection is problematic.
Here, you need to check your Windows 11 network settings, such as network card, TCP/IP protocol, default gateway, DNS server, and others. You can also try to restart your router or modem or contact your internet service provider for further assistance.
If your internet connection works fine on Windows 11, but not on WSL 2, then proceed to the next solution.
2] Update WSL 2 and Windows 11 to Latest Version
One cause of internet connection issues in WSL 2 is a bug or error in the version of WSL 2 or Windows 11 you are using. To resolve this, you can try to update WSL 2 and Windows 11 to the latest available versions.
To update WSL 2, you can run the following command in PowerShell as an administrator:
wsl --update
This command will download and install the latest version of the Linux kernel for WSL 2. Once done, you need to restart your computer for the changes to take effect.
To update Windows 11, you can open Settings > Update & Security > Windows Update and click Check for updates. If there’s an update available, follow the on-screen instructions to download and install it. Once done, you also need to restart your computer for the changes to take effect.
After updating WSL 2 and Windows 11 to the latest version, try checking again if your internet connection is normal on WSL 2. If you’re still having trouble, move on to the next solution.
3] Customize WSL 2 Network Configuration
Internet connection problems in WSL 2 can also be caused by incorrect or inappropriate network configurations. WSL 2 uses virtualization to run the Linux operating system inside Windows 11 and automatically creates a virtual network interface that connects to your on-premises network.
These virtual network interfaces have a different IP address than your Windows 11 IP address and are typically assigned by the DHCP service.
However, sometimes this WSL 2 network configuration can cause conflicts or problems with your on-premises network, such as:
- WSL 2 IP address collides with another IP address on your on-premises network
- The default gateway or DNS server of WSL 2 does not match the default gateway or DNS server of your local network
- Windows firewall or other security software blocks or restricts WSL 2 internet access
To solve this, you can try to adjust the WSL 2 network configuration according to your needs. There are two ways to do this, namely:
- Change WSL 2 network settings globally via /etc/wsl configuration file.conf
- Change WSL 2 network settings specifically for each Linux distribution via /etc/resolv.conf configuration file