On 23 Feb 2016, at 15:44, Peter wrote:

On 23/02/16 08:57, Curtis Maurand wrote:
The problem was in the /etc/nsswitch.conf.

I changed the line

hosts:       files dns

to

hosts:        dns files

and that solved the trouble.

You likely want this to be, "files dns", otherwise with dns listed first
you will find that you can't override DNS entries from /etc/hosts.

Also, when someone breaks/hacks whatever you're using for DNS resolution so that localhost resolves to a compromised host in Shanghai, you could end up very unhappy. Do not let DNS tell you the address of localhost or the names of IP addresses in the loopback blocks (IPv4 & IPv6) unless you can justify absolute trust in your DNS resolver and everything it uses for resolution.

Reply via email to