Access WSL from WLAN

Hello together,

here just a little Text about how to access WSL from internal WLAN.

All you need is to the following:

  1. Find the IP Address of the WSL on the Host Computer, for this open the Powershell and write the following:wsl hostname -I
  2. Now you will get the IP-Address of the WSL.
  3. Now you can take the IP-Address from your Computer in the LAN/WLAN by running this Command in the Powershell:ipconfigand here just look for your IPv4-Address in your Adapter.
  4. Open Powershell on the WSL Host and type in (here we use the Port 80 – you can change this to a Port you like):

netsh interface portproxy add v4tov4 listenport=80 listenaddress= connectport=80 connectaddress=IPADDRESS_WSL

5. Disable the Windows Defender Firewall for this forwarding.

And now you can Access to the WSL through the WLAN/LAN we pointing the IP Address of the Computer which is hosting the WSL.

I hope i could Help you!