Created
September 4, 2021 01:33
-
-
Save mpcen/688a3db9f0bf2947e7f5c408e591bb00 to your computer and use it in GitHub Desktop.
Forward a local port of an application running in WSL 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Open an admin powershell: | |
`netsh interface portproxy add v4tov4 listenport=PORT listenaddress=0.0.0.0 connectport=PORT connectaddress=IP_WSL2_MACHINE` | |
More info: https://www.williamjbowman.com/blog/2020/04/25/running-a-public-server-from-wsl-2/ | |
and: https://www.youtube.com/watch?v=yCK3easuYm4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
example:
netsh interface portproxy add v4tov4 listenport=3000 listenaddress=0.0.0.0 connectport=3000 connectaddress=172.20.58.179