I'm setting up a local network and have configured a DNS server. I can resolve hostnames by querying the DNS server, but no programs can look them up.
I uninstalled libnss-mdns and removed avahi-daemon and even rebooted afterwards.
Here are some examples:
root@cloud2:~# host ns.example.com ns.example.com has address 10.10.10.100 root@cloud2:~# ping ns.example.com ping: unknown host ns.example.com root@cloud2:~# grep hosts /etc/nsswitch.conf hosts: files dns
my ntp server is configured for ns.example.com, but all I get is nxdomain on ntpq
This also applies to external DNS entries. I have my router both as a DNS forwarder on the custom DNS server and as an entry in resolvconf.
root@cloud2:~# host google.com | head google.com has address 188.8.131.52 google.com has address 184.108.40.206 google.com has address 220.127.116.11 google.com has address 18.104.22.168 google.com has address 22.214.171.124 google.com has address 126.96.36.199 google.com has address 188.8.131.52 google.com has address 184.108.40.206 google.com has address 220.127.116.11 google.com has address 18.104.22.168 root@cloud2:~# traceroute google.com google.com: Temporary failure in name resolution Cannot handle "host" cmdline arg `google.com' on position 1 (argc 1)