0

I installed PinguyOS on a friends computer. This computer is now displaying the following strange behaviour:

  1. Unable to set custom network. There seems to be only a provision for DHCP based networking.
  2. While custom network was set using /etc/network/interfaces using a fixed IP address, gateway and netmask, the network monitor shows data inflow and outflow, but ping www.google.com results in Unable to resolve www.google.com
  3. It was verified that the IP address was working with the Internet functioning, on another computer (No! Two computers are not using the same IP address, I am just changing cables.).
  4. The IP address was pinged and was found that one can ping from one computer to the computer having PinguyOS. It was also possible to ping the internal IPs from this computer.
  5. All settings for IP address, netmask, gateway and DNS servers were checked and rechecked again.

What could be the problem?

  • What does /etc/resolv.conf contain? Are you able to ping external IPs (e.g. ping 8.8.8.8)? – Joseph R. Jul 26 '14 at 9:49
  • It contains nameserver 127.0.0.1 – Indian Jul 26 '14 at 12:34
1

You indicate that your /etc/resolv.conf contains only nameserver 127.0.0.1. This means your DNS server is configured to be the local host and the local host isn't able to resolve host names. So it's one of two things:

  1. This is intentional. You have configured a DNS server on your local machine and its configuration is off somehow. You'll need to check the logs for any errors it threw.
  2. This is accidental and you wanted to set your name server to the gateway router instead (usually, but not necessarily, 192.168.1.1).

If the earlier is the case, the solution lies with you to figure out how the DNS server was mis-configured. If you want help with that, please provide more information about it.

If the latter is the case, then you need to modify /etc/resolv.conf to make sure it reads:

nameserver <IP address of your gateway router>

In the unlikely case that your router isn't configured to provide DNS services, you can make use of Google's public DNS servers:

nameserver 8.8.8.8
nameserver 8.8.8.4

In any case, it can't hurt to have them as back up should your ISP's DNS fail. So the best /etc/resolv.conf would be:

nameserver <IP address of your gateway router>
nameserver 8.8.8.8
nameserver 8.8.8.4

That said, you need to ensure that no other package is generating /etc/resolv.conf automatically; otherwise, your changes will be clobbered as soon as the interface is restarted. On my Debian, for example, the package resolvconf, if installed, handles the generation of /etc/resolv.conf when you add lines like

dns-nameserevers 8.8.8.8

in the /etc/network/interfaces for the interface in question.

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.