4

I want to disable DNS lookups via DNS server and only resolve host names that are listed in /etc/hosts. I am on Raspbian 9. How would I set this up?

  • 1
    Take the reference to the DNS server out of your network configuration so that it doesn't appear in /etc/resolv.conf – Raman Sailopal Nov 22 '17 at 10:32
4

Remove dns from hosts field in /etc/nsswitch.conf:

hosts:          files

You might also want to remove the DNS servers from /etc/resolv.conf.

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.