Skip to content

Latest commit

 

History

History
14 lines (9 loc) · 834 Bytes

wsl-manual.md

File metadata and controls

14 lines (9 loc) · 834 Bytes

On WSL2 host firewall has to be disabled or port has to be opened to be able to access from LAN. On WSL2 bridge with LAN can be done by running the following command on the WSL2 host(powershell or cmd):

netsh interface portproxy add v4tov4 listenport=[port] listenaddress=0.0.0.0 connectport=[port] connectaddress=[IP of WSL2 network adapter]

IP of WSL2 network adapter can be obtained on the WSL2 by hostname -I, server needs to be running on the same IP adress (not localhost).

From LAN network WSL2 can be accessed by IP of the WSL2 host and port. Only works for IPv4.

Accessing network applications with WSL

Not tested solution: Expose-WSL