3 ms·
On localhost it's available by default on Windows side. If you'd like to access it by your machine's IP from a different machine on the LAN, you just need to ru
by matsemann 4y ago
On localhost it's available by default on Windows side. If you'd like to access it by your machine's IP from a different machine on the LAN, you just need to run a single command to add a proxy for it.
netsh interface portproxy add v4tov4 listenport=8001 listenaddress=0.0.0.0 connectport=8001 connectaddress=172.24.75.111
where connectaddress is whatever you get from running ifconfig on wsl side. Edit: Might also use localhost instead of IP as the connectaddress, as the IP might change. Depends on what your server software handles of bindings.
Depending on your machine configuration, you might need to open the port in your firewall as well, ala
netsh advfirewall firewall add rule name="Allowing connections on 8001" dir=in action=allow protocol=TCP localport=8001
- glitchc 4y agoKudos! This should be an answer to a StackOverflow question somewhere so that a broader audience can find it.
- matsemann 4y agoKudos should go to the SO question that showed me it, then ;) But for some reason hidden under RoR. https://stackoverflow.com/a/66485783/923847 https://stackoverflow.com/a/66485783/923847
- jahnu 4y agoPraise be!