Mojave DNS Settings Revert After Reboot

TLDR: I am having an issue with my System Preferences > Network > DNS settings reverting to a cached manually-entered DNS IP address (that no longer exist in my network environment) upon Mac reboot.


-----------


Within System Preferences, I formerly had a manually-entered DNS IP pointing to a PiHole address for ad-blocking. I have since moved towards letting my router handle this, so this is no longer necessary. Once I delete the custom, manually-entered DNS IP address "in-session", it pulls the DNS address auto-assigned by DHCP and all is well with my Mac's connectivity.


The problem occurs when I reboot my Mac. I find myself without network connectivity and the culprit is that the custom DNS IP address is back in my DNS settings. It's like it's "stuck". I have tried to renew the DHCP lease, rebooted my router, etc; but the issue reoccurs after every reboot. Obviously I shouldn't have to manually remove the custom entry every time.


Any ideas?

MacBook Pro Retina

Posted on Jun 6, 2021 8:28 PM

Reply
Question marked as Top-ranking reply

Posted on Jun 13, 2021 8:35 PM

BobTheFisherman,


So, interesting development:


I booted into Safe Mode and was able to verify that my “auto-assigned from DHCP Server” DNS Settings stuck successfully.


I then proceeded to reboot normally, and those same auto-assigned settings persisted under normal boot as well!


I then attempted a second reboot after this revelation, and the auto-assigned DNS remained in place!


What in the world? I wouldn’t have expected a Safe Boot to “uncorrupt” my Network Settings, however that appears to be exactly what happened here…

Similar questions

16 replies
Question marked as Top-ranking reply

Jun 13, 2021 8:35 PM in response to BobTheFisherman

BobTheFisherman,


So, interesting development:


I booted into Safe Mode and was able to verify that my “auto-assigned from DHCP Server” DNS Settings stuck successfully.


I then proceeded to reboot normally, and those same auto-assigned settings persisted under normal boot as well!


I then attempted a second reboot after this revelation, and the auto-assigned DNS remained in place!


What in the world? I wouldn’t have expected a Safe Boot to “uncorrupt” my Network Settings, however that appears to be exactly what happened here…

Jun 7, 2021 7:10 PM in response to Zach Foster

May not need all this but...


Make a New Location, Using network locations in Mac OS X ...


System Preferences>Network, top of window>Locations>Edit Locations, little plus icon, give it a name.


System Preferences>Network, click on the little gear at the bottom next to the + & - icons, (unlock lock first if locked), choose Set Service Order.


The interface that connects to the Internet should be dragged to the top of the list.


Sys Prefs>Network>highlight the Interface you're using>Advanced>TCP/IP>Configure IPv4: Using DHCP.


If using Wifi, instead of joining your Network from the list, click the WiFi icon at the top, and click join other network. Fill in everything as needed.


System Preferences>Network>choose interface>Advanced>Proxies Tab, make sure none are set, like for HTTP & HTTPS.


System Preferences>Network, unlock the lock if need be, highlight the Interface you use to connect to Internet, click on the advanced button, click on the DNS tab, click on the little plus icon, then add these numbers...


8.8.8.8

8.8.4.4

1.1.1.1

9.9.9.9


Apply.

Jun 13, 2021 3:12 PM in response to Zach Foster

Something seems to running that you're not awaee of.


EtreCheck is a FREE simple little diagnostic tool to display the important details of your system configuration and allow you to copy that information to the Clipboard. It is meant to be used with Apple Support Communities to help people help you with your Mac. It will not display any personal info.

https://www.etrecheck.com/


Pastebin is a good place to paste the whole report if you capture the URL while there…

https://pastebin.com/

Whew, they've changed pastebin & made it harder, but after pasting in, click Create new paste button, then Embed button, then copy the URL...

<script src="https://pastebin.com/embed_js/KuvnghqA"></script>


The important part of the above is...


https://pastebin.com/embed_js/KuvnghqA


Workable but harder for me to work with...the Note tool on the bottom of this editor's toolbar, as shown in the image, to copy and paste the output from EtreCheck. In a Reply before you click post, look for this to add longer texts...

Jun 7, 2021 2:45 PM in response to Zach Foster

Hello Zach,


Thanks for reaching out to us in Apple Support Communities about setting a custom DNS server on your network, we're happy to help by looking into this more! 


If you set this custom DNS server on your router and your Mac is connected to the router you will see the same DNS server on your Mac, this is expected. Here's a resource that can provide some more info about custom DNS servers:


Specify a DNS server on Mac


Hope this helps.


Best Regards.


Jun 7, 2021 3:58 PM in response to c_luc9

c_luc9,


You are correct, however that is not the case here.


As stated in my original post, successful network connectivity is restored once I remove the custom DNS entry from my Mac's local Network settings, ie: when it pulls the automatic assignment from my router.


The problem that precipitated this forum post is that AFTER reboot, my custom DNS entry reappears in my Mac's local Network settings. Resetting NVRAM and sudo killall -HUP mDNSResponder; sleep 2; within Terminal make no difference.


How do I force my Mac to FORGET my static DNS entry, and consistently seek out my router's automatic assignment upon every reboot?

Jun 13, 2021 2:42 PM in response to BDAqua

Unfortunately I wish it were that easy. I’m running a cable modem > Google Nest Wifi (DHCP server turned off) > PiHole (acting as my DHCP server handing out DNS).


As stated, when I manually clear the static DNS entry, all behaves expected in-session with the correct DNS auto-assigned from the PiHole DHCP. Once I reboot the laptop, it forgets that I’m auto-assigning from the DHCP server and inserts the inactive static DNS entry back into my Network Preferences.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Mojave DNS Settings Revert After Reboot

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.