Affected versions: CentOS Stream 10

📖 ~1 min read

Table of contents
  1. Symptom & Impact
  2. Environment & Reproduction
  3. Root Cause Analysis
  4. Quick Triage
  5. Step-by-Step Diagnosis
  6. Solution – Primary Fix
  7. Solution – Alternative Approaches
  8. Verification & Acceptance Criteria
  9. Rollback Plan
  10. Prevention & Hardening
  11. Related Errors & Cross-Refs
  12. References & Further Reading

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.

Illustrative mockup for centos-stream-10 — cp229_diag
NetworkManager dns plugin debug log — Illustrative mockup — Progressive Robot

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.

Illustrative mockup for centos-stream-10 — cp229_fix
dns=none with manual resolv.conf override — Illustrative mockup — Progressive Robot

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.

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.