-
Notifications
You must be signed in to change notification settings - Fork 822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to access WSL2 Ubuntu ports from other LAN connected PCs #5798
Comments
On thinking further about this problem. As mentioned I can access other Hyper-V virtual computers on my LAN. What it seems is that the WSL2-Ubuntu-20.04 is a virtual machine but while I can access that virtual machine from its host In effect, I don't know what hostname or ip address (apart from 'localhost' will allow me access to the Ubuntu-20.04 running under WSL2. Especially from other PCs on the LAN. Clearly the virtual machine that is WSL2 Ubuntu-20,04 needs some gateway / routing to access it from my LAN. The WSL2 Ubuntu-20.04 system can see all my other LAN attached PCs and I can SSH to any of them from WSL2 Ubuntu-20.04. The answer to this problem seems to be just knowing what hostname / ip address the WSL2 server makes available for each server it hosts, on the LAN. NOTE: If I start WSL2 Ubuntu-20.04 and run cmd 'sudo hostname' I get the same name as my Win 10 hosting PC (i.e. IAWSX-1) So how do I ping the my WSL2 Ubuntu-20.04 Server if it shares the same name as its Win10 host but hides its ports from Win 10 ? JUST DID another test where I installed a clean WSL2 + only One WSL2 Linux (Ubuntu-20.04) - when I only have one WSL2 Linux installed, I can access to ports ok and this WSL2-Ubuntu-20.04 reports the same dotted ip address as the Win10 host PC. So the problem appears to be that when more than one Linux distro is installed, the distros no longer share the Win10 hosts dotted ip address but allocate an internal one that is not visible to other PCs. |
/dupe #4150 |
Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report! |
I just did a further test that showed my problem is due to having more than one Linux distro installed (I had previously had Ubuntu 18.04 & added Ubuntu 20.04 whil upgrading). The moment I added the 20.04 distro, I was no longer able to access either 18.04 or 20.04 remotely other than via 'localhost' on the hosting Win10 PC. My short term fix is to remove the 18.04 distro. |
Environment
Windows [Version 10.0.19042.450]
Ubuntu 20.04 LTS
The issue is on WSL 2
The text was updated successfully, but these errors were encountered: