Note - I believe my title is the way it's meant to be...
I used dnsmasq on my server and it sets DNS (via DHCP) to clients as:
192.168.2.1 (local server) ISP DNS 1 ISP DNS 2 This at least works - in my Ubuntu client sudo nmcli dev list | grep DNS gives
IP4.DNS[1]: 192.168.2.1 (local) IP4.DNS[2]: 122.56.237.1 (ISP 1) IP4.DNS[3]: 210.55.111.1 (ISP 2) However, if I execute ping mail.mydomain.org it returns the external internet address instead of the local network.
nslookup shows that Ubuntu's network manager is at work (matching nmcli above), and states the external IP for my domain is Non-Authoritative. When I change to server 192.168.2.1, the search just gives me the local IP.
My (client's) resolve.conf ends up with
nameserver 172.20.1.153 nameserver 172.20.1.6 nameserver 127.0.1.1 Is the primary at the bottom? It's what nslookup seems to use...
So how can this happen? What should I do to fix it? (I certainly want to keep a secondary DNS). I've tried just having the local DNS server, but dnsmasq can't seem to forward anything no matter what config I change (the documentation isn't helpful either, since it seems that it should "just forward" by default).
And note that while my analysis is on Ubuntu, the same is happening on a Mac too.
/etc/resolv.conf?resolv.confshould be the same asnmcli. Linux's resolver will be usingresolv.confas the authoritive list of resolvers, therefore the issue is why Network Manager isn't updatingresolv.conf. Doesresolv.confhave a remark to the effect that it was generated by NetworkManager?