AmmarRahman/wsl-vpn

Question about the FAQ: expose a port from WSL2

Closed this issue · 1 comments

I read this FAQ "What if I'm trying to expose a port from WSL2?" the answer state "Unforunately, this solution will not allow you to expose a port when on or off of VPN" but it is not clear if the limitation believes to:

  1. Connection from Windows host -> to WSL2
  2. Connection from a different physical machine -> to a port exposed from wsl2 inside windows host

If the answer is (1) this pone a serious limit because no service running in WSL could be reached from windows.
There are some workaround available?

I think when I wrote that line, local host did not work. But I was quickly reminded in sakai135/wsl-vpnkit#30 that localhost was supposed to work, and it appears that localhost still works. I should probably update the line in the readme.

Simple command: python3 -m http.server
Using Windows Defender Firewall and Sonicwall VPN. Results may vary

Testing on the windows host, both on and off VPN:

Looks like localhost was the only thing to work out of the many IPs I tried.