System Management

A RHEL server uses NetworkManager. An administrator adds a nameserver line to /etc/resolv.conf, but the line is gone after the next reboot. Which action BEST makes the DNS server setting persistent?

Show the answer

Correct answerB. Set the DNS server on the connection profile with nmcli connection modify and the ipv4.dns property

NetworkManager regenerates /etc/resolv.conf from the connection profile, so the DNS server must be set in the profile, for example with nmcli and ipv4.dns. Changing permissions is tempting, but root-owned services can still replace the file, and it leaves the profile wrong.