📖 ~1 min read
Table of contents
Symptom & Impact
Custom DNS entries placed in /etc/resolv.conf are reverted every time NetworkManager activates a connection.
Environment & Reproduction
Occurs on hosts where administrators manage DNS manually but leave NM in default rc-manager mode.
Root Cause Analysis
NetworkManager regenerates resolv.conf from connection profiles unless its dns plugin is changed.
Quick Triage
Inspect /etc/NetworkManager/conf.d for dns settings and review nmcli connection show ipv4.dns values.
Step-by-Step Diagnosis
Run: nmcli connection show | grep -i dns; cat /etc/NetworkManager/NetworkManager.conf.

Solution – Primary Fix
Set dns=none in NetworkManager.conf or configure ipv4.dns on the active connection and reload.
Still having issues? Our Network Design team can diagnose and resolve this for you. Get in touch for a free consultation.

Solution – Alternative Approaches
Use systemd-resolved with NetworkManager dns=systemd-resolved for split DNS and stub resolver behaviour.
Verification & Acceptance Criteria
resolv.conf survives nmcli connection up and reboot, and dig returns expected resolvers.
Rollback Plan
Reset dns plugin to default and re-add DNS via connection profile if manual control is removed.
Prevention & Hardening
Define DNS in connection profiles or via DHCP options to eliminate manual file edits.
Related Errors & Cross-Refs
Linked to systemd-resolved conflicts and DHCP-supplied DNS overrides.
Related tutorial: View the step-by-step tutorial for centos-stream-10.
View all centos-stream-10 tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
NetworkManager.conf(5) and Red Hat networking guide DNS sections.
Need Expert Help?
If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today — we respond within one business day.