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" not saved.

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
hack3rcon
Posts: 746
Joined: 2015-02-16 09:54
Has thanked: 48 times

"resolv.conf" not saved.

#1 Post by hack3rcon »

Hello,
I edited "resolv.conf" file and added some servers to it and save the file, but when I reboot the system, my configuration lost.
Why?

Thank you.

User avatar
sickpig
Posts: 589
Joined: 2019-01-23 10:34

Re: "resolv.conf" not saved.

#2 Post by sickpig »

hack3rcon wrote:Why?
The first 2 lines of /etc/resolv.conf will tell you who or what populated it.

hack3rcon
Posts: 746
Joined: 2015-02-16 09:54
Has thanked: 48 times

Re: "resolv.conf" not saved.

#3 Post by hack3rcon »

sickpig wrote:
hack3rcon wrote:Why?
The first 2 lines of /etc/resolv.conf will tell you who or what populated it.
What does it mean? I solved this problem with an extra program but I wanted to know how can I do it without third-party.

User avatar
sickpig
Posts: 589
Joined: 2019-01-23 10:34

Re: "resolv.conf" not saved.

#4 Post by sickpig »

what is the output of

Code: Select all

cat /etc/resolv.conf

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: "resolv.conf" not saved.

#5 Post by p.H »

hack3rcon wrote:What does it mean?
It means that you should cooperate with the program which created resolv.conf if you want to add persistent entries.
Typically NetworkManager, resolvconf, dhclient...
Or install resolvconf if not installed and hope that the above program (such as dhclient and NetworkManager) cooperates with it.

In any case, do not set the file immutable with chattr. It may have issues or even be uneffective if /etc/resolv.conf is a symlink pointing to a tmpfs.

Post Reply