3

I setup my DHCP server to assign three DNS servers:

  • 10.0.1.3 - my own internal DNS server for hosting private A records for my home network
  • 208.67.222.222 - Open DNS
  • 208.67.220.220 - Open DNS

My internal DNS server uses the Open DNS servers for forwarding The idea being that if my self hosted DNS server isn't availabe clients will just fall back to open DNS.

In Sonoma I have the three DNS servers and nslookup resolves my internal host, but I cannot ping or resolve internal hosts by name.

scutil --dns
DNS configuration

resolver #1
  search domain[0] : home
  nameserver[0] : 10.0.1.3
  nameserver[1] : 208.67.220.220
  nameserver[2] : 208.67.222.222
  if_index : 6 (en0)
  flags    : Request A records
  reach    : 0x00020002 (Reachable,Directly Reachable Address)
MBP:~ paul$ nslookup unifi
Server:     10.0.1.3
Address:    10.0.1.3#53

Name:   unifi.home
Address: 10.0.1.3
MBP:~ paul$ ping unifi
ping: cannot resolve unifi: Unknown host
MBP:~ paul$ ping unifi.home
ping: cannot resolve unifi.home: Unknown host

What gives?

6
  • If you remove home as a search domain, does it work? I think you need to use .local to signify a mDNS item (or at least you're not looking up). I believe there is no RFC for .home per this answer that seems well sourced. I haven't needed mDNS for my ubiquity setups, but there are some people who have reported various setups working if it doesn't just all work.
    – bmike
    Commented Jan 15 at 23:40
  • 2
    macOS doesn't treat its DNS server list as having any sort of priority order, it's just an unordered pool. So trying to use it like this just won't work. Your main options are to add entries to /etc/hosts, or create a file in /etc/resolver/ pointing .home queries only to the internal DNS server. See "In OS X, how can I prepend 127.0.0.1 to the list of DNS servers obtained through DHCP?" over on superuser. Commented Jan 15 at 23:41
  • Gordon is correct - you have to choose your router DNS only if you plan to inject local values from there. I'm guessing you're not making any DNS entries and hoping it just all works, which for me is using .local on the Mac side and leaving the router alone. I have only the router for DNS on my networks so consider dropping the 2/3 ones?
    – bmike
    Commented Jan 15 at 23:48
  • I can’t use mdns because I have many apps in docker on one host. The easiest solution seemed to be to run my own dns with search domain specified so I can just reference them by name. I didn’t want it to be a single point of failure which is why I added secondary and tertiary dns. I guess I will have to remove them and only have one dns server Commented Jan 16 at 0:43
  • @PaulWieland You want your local DNS to be smart enough to forward lookups it can't resolve, not just send NXDOMAIN for them. Then you don't need the others. Commented Jan 16 at 22:10

1 Answer 1

2

Since macOS doesn't split DNS queries like other OS - I would simplify your problem by removing nameservers 208.67.220.220 and 208.67.222.222 from the picture and have only one DNS defined for macOS - the DNS and IP from your router.

Have it do any subsequent lookups against the two DNS servers on the 208.67.x.x network.

Your docker situation means mDNS may not be the fix that it is in my case. You may need more configuration, but let's make sure macOS can't work with only one DNS server to query.

2
  • 1
    Thank you! I changed DHCP server to assign 10.0.1.1 (router) as the DNS provider. I then set my Unifi router up so that it queries 10.0.1.3 first and then openDNS second. My first tests seem to work, but I need to do some more testing to be sure. Commented Jan 16 at 12:57
  • Wonderful @PaulWieland I didn’t know how to incorporate your DNS. So glad you could incorporate that on top of the router stack.
    – bmike
    Commented Jan 16 at 14:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .