Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

portproxy not systematically correctly configured for localhost #8707

Open
hyamanieu opened this issue Aug 9, 2022 · 3 comments
Open

portproxy not systematically correctly configured for localhost #8707

hyamanieu opened this issue Aug 9, 2022 · 3 comments

Comments

@hyamanieu
Copy link

hyamanieu commented Aug 9, 2022

cmd.exe /c ver

Microsoft Windows [Version 10.0.19043.1826]

wsl.exe --status

Default Distribution: Ubuntu
Default Version: 2

Windows Subsystem for Linux was last updated on 5/11/2022
The Windows Subsystem for Linux kernel can be manually updated with 'wsl --update', but automatic updates cannot occur due to your system settings.
To receive automatic kernel updates, please enable the Windows Update setting: 'Receive updates for other Microsoft products when you update Windows'.
For more information please visit https://aka.ms/wsl2kernel.

lsb_release -r

20.04

I would like to mention the last comment from a closed issue although there is as of August 2022 still an issue with this:
See post by @rehantoday in #4636 (comment)_

The solution he or she quotes does work. We then need to manually add the proxy, e.g. doing netsh interface portproxy set v4tov4 8080 172.24.133.133 8080 0.0.0.0

localhost forwarding should be automatic.

Last week, there was no such issues. It appeared randomly as mentioned in above closed issue by several people within this year 2022.

@MkrierPharmanity
Copy link

same issue

@arthurfiorette
Copy link

arthurfiorette commented Jun 19, 2023

Any updates or fixes?

Running

netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=PORT connectaddress=localhost connectport=PORT 
# or
netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=PORT connectaddress=0.0.0.0 connectport=PORT 

Don't work, unless I use the correct static IP, but WSL ips aren't static, meaning that I'll have to run this command on every wsl startup.

I did a tempfix by setting WSL with a static ip.

@Wladastic
Copy link

netsh interface portproxy add v4tov4 listenport=7860 listenaddress=0.0.0.0 connectport=7860 connectaddress=$(wsl hostname -I)

But it doesnt always work...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants