No network access from WSL/Ubuntu

Microsoft Windows [Version 10.0.19043.1081] Ubuntu 20.04.2 LTS

I worked through the instructions for installing wsl for windows 10, from:

However, I cannot connect to the internet from Ubuntu. I switched off the firewall as suggested here:

But still could not connect.

There are a few things I have tried already but they did not resolve the problem (see below). As in the FAQ page:

Thanks!


From Ubuntu terminal I tried to install: curl | bash (6) Could not resolve host: get.volta.sh

so I tried: ping 8.8.8.8 ping: connect: Network is unreachable

I already posted a request for that but the problem is network access: [4

Some of the troubleshooting steps I have tried (which did not work)

  1. Disabled the firewall.
  2. Re-installed ubuntu.
  3. BT (my internet provider), port forwarding:
  4. Checked Network Connection settings
    Ethernet Properties
    vEthernet Properties (WSL)
    Hyper-V Virtual Ethernet Adapter
    Internet Protocol Version 4 (TCP/IPv4) -checked
    Internet Protocol Version 6 (TCP/IPv6) -checked
    Hyper-V Extensible Virtual Switch -unchecked
  5. Checked Device Manager (View Hidden) Network adapters > Hyper-V Virtual Ethernet Adapter Properties
    Device status - This device is working properly.
  6. Turn Windows features on and off
    Uncheck Windows Subsystem for Linux
    Windows needs to reboot your PC to finish the requested changes
    Recheck Windows Subsystem for Linux
    Windows needs to reboot
  7. Change the nameserver sudo nano /etc/resolv.conf
    '# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/resolv.conf
    '# [network]
    '# generateResolvConf = false
    nameserver xxx.xx.xx
    Change the name server to 8.8.8.8 and save the file. You should now be able to connect to the internet.
    -even restarted ubuntu, same error after restarting and the nameserver seems to be reset to default
  8. Flush DNS Open Powershell or Cmd as Administrator
    and run each of these commands:
    wsl --shutdown
    netsh winsock reset
    netsh int ip reset all
    netsh winhttp reset proxy
    ipconfig /flushdns
    Hit the Windows Key,
    type Network Reset,
    hit enter.
    You should see this window.
    Click "Reset now".
    Restart Windows
1 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like