Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

resolv.conf reset on reboot

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
satimis
Posts: 536
Joined: 2004-09-11 11:50
Location: Hong Kong

resolv.conf reset on reboot

#1 Post by satimis »

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

peter_irich
Posts: 1403
Joined: 2009-09-10 20:15
Location: Saint-Petersburg, Russian Federation
Been thanked: 11 times

Re: resolv.conf reset on reboot

#2 Post by peter_irich »

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.

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

Re: resolv.conf reset on reboot

#3 Post by satimis »

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

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

Re: resolv.conf reset on reboot

#4 Post by pylkko »

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

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

Re: resolv.conf reset on reboot

#5 Post by satimis »

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

Post Reply