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 ping didn't work as well as cannot install any packages(dns resolution problem) #8621

Closed
1 of 2 tasks
joyahamad074 opened this issue Jul 16, 2022 · 2 comments
Closed
1 of 2 tasks

Comments

@joyahamad074
Copy link

Version

Version 10.0.19044.1826

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

5.10.16

Distro Version

No response

Other Software

No response

Repro Steps

I have face some issue on wsl2 which is installed my windows 10. When I try to ping something it didn't work as well as i cannot install the package also.

If i try to ping sudo ping google.com it says ping: google.com: Temporary failure in name resolution
If i try to ping sudo ping 8.8..8.8 or 1.1.1.1 then it just print this one line PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data. and 100% packet loss.

but if i try to ping my windows host ip is like 192.168.0.106 then it successfully ping with no packet loss.

and when I try to sudo apt update or sudo apt-get update then it shows:

Ign:1 https://http.kali.org/kali kali-rolling InRelease
Ign:1 https://http.kali.org/kali kali-rolling InRelease
Ign:1 https://http.kali.org/kali kali-rolling InRelease
Err:1 https://http.kali.org/kali kali-rolling InRelease
  Temporary failure resolving 'http.kali.org'
Reading package lists... Done
W: Failed to fetch https://http.kali.org/kali/dists/kali-rolling/InRelease  Temporary failure resolving 'http.kali.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.

like this.

So what is the problem is here I also edit /etc/resolv.conf with nameserver 8.8.8.8 or try other public ip like 1.1.1.1
but it didn't also work.

Can anyone please help me to how to solve this dns resolution problem

Expected Behavior

Because of dns resolution problem I cannot ping any ip or dns as well as cannot install kali packages

Actual Behavior

Because of dns resolution problem I cannot ping any ip or dns as well as cannot install kali packages

Diagnostic Logs

No response

@ashemedai
Copy link

ashemedai commented Jul 21, 2022

Check the IP address of your eth0 with ip addr | grep eth0 and verify that this netblock and/or your vEthernet is not blocked by your firewall. Also see e.g. https://stackoverflow.com/questions/63784906/firewall-blocking-wsl-2

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
None yet
Projects
None yet
Development

No branches or pull requests

2 participants