Não consigo me conectar à internet sem usar minha VPN com o Ubuntu 16.04 LTS [duplicado]

2

Eu sou novo no Linux. Eu estava pensando que tinha problemas com o driver do Wi-Fi até descobrir que podia me conectar à Web quando usava uma VPN. Minha Internet estava funcionando bem até hoje. Preciso conectar-me à Web sem usar uma VPN.

As mensagens que recebo estão abaixo:

Firefox can’t find the server at www.google.com.

No terminal:

$ uname -a  
Linux MisterX 4.4.0-66-generic #87-Ubuntu SMP Fri Mar 3 15:29:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

$ ping google.com
ping: unknown host google.com

$ dig google.com  
; <<>> DiG 9.10.3-P4-Ubuntu <<>> google.com
;; global options: +cmd
;; connection timed out; no servers could be reached

$ ping ping 216.58.208.78
PING 216.58.208.78 (216.58.208.78) 56(84) bytes of data.
64 bytes from 216.58.208.78: icmp_seq=1 ttl=48 time=230 ms
64 bytes from 216.58.208.78: icmp_seq=2 ttl=48 time=226 ms
64 bytes from 216.58.208.78: icmp_seq=3 ttl=48 time=249 ms
64 bytes from 216.58.208.78: icmp_seq=4 ttl=48 time=224 ms
^C
--- 216.58.208.78 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3002ms
rtt min/avg/max/mdev = 224.005/232.736/249.737/10.094 ms

$ dig 216.58.208.78
; <<>> DiG 9.10.3-P4-Ubuntu <<>> 216.58.208.78
;; global options: +cmd
;; connection timed out; no servers could be reached

$ sudo nano /etc/nsswitch.conf
passwd:         compat
group:          compat
shadow:         compat
gshadow:        files

hosts:          files mdns4_minimal [NOTFOUND=return] dns
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis

Eu tentei:

$ sudo /etc/init.d/network-manager restart
[ ok ] Restarting network-manager (via systemctl): network-manager.service.
    
por MisterX 12.03.2017 / 06:34

1 resposta

2

Por fim, funciona com os dois:

Primeiro ( link )

$ sudo mv /etc/resolv.conf /etc/backup.resolv.conf

Em seguida, execute ( link )

$ ifconfig

e veja o nome do seu adaptador de rede. O meu é: enp0s31f6

agora execute este comando

$ sudo nano /etc/network/interfaces

e você deve obter algo dentro .... delete tudo e cole isto (mas mude o nome do adaptador de rede onde enp0s31f6 é):

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback


# The primary network interface
auto enp0s31f6
iface enp0s31f6 inet dhcp

salve o documento e reinicie ...

No meu caso eu só tinha em / etc / network / interfaces as três linhas abaixo

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

Eu tive que adicionar no topo

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

e abaixo:

# The primary network interface
auto enp0s31f6
iface enp0s31f6 inet dhcp
    
por MisterX 14.03.2017 / 01:46