I'm a bit at my wit's end with this silly little problem. I've lost track of the hours I've spent attempting to fix it.
I've got a WSL instance running on my Windows 11 machine. They're both fully up-to-date. I would like my WSL instance to be able to communicate with Windows over TCP so that I can use Android Studio across the instances. However, despite all firewalls and all antivirus software being completely turned off, I cannot seem to get WSL to talk to Windows via TCP.
When I run ip route in WSL, it responds with
default via 192.168.124.31 dev eth0 proto kernel metric 55
192.168.124.0/24 dev eth0 proto kernel scope link metric 311
192.168.124.31 dev eth0 proto kernel scope link metric 55
When I try sticking the first address (192.168.124.31) into ping in WSL, it works just fine. But when I try to use telnet from WSL with the exact same address, it fails saying telnet: Unable to connect to remote host: Connection refused.
Well have you tried...
- I have tried the answer here of attempting "mirrored mode" by adding a
.wslconfigfile. Sadly, no change. - I have tried shutting down and restarting WSL numerous times with
wsl --shutdownas this answer suggests. I've also tried restarting my own computer multiple times. - I have looked at this similar question with no answer.
- I have tried using
telnettolocalhostand to127.0.0.1, with multiple different ports, but nothing succeeds there, either. - I have tried launching an Android Debug Bridge (adb) server on Windows on a specific port and using that specific port number when trying to run the telnet command from all of the IP addresses listed above, but no dice.
I'll be thrilled if anyone has any advice they can pass along! I have tried everything I can to get any sort of TCP connection between WSL and Windows and nothing seems to work!
EDIT: Some additional information:
- My
.wslconfigfile contents inC:\Users\myUsername:
[wsl2]
networkingMode=mirrored