4

I cannot ping any website when I am using WSL for windows 10.

--- google.com ping statistics ---
14 packets transmitted, 0 received, 100% packet loss, time 38567ms

is the result when I try ping google.com I am using windows 10 with IPv4, disabled IPv6. I can ping google.com normally without wsl on my regular command prompt

user3369850
  • 117
  • 3
  • 8
  • Did you check if Windows Firewall blocks connection from WSL? – Biswapriyo Sep 14 '18 at 18:22
  • @Biswapriyo Where can i specify windows fire wall to allow WSL? My firewall is currently being used by Avast Internet security and I tried disabling Avast firewall but it still doesn't work – user3369850 Sep 14 '18 at 19:29

1 Answers1

0

Probably you've got some DNS issue, here is how I solved it:

Run on linux terminal:

$ sudo nano /etc/resolv.conf

Then, you change the DNS IP to google's - 8.8.8.8, write the file. Example of the file you will need to edit

To assert, run:

$ ping google.com
desertnaut
  • 57,590
  • 26
  • 140
  • 166