Glam Prestige Journal

Bright entertainment trends with youth appeal.

I'm running macOS 10.14.6.

If I do not have ethernet plugged in, and go to Network -> WiFi -> Advanced -> DNS, I have the default DNS servers A.A.A.A and B.B.B.B. These servers are grayed out and I cannot remove them. If I add a custom DNS server it replaces these defaults, and if I remove the custom server the defaults come back.

Looking at /etc/resolv.conf, the two nameservers listed match those above:

domain x.y.com
nameserver A.A.A.A
nameserver B.B.B.B

Now, if I plug in ethernet and view the default DNS servers in the same way as above, I see the servers C.C.C.C and D.D.D.D. Looking at /etc/resolv.conf, I see that the previous default servers have been overwritten:

domain u.v.com
nameserver C.C.C.C
nameserver D.D.D.D

However, if I go back to the WiFi DNS settings, I still see the same defaults of A.A.A.A and B.B.B.B. This implies the defaults must be defined somewhere besides /etc/resolv.conf. Where are these definitions located, and can I change them?

2 Answers

macOS's DNS configuration is handled by the "System Configuration" system (configd, /Library/Preferences/SystemConfiguration, scutil, et al.) which handles most of macOS's network settings. To see all the DNS servers the system knows about and what kinds of queries it will send where, run scutil --dns.

macOS's DNS resolution system is a bit more sophisticated than the old Unix flat files like /etc/resolv.conf, because in modern times people have situations where they want different kinds of queries to go to different sets of DNS servers. For example, if you have a VPN connection to work, and you work at example.com, you might want all queries for example.com to go through your VPN tunnel to the internal-horizon DNS servers at work, while you might want all the rest of your queries to go to your home ISP's DNS servers for lower latency (and so no snooping sysadmin at work can snoop on the non-work DNS queries your system happens to be dispatching while you happen to have the VPN link up).

2

I bet your network has DHCP and that DNS is set by it.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy