Skip to content

Instantly share code, notes, and snippets.

@r0mdau
Created June 6, 2023 22:56
Show Gist options
  • Save r0mdau/394d1ede7db8acb8fc13d23cecd418e6 to your computer and use it in GitHub Desktop.
Save r0mdau/394d1ede7db8acb8fc13d23cecd418e6 to your computer and use it in GitHub Desktop.
Windows port-forward to WSL2
# port forwarding
netsh interface portproxy add v4tov4 listenport=8090 listenaddress=0.0.0.0 connectport=8080 connectaddress=127.0.0.1
# allow in firewall
netsh advfirewall firewall add rule name=”WSL2 Forward Port 8090” dir=in action=allow protocol=TCP localport=8080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment