Can resolve using nslookup but not ping on Linux

In my case this was I believe caused by avahi lookups taking priority.

In nsswitch.conf I had:

1
hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4

I changed this to:

1
hosts:          files dns mdns4_minimal [NOTFOUND=return] dns mdns4

and all was well.

3 Comments

  1. rmp says:

    I don’t think you need the second ‘dns’ in the new line.

  2. new299 says:

    Probably not, but it works now. 🙂

  3. rmp says:

    tbh on most servers you shouldn’t need anything other than “files dns”

Leave a Reply