resolv.conf

vi /etc/resolv.conf

add following line in the file

nameserver 8.8.8.8
nameserver 8.8.4.4

nsswitch.conf

Edit the nsswitch.conf file vi /etc/nsswitch.conf and change the hosts line to read:

“hosts: dns files”

Which means, for programs that want to resolve an address. They should use the dns feature first, and the /etc/hosts file if the DNS servers are not available or can’t resolve the address.

Advertisements