4

WSL2 - Fix Internet connectivity behind corporate proxy

 2 years ago
source link: https://gist.github.com/mandeepsmagh/f1d062fc59e4e6115385c2609b5f0448
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

This fixes the issue! Thanks.

If you are unable to edit and save /etc/resolv.conf

  • check if the flag immutable is set >
    'lsattr /etc/resolv.conf'
    ----i--------------- /etc/resolv.conf

Remove the flag by
'sudo chattr -i /etc/resolv.conf'

Should work now

Joeboyc2 commented on May 9

Worked for me too, seems like such a simple fix, tried so many over the last few months and nothing worked.

Thank you

Joeboyc2 commented on May 10

Unfortunatly, this seems to have stopped working since restarting my laptop :(

I have tried running the same steps a few times, but no luck, I even converted the install back to wsl v1 and then back to v2, but still no luck

Swapping back to wsl v1 and all works fine, other than it being very slow to run stuff :(

Author

mandeepsmagh commented on May 12

Unfortunatly, this seems to have stopped working since restarting my laptop :(

I have tried running the same steps a few times, but no luck, I even converted the install back to wsl v1 and then back to v2, but still no luck

Swapping back to wsl v1 and all works fine, other than it being very slow to run stuff :(

Most likely settings are being overwritten after reboot.

microsoft/WSL#5420

Have a look at this troubleshooting guide as well in case it helps.

https://docs.microsoft.com/en-us/windows/wsl/troubleshooting

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


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK