Replies: 1 comment
-
Just to clarify, if I add an entry for each website to my hosts file with 127.0.0.1 on the host machine everything works as expected. It's only when I try to use the LAN IP of the host machine that it fails, even though this is what all other machines on the network are using... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Earlier today I switched from WSL1 to WSL2. As the title suggests, I can't connect to a website running on WSL2 from the host machine despite being able to connect from my phone without issue. I am however able to connect to the WSL2 instance with VSCode. I presume this is some kind of firewall problem but I'm not sure where to start...
Here's my .wslconfig:
And here are the commands I've tried as specified in the docs (I gather only one is required but I tried both for good measure!):
I need to be able to access the websites on WSL2 from any machine on the LAN (including my own, which is the host). I have a local DNS server which allows machines on the LAN to find the host with any .localdev domain lookup, removing the need for a host file entry for each website on every machine.
Hope someone can help!
Beta Was this translation helpful? Give feedback.
All reactions