Hi all, Please could someone help me with what I am doing wrong ?
I am running example.local domain on my interface(192.168.2.1) (bind9) The domain is resolving fine. However I want to use 1.1.1.1 public DNS server for looking up other domains (external domains) Hence I have put both servers in /etc/resolv.conf ``` nameserver 1.1.1.1 nameserver 192.168.2.1 search example.local``` However dig stops after it gets a null result from 1.1.1.1 and does not proceed to 192.168.2.1 to ask for server.example.local i.e ``` $ dig server.example.local ; <<>> DiG 9.17.21-1-Debian <<>> server.example.local ;; global options: +cmd ;; Got answer: ;; WARNING: .local is reserved for Multicast DNS ;; You are currently testing what happens when an mDNS query is leaked to DNS ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 11268 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 1232 ;; QUESTION SECTION: ;server.example.local. IN A ;; AUTHORITY SECTION: . 86400 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2022012400 1800 900 604800 86400 ;; Query time: 103 msec ;; SERVER: 1.1.1.1#53(1.1.1.1) (UDP) ;; WHEN: Mon Jan 24 10:03:50 GMT 2022 ;; MSG SIZE rcvd: 124 ``` WHEREAS if I switch the resolv.conf to have my DNS first (and then 1.1.1.1) , the local resolution works whereas external resolution does not work ``` nameserver 192.168.2.1 nameserver 1.1.1.1 search example.local``` $ dig +short server.example.local 192.168.2.2 <other local domain on other servers does not work anymore> Now, isnt the lookup supposed to fall back to next server if first one doesnt have an answer ? How does multiple DNS servers entry work in resolv.conf ? My nsswitch.conf is : hosts: files dns [NOTFOUND=merge] Please help. Regards Bhasker