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

WSL2 networking fail with Windows Shadowsocks #6143

Closed
Aaronself opened this issue Oct 24, 2020 · 11 comments
Closed

WSL2 networking fail with Windows Shadowsocks #6143

Aaronself opened this issue Oct 24, 2020 · 11 comments
Labels

Comments

@Aaronself
Copy link

Environment

my windows is Win2004 19041.572

After I install the Ubuntu-18.04 for WSL2. I try the sudo apt-get update and i didn't not work.
Then I try to change the apt sources from mirrors.aliyun.com and i didn't not work too.
so i search in the Internet and find that someone say it maybe the DNS problem, but i try to
ping www.baidu.com and ping 111.1.167.116 it can work.

and now i will show you the what it returns when sudo apt-get update
Err:1 http://mirrors.aliyun.com/ubuntu bionic InRelease connection failed [IP: 183.146.18.248 80] Err:2 http://mirrors.aliyun.com/ubuntu bionic-security InRelease connection failed [IP: 183.146.18.248 80] Err:3 http://mirrors.aliyun.com/ubuntu bionic-updates InRelease connection failed [IP: 183.146.18.248 80] Err:4 http://mirrors.aliyun.com/ubuntu bionic-proposed InRelease connection failed [IP: 183.146.18.248 80] Err:5 http://mirrors.aliyun.com/ubuntu bionic-backports InRelease connection failed [IP: 183.146.18.248 80] Reading package lists....Done W: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/bionic/InRelease Connection failed [IP: 183.146.18.248 80] W: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/bionic-security/InRelease Connection failed [IP: 115.233.31.228.80] W: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/bionic-updates/InRelease Connection failed [IP: 115.233.31.229 80] W: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/bionic-proposed/InRelease Connection failed [IP: 183.131.210.242 80] W: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/bionic-backports/InRelease Connection failed [IP: 183.131.210.250 80] W: Some index fiels failed to download. Then have been ignored, or old ones used instead

@sirredbeard
Copy link
Contributor

Can you ping other websites from WSL?

Do you have third-party security or firewall software installed?

@Aaronself
Copy link
Author

yes I try to ping www.baidu.com and i did work
I use the ShadowsocksR in windows, and i just use windows defender, dose it matter?

@mzq592
Copy link

mzq592 commented Oct 25, 2020

Should be the same as #4285.
Try echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null

@Aaronself
Copy link
Author

do you mean the DNS problem?
i try to add these lines in my /etc/resolv.conf
nameserver 8.8.8.8 nameserver 5.5.5.5 nameserver 4.4.4.4
but it did not work. sad story

@mzq592
Copy link

mzq592 commented Oct 25, 2020

I encountered the same error and changing dns fixed it. I guess it's different then.

@Aaronself
Copy link
Author

thank you, but maybe i have a different problem

@todes-l33ter
Copy link

Ah friend of mine had the same issue, i told him to try it without sudo - and it worked

@Aaronself
Copy link
Author

i tried but it shows
Reading package lists... Done
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)

@therealkenc
Copy link
Collaborator

ShadowsocksR

Effectively dupe #4402 (message) #4507. Do the proxy inside WSL2.

Whether this is discussion/by-design is hard to say. Depends on how WSL2 networking writ large plays out. We can leave this one an open LZ for the shadowsocks scenario (the two above are closed).

@therealkenc therealkenc changed the title Cannot use sudo apt-get update WSL2 networking fail with Windows Shadowsocks Oct 26, 2020
@Aaronself
Copy link
Author

i only use the SSR in windows.
In WSL, i just download the ubuntu in microsoft store and install it. change the /etc/apt/sources.list and change the /etc/resolv.conf file, but i find the sudo apt-get update did not work.
So i attempt to convert the wsl2 to wsl1. In wsl1, it can communicate with the windows network instead of an other IP address

Copy link
Contributor

This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.

Thank you!

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

No branches or pull requests

5 participants