I'm having a bit of a problem with Docker Desktop on my Windows setup using WSL. Recently, I installed Ubuntu on WSL, and since then, my Docker containers can't connect to services on my host machine via its LAN IP address (192.168.1.254). Before this, everything was working fine, and the containers could access the host without issues. Now, though, they keep timing out on connections to that IP. Interestingly, the containers can still be accessed from other devices on the same network, but services like Nginx Proxy Manager are having trouble forwarding connections. I suspect that the new virtual network adapter created for Hyper-V during the Ubuntu installation is causing these issues, but I'm unsure how to resolve it.
2 Answers
Yeah, this seems to be a common WSL bug that Microsoft hasn't fixed in ages. I've faced similar issues where editing the VM's host files was suggested, but it's still broken networking with WSL and Docker Desktop. If you have Windows Pro, you could create a custom virtual switch to possibly help. Check out this blog post I wrote back in 2022 for more details: [Custom Virtual Switch Guide](https://blog.alexbal.com/2022/01/26/12/). You might also want to try a full 'netsh reset' to see if that helps.
If you're running a server, why not just switch to pure Ubuntu instead of using WSL? It's usually more stable for server applications.
I definitely plan to switch fully to Ubuntu, but I started on Windows for learning. I just don’t have the time right now to redo everything from scratch.

I appreciate the input! I reset everything and it still happened, so I think the latest Docker Desktop version has some changes regarding networking that's causing this mess. I found a workaround by using host.docker.internal, which is a hassle though. Planning to switch to full Linux soon!