I have a couple of local domains resolved to 127.0.0.1 in my /etc/hosts file. And it was all alright for a period of time but now when I run:
nslookup test.local
It results in:
Server: 192.168.1.3
Address: 192.168.1.3#53
** server can't find test.local: NXDOMAIN
The 192.168.1.3 is our network DNS and it's not supposed to know my local domain test.local. After a couple of searches I found that /etc/nsswitch.conf file holds information on the priority of the DNS sources to query by. But there was no problem there! Here's mine:
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
passwd: compat
group: compat
shadow: compat
hosts: files mdns4_minimal [NOTFOUND=return] dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
So does anyone know why my hosts file is not included in DNS look-up?