I am new to Linux. I was thinking that I had trouble with the wifi driver until I found out that I could connect to the web when I use a VPN. My Internet was working fine until today. I need to be able to connect to the web without using a VPN.
The messages I get are below:
Firefox can’t find the server at On the 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 I have tried:
$ sudo /etc/init.d/network-manager restart [ ok ] Restarting network-manager (via systemctl): network-manager.service. 01 Answer
Finally, it works with both:
$ sudo mv /etc/resolv.conf /etc/backup.resolv.conf $ ifconfig and see the name of your network adapter. Mine is: enp0s31f6
now run this command
$ sudo nano /etc/network/interfaces and you should get something inside....delete everything and paste this (but change the network adapter name where enp0s31f6 is):
# 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 save the document and reboot...
In my case I had only in /etc/network/interfaces the three lines below
# interfaces(5) file used by ifup(8) and ifdown(8) auto lo iface lo inet loopback I had to add on top
# 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/* and below:
# The primary network interface auto enp0s31f6 iface enp0s31f6 inet dhcp