While deploying DNS Server, I came across a strange issue with the Resolv.conf file is automatically getting overwritten after a reboot of the server.
Solution:
Step1: Open NetworkManager.conf file using vim file editor
# vim /etc/NetworkManager/NetworkManager.conf
Step2: Add the following into the main section of NetworkManager.conf file and save the file
[main]
dns=none
Step3: Restart the NetworkManager.service
#sudo systemctl restart NetworkManager.service
Step4: Add the DNS Servers in etc/resolv.conf file
#nameserver 1.1.1.1
Now /etc/resolv.conf file will have same DNS Server which is configured even after reboot.
0 comments:
Post a Comment