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

Windows Firewall block WSL2 accessing to Windows service #5237

Closed
eromoe opened this issue May 20, 2020 · 3 comments
Closed

Windows Firewall block WSL2 accessing to Windows service #5237

eromoe opened this issue May 20, 2020 · 3 comments

Comments

@eromoe
Copy link

eromoe commented May 20, 2020

Test code:

winip=$(ip route | grep default | awk '{print $3}')
ping $winip

result:
image

Actually I want to use a proxy service host on windows . I saw many people success with above command, why I faied ? Or wsl2 go into new problem ?

@therealkenc
Copy link
Collaborator

There isn't enough to go on here to guess why you can't ping your default route on (if I am interpreting correctly) WSL1.

@eromoe
Copy link
Author

eromoe commented May 21, 2020

I can provide what you need if you tell me how to do , I have totally no clue to investigate it .

@eromoe eromoe changed the title WSL2 can not access windows ip retreived by ip route | grep default | awk '{print $3} Windows Firewall block WSL2 accessing to Windows service May 23, 2020
@eromoe
Copy link
Author

eromoe commented May 23, 2020

I found it due to windows firewall. Add exclude rule of wsl.exe in firewall didn't work, I saw several cases include me had to shutdown firewall to make wsl able to access windows service .

Since this is common usage of wsl2, people shouldn't need shutdown firewall . It is system/wsl resposibility to make wsl2 bypass firewall at default .

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

No branches or pull requests

2 participants