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
  • 1
    Take the reference to the DNS server out of your network configuration so that it doesn't appear in /etc/resolv.conf Commented Nov 22, 2017 at 10:32

1 Answer 1

5

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

hosts:          files

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

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.