resolv.conf Always gets reset when server was rebooted

Posted by Darwin Biler on June 29, 2014

This is one of the annoying things that happened to me in my CentOS box. The DCHP and network manager always overwrites the values in resolv.conf when the box is rebooted. In my case, its always being set to 192.168.1.1 which is the IP of the modem that my ISP had given.
What is my problem with my ISP's nameserver is is its so shitty and always gives me 404 errors all over the place. So I rather manually set my nameserver in my box to counter their crappy nameserver.

To do this, edit the /etc/rc.d/rc.local using root account and make it look like below

This will basically overwrite the default configuration after all initialization stuffs is done.


Did you find this useful?

I'm always happy to help! You can show your support and appreciation by Buying me a coffee (I love coffee!).