I have upgraded to Ubuntu 12.10 and I have made entries in /etc/hosts, but instead of looking into the hosts file, queries to my configured DNS server are being made first.
How can I make Ubuntu query the /etc/hosts file first?
Thanks.
|
Turns out I am a massive buffoon; The Hope that helps someone! |
|||
|
|
host www.somesite.comwhere "www.somesite.com" is an entry in my hosts file, I seem to always get the IP given out by my DNS server which is different to that in my hosts file. Sometimes it works, mostly it doesn't though. – javano Oct 21 '12 at 12:07filesis listed BEFOREdnsunderhostsin/etc/nsswitch.conf? This is the definition of the order in which they will be queried. – Celada Oct 21 '12 at 14:42cat nsswitch.conf | grep hostshosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 – javano Oct 21 '12 at 14:53