Unable to query DNS with DOMAIN from dnsmasq
server
When doing nslookup, dnsmasq server could not reply the DNS with DOMAIN, but able to reply short dns name only. Following message may appear.
# nslookup www
....
dnsmasq server can't find www.example.com: NXDOMAIN
Solution
The reason is that DNS entries in dnsmasq host file (default is banner_add_hosts
) has no domain name
192.168.1.1 www
In dnsmasq.conf
file
Following lines are required. The expand-hosts
option allows appending the domain name defined in domain
line to short hostname in host file
domain=example.com,192.168.1.0/24
expand-hosts