Click to collapse/expand
This script provides a permanent fix for a persistent issue affecting WSL2 users on various Linux distributions, including Debian, Ubuntu, and Kali.
Many users attempt temporary configuration tweaks, only to find the problem recurring. This script eliminates the hassle by offering a reliable, long-term solution that works seamlessly.
If you've been struggling with this issue, or know someone who is, this script is the definitive fix you've been looking for.
This script has been successfully tested on multiple WSL2 environments, including:
This repository is dedicated to fixing Internet connectivity issues in WSL2 when using a Linux distribution.
📌 Note: This guide does not cover WSL2 installation or setup—only the networking fix.
My goal is to provide a reliable and efficient solution to help WSL2 users restore network connectivity and optimize their workflow.
Download the script directly via PowerShell:
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/franckferman/fix_wsl2_networking/stable/fix_wsl2_networking.sh" -OutFile "C:\Users\$env:UserName\fix_wsl2_networking.sh"
1️⃣ Move & execute the script from your Linux terminal in WSL2:
cd ~&&mv /mnt/c/Users/Your_Windows_UserName/fix_wsl2_networking.sh .&&chmod +x ./fix_wsl2_networking.sh&&sudo ./fix_wsl2_networking.sh
2️⃣ Once the script completes, your connectivity issues should be resolved.
This project is licensed under the GNU Affero General Public License, Version 3.0. For more details, please refer to the LICENSE file in the repository: Read the license on GitHub