resolv.conf reset on reboot

Post your Debian questions here.

resolv.conf reset on reboot

Postby satimis » August 27th, 2017, 3:13 pm

Hi all,

Debian 9.1.0

$ sudo nano /etc/resolv.conf
adding
Code: Select all
nameserver      8.8.8.8
nameserver      8.8.4.4


$ sudo chattr +i /etc/resolv.conf
Code: Select all
chattr: Operation not supported while reading flags on /etc/resolv.conf


After reboot the entries on /etc/resolv.conf is reset with all entries deleted.

Please help. Thanks

Regards
satimis
satimis
 
Posts: 3
Joined: August 27th, 2017, 3:06 pm

Re: resolv.conf reset on reboot

Postby cynwulf » August 29th, 2017, 10:12 am

resolv.conf is often overwritten by dhclient, dhcpd, 'resolvconf' or some other software which provides DHCP client functionality (or itself calls dhclient).

Changing the file attributes may not work in Debian and probably isn't a viable option anyway now that Debian uses systemd.

Previously under sysvinit, setting the name servers in /etc/network/interfaces did the job, this was very Debian specific and I'm sure this file is not used anymore under systemd. You will need to configure this via whatever network management you have installed or via systemd's configuration. It's best to search the web, but don't bother with the Debian wiki as it's seems to be woefully out of date in this regard.
"What, are you... uh... undercover or something?"
"No, I'm underpaid."
User avatar
cynwulf
 
Posts: 2380
Joined: April 26th, 2011, 2:46 pm

Re: resolv.conf reset on reboot

Postby Monsie » August 31st, 2017, 3:23 pm

Hello satimis,

It is likely that Network Manager is overwriting your dns settings to a default value. That being the case, just use the GUI in Network Manager to configure your dns server. Note that you will only be able set one server when using this method. To add the additional google server, you will need to prepend dhclient.conf Once either of these steps are done, you will see the final changes in resolv.conf

Hope this helps,
Monsie
My username is pronounced: "Munsee" and is based on my nick name in High School.
Monsie
 
Posts: 70
Joined: January 17th, 2016, 11:11 pm

Re: resolv.conf reset on reboot

Postby satimis » August 31st, 2017, 3:29 pm

Hi all,

Thanks for your advice.

Problem solved after installing resolvconf

Regards
satimis
satimis
 
Posts: 3
Joined: August 27th, 2017, 3:06 pm


Return to General Questions

Who is online

Users browsing this forum: Bing [Bot], Yandex [Bot] and 1 guest

x