If you've ever launched Ubuntu in WSL2 only to discover there's no internet connection—ping fails, DNS doesn't resolve, and apt update hangs forever—you're not alone.

I recently ran into this issue while my Windows host had a perfectly working internet connection, yet my WSL2 instance behaved as if it were completely offline.

After trying nearly every solution recommended online, the fix turned out to be surprisingly simple.

This post explains what didn't work, what actually fixed it, and why.

The Problem