Skip to content

Instantly share code, notes, and snippets.

@kevinrodriguez-io
Created March 27, 2022 06:38
Show Gist options
  • Save kevinrodriguez-io/1a6027c6be566115a7afd0e91ab32c8c to your computer and use it in GitHub Desktop.
Save kevinrodriguez-io/1a6027c6be566115a7afd0e91ab32c8c to your computer and use it in GitHub Desktop.
WSL2 Fix for dropped connections
Created a /etc/wsl.conf containing
[network]
generateResolvConf = false
I exited wsl and then issued a wsl --shutdown
entered wsl force deleted the /etc/resov.conf to stop it being a symbolic link
sudo rm -fd /etc/resov.conf
I exited wsl and then issued a wsl --shutdown
entered wsl and recreated a resolv.conf
sudo touch /etc/resov.conf
sudo nano /etc/resov.conf
Added the following line to the /etc/resolv.conf
nameserver 8.8.8.8
I exited wsl and then issued a wsl --shutdown
Entered wsl and everything was now working
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment