resolv.conf reset on reboot

If none of the more specific forums is the right place to ask

resolv.conf reset on reboot

Postby satimis » 2017-08-27 13:41

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: 497
Joined: 2004-09-11 11:50
Location: Hong Kong

Re: resolv.conf reset on reboot

Postby peter_irich » 2017-08-27 17:56

Install resolvconf and place desired dns servers addresses in /etc/network/interfaces:
Code: Select all
dns-nameservers ip1 ip2 ... ipn

In normal /etc/resolv.conf is a symlink:
Code: Select all
lrwxrwxrwx 1 root root 29 Jul 24  2016 /etc/resolv.conf -> ../run/resolvconf/resolv.conf


Peter.
peter_irich
 
Posts: 1194
Joined: 2009-09-10 20:15
Location: Saint-Petersburg, Russian Federation

Re: resolv.conf reset on reboot

Postby satimis » 2017-08-28 01:02

peter_irich wrote:Install resolvconf and place desired dns servers addresses in /etc/network/interfaces:
Code: Select all
dns-nameservers ip1 ip2 ... ipn

In normal /etc/resolv.conf is a symlink:
Code: Select all
lrwxrwxrwx 1 root root 29 Jul 24  2016 /etc/resolv.conf -> ../run/resolvconf/resolv.conf


Peter.

Hi Peter,

Your advice works for me. Thanks

Regards
satimis
satimis
 
Posts: 497
Joined: 2004-09-11 11:50
Location: Hong Kong

Re: resolv.conf reset on reboot

Postby pylkko » 2017-08-28 03:54

This question was asked last one month ago on this forum. You would get answers to questions more rapidly if you'd search a bit before asking.

That resolv.conf is overwritten is how it is supposed work
https://wiki.debian.org/NetworkConfiguration
User avatar
pylkko
 
Posts: 1174
Joined: 2014-11-06 19:02

Re: resolv.conf reset on reboot

Postby satimis » 2017-08-28 04:07

pylkko wrote:This question was asked last one month ago on this forum. You would get answers to questions more rapidly if you'd search a bit before asking.

That resolv.conf is overwritten is how it is supposed work
https://wiki.debian.org/NetworkConfiguration

Hi,

Thanks for your advice.

I have been googling a while before posting. There were many suggestions.

In the past running;
Code: Select all
$ sudo chattr +i /etc/resolv.conf

worked for me. I was searching on this direction.

Regards
satimis
satimis
 
Posts: 497
Joined: 2004-09-11 11:50
Location: Hong Kong


Return to General Questions

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable