I have a local DNS set up in OSX (192.168.1.100) which is configured to return the IP address of servers on my local network for specific domain names (they're all hosted on a NAS, which also hosts the DNS server.)
These are valid TLDs that I own (.net root) with no DNS records on the public Internet. I.E. I own my-local-domain.net
registered with a public registrar and it has no records on any DNS servers outside my local network.
I have verified the local DNS server is responding with dig
through terminal:
My-MacBook-Pro:~ me$ dig my-local-domain.net @192.168.1.100
; <<>> DiG 9.10.6 <<>> my-local-domain.net @192.168.1.100
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13199
;; flags: qr aa rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;my-local-domain.net. IN A
;; ANSWER SECTION:
my-local-domain.net. 0 IN A 192.168.1.100
;; Query time: 3 msec
;; SERVER: 192.168.1.100#53(192.168.1.100)
;; WHEN: Wed Sep 11 20:18:36 +07 2019
;; MSG SIZE rcvd: 53
Chrome and Firefox both show "IP address cannot be found" error messages (ERR_NAME_NOT_RESOLVED in Chrome.)
Meanwhile, Safari resolves the correct local IP address and displays the expected content, however one of the services I'm running does not support it - therefore this is not a valid workaround.
My system DNS settings set the local server as the primary resolver, with Cloudflare's 1.1.1.1 and Google's 8.8.8.8 as secondary and tertiary respectively.
I have tried flushing my local DNS cache several times through the terminal.
Why don't Firefox and Chrome respect my local resolver, while Safari does?
I installed Firefox after setting up the local DNS resolver, if it makes any difference.
The anonymised terminal output above accurately reflects both input and output from the dig
command.
Dans-MacBook-Pro:~ dancowell$ scutil --dns
DNS configuration
resolver #1
search domain[0] : localdomain
nameserver[0] : 192.168.1.100
nameserver[1] : 1.1.1.1
nameserver[2] : 8.8.8.8
flags : Request A records
reach : 0x00020002 (Reachable,Directly Reachable Address)
resolver #2
domain : local
options : mdns
timeout : 5
flags : Request A records
reach : 0x00000000 (Not Reachable)
order : 300000
resolver #3
domain : 254.169.in-addr.arpa
options : mdns
timeout : 5
flags : Request A records
reach : 0x00000000 (Not Reachable)
order : 300200
resolver #4
domain : 8.e.f.ip6.arpa
options : mdns
timeout : 5
flags : Request A records
reach : 0x00000000 (Not Reachable)
order : 300400
resolver #5
domain : 9.e.f.ip6.arpa
options : mdns
timeout : 5
flags : Request A records
reach : 0x00000000 (Not Reachable)
order : 300600
resolver #6
domain : a.e.f.ip6.arpa
options : mdns
timeout : 5
flags : Request A records
reach : 0x00000000 (Not Reachable)
order : 300800
resolver #7
domain : b.e.f.ip6.arpa
options : mdns
timeout : 5
flags : Request A records
reach : 0x00000000 (Not Reachable)
order : 301000
DNS configuration (for scoped queries)
resolver #1
search domain[0] : localdomain
nameserver[0] : 192.168.1.100
nameserver[1] : 1.1.1.1
nameserver[2] : 8.8.8.8
if_index : 5 (en0)
flags : Scoped, Request A records
reach : 0x00020002 (Reachable,Directly Reachable Address)
scutil --dns
dig
scutil --dns
above./etc/resolv.conf
has the same nameservers as seen in the output fromscutil
- I have not edited that file myself, all configuration has been done in the MacOS System Preferences application.scutil
and copied the wrong output. I've put everything back to how it was originally and can still reproduce the problem. I've also updated the question with my current scutil output.