Watch the video:
Timestamps:
0:00 - Intro/Explanation
0:55 - Port Forward to Ubuntu WSL/Linux WSL
2:50 - Removing a forwarded port
Hosting programs or servers on Ubuntu or another WSL? Want to share them over the internet, but having issues with ports and not being able to access? This video shows you how to do the crucial step you’re likely missing: Forward Ubuntu’s (or WSL’s) ports to Windows, so they can be sent off to the network and/or internet.
Port Forward command: netsh interface portproxy add v4tov4 listenport=2000 listenaddress=0.0.0.0 connectport=2000 connectaddress=$($(wsl hostname -I).Trim());
List forwarded ports: netsh interface portproxy show v4tov4
Delete forwarded port: netsh interface portproxy delete v4tov4 listenaddress=0.0.0.0 listenport=2000