2

Yesterday the internet connection was working correctly and I accepted software updates.Today I can reach the default gateway, the dns servers (8.8.8.8) but no internet address such as www.google.com through ping. And of course no browser is working or internet service (dropbox). Checked with Ethernet cable and with wireless connection.

The laptop is a macbook pro 2007 running ubuntu 14.04 with triple boot. The network connection works perfectly form the windows 8.1 installation.

Any hint on how to get internet connection on ubuntu again?

Cheers

1

How does your /etc/resolv.conf file look like?

Try this command: sudo echo "nameserver 8.8.8.8" > /etc/resolv.conf

or

Do it manually by open the resolv.conf file and put in the DNS server you'd like use.

  • @ElderGeek I do believe he is attempting to answer the question. – Seth Mar 29 '15 at 18:24
  • Thank you for the help, this worked fine. But now I don't know what happened. Why did it stopped working in the first place. Does this means that it is going to use only the first google dns from now on? – Ubuser Mar 29 '15 at 19:31
1

I think you should check new location.

Add your nameserver to/etc/resolvconf/resolv.conf.d/base.

Afterwards, run resolvconf -u.

  • At first I tried in the header file but it didn't worked. Apparently it works editing directly resolv.conf – Ubuser Mar 29 '15 at 22:28
0

If this is a desktop edition, you'd have to use network-manager to check your DNS servers. This can be done by clicking the network icon in the taskbar(bottom right) (if on wifi, it has a wifi symbol, if on ethernet it has a plug-like symbol) and selecting edit connections. Then double-click on your connection and proceed to IPv4 settings. Here, you can add the 8.8.8.8 DNS server. When adding DNS servers, however, I'd recommend you also change the dropdown box which says DHCP to DHCP for address only, so the DHCP doesn't supply you with a DNS server as well. (If you want to do this, you'll also need a router IP, which can be obtained by typing route -4 -n at commandline. It will give output like this:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.0.2        0.0.0.0         UG    6      0        0 home
10.0.0.0        0.0.0.0         255.0.0.0       U     0      0        0 home
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo

Simply use the Gateway value as your router.

If it's a server edition, you can follow @Kasper's instructions:

sudo echo "nameserver 8.8.8.8" > /etc/resolv.conf

or manually edit the resolv.conf file and put in the dns server you'd like use.

  • Why wouldn't you want DHCP to provide yoour DNS server? – Elder Geek Mar 29 '15 at 17:45
  • @Elder Geek Because, from the question, it seems that the DHCP is providing invalid DNS servers since the requests aren't resolving. – Wilhelm Erasmus Mar 29 '15 at 18:42
  • Yes that was the first thing that I tried. But it seems that it seems to be ignoring the dns servers or something. – Ubuser Mar 29 '15 at 19:22
  • Have you tried doing a dig? With a dig you can specify the dns server or leave it out to use the default. – Wilhelm Erasmus Mar 29 '15 at 19:23
  • @WilhelmErasmus What is a dig? – Ubuser Mar 29 '15 at 22:24
0

The problem is probably because of the package resolvconf, see man page.

It is used to simplify adding and removing DNS servers from different sources. So the previous contents of /etc/resolv.conf is now managed by the the program resolvconf(8).

So, if you manage your network from /etc/network/interfaces, which is is good for servers, you just add dns-nameservers and dns-search for the right interface. See man page for resolveconf(8).

If it is from NM, I don't have a qlue, probably add to the static settings for the interfaces. If managed from DHCP, it should be set anyway.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.