Can't browse the internet nor ping a host, but dig works

I have found that the problem lies in this file /etc/nsswitch.conf. In that file dns entry was missed. After adding that entry i am able to browse the sites.

NSSWITCH


You need to add dns to /etc/nsswitch.conf on the line that starts with hosts:. For example, mine has

hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4

which I think is the default in natty.

It would be good to know if your setup was broken by some software, as it is highly uncommon (and difficult to diagnose) if the name service switch facility is not using the default settings.


It seems that you've got connectivity to the Internet (dig works ok, DNS replies are good), so perhaps it's a higher-level issue, like proxy setup.

So, have you checked your system's proxy settings?

Tags:

Dns

Networking