User Tools

WSL

bind ports from external

source : https://stackoverflow.com/questions/61002681/connecting-to-wsl2-server-via-local-network

in powershel as administrator

netsh interface portproxy add v4tov4 listenport=3000 listenaddress=0.0.0.0 connectport=3000 connectaddress=172.30.16.3
redirect the port 3000 to wsl2 address 172.30.16.3 (ip addr)

need to create a firewall rule :

netsh advfirewall firewall add rule name= "Open Port 3000" dir=in action=allow protocol=TCP localport=3000

memory leak

To prevent memory leak :

/mnt/c/Users/myuser/.wslconfig

[wsl2]
memory=2GB

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also, you acknowledge that you have read and understand our Privacy Policy. If you do not agree, please leave the website.

More information