O Subsistema Linux para Windows não pode acessar a Internet

3

Por alguma razão, meu Bash no Ubuntu no Windows não consegue acessar a Internet.

Ou seja. quando eu faço

sudo apt-get update

Eu recebo um monte de buscas com falha. Exatamente como o problema descreve sob este link .

Eu tentei todas as soluções sugeridas, mas nenhuma delas parece funcionar.

Coisas que tentei:

  • adicionando 8.8.8.8 a /etc/resolv.conf ,
  • adicionando meu gateway padrão a /etc/resolv.conf
  • desativando o IPv6,
  • executando no Modo Administrativo,
  • desinstalando e reinstalando o Bash,
  • desativando meu antivírus.

Aqui está o meu resolv.conf:

#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 2001:4860:4860::8888
    
por Joe 10.08.2016 / 16:36

2 respostas

4

Assumindo que "desabilitando meu antivírus * você quer dizer desabilitando meu antivírus / firewall , esteja ciente de que desabilitar o firewall nem sempre é suficiente dependendo do que você usa. A solução atual (insatisfatória) é desinstalar o firewall.

Esta e outras recomendações podem ser encontradas na postagem a seguir dos desenvolvedores do Linux Subsystem for Windows:

Fonte: link

It has been very helpful to see experience with various firewalls. We are very aware of the issues and are looking into it. Unfortunately, this is something that will probably take some time. We did release WSL as a beta knowing that there would be some issues and are working hard to address things.

Here's the state of the world as I know it when it comes to firewalls / no network:

Outbound Traffic

Kaspersky: Needs to be uninstalled for internet access in WSL

Avast: Needs to be uninstalled for internet access in WSL

Bitdefender: Firewall must be disabled to get internet access in WSL.

AVG: Looks like they have done some work in AVG 2016 (learned this on thread #475). Not certain what they have done, but it is interesting to note.

Windows Firewall: Must have unchecked "Outbound rules that do not match a rule are denied"

Inbound Traffic

Still looking into this one. Using WSL as a server was not one of our core priorities for the Anniversary Update. It is something we want to support in the future.

Ping

Ping must be run with Windows Administrator privileges We are doing a little more due diligence before reaching out to the firewall providers. I will also update the FAQ with more information when found (have a very bare bones placeholder there now).

    
por 11.08.2016 / 12:39
0

No firewall do Windows, adicione uma permissão / exceção para o programa:

C: \ Windows \ System32 \ wsl.exe

E seja feliz.

    
por 20.10.2017 / 15:36