LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-10-2019, 12:50 PM   #1
PROBLEMCHYLD
Member
 
Registered: Apr 2015
Posts: 689

Rep: Reputation: Disabled
resolv.conf NOT sticking


I've added
Code:
nameserver 127.0.0.1
lookup file bind
to my resolv.conf file and it does NOT stay after reboot. How can I fix this? This is needed to run a private DNS over Tor.. Thanks
 
Old 02-10-2019, 01:03 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 & 7
Posts: 3,086

Rep: Reputation: 826Reputation: 826Reputation: 826Reputation: 826Reputation: 826Reputation: 826Reputation: 826
Is Network Manager running?
 
Old 02-10-2019, 01:22 PM   #3
PROBLEMCHYLD
Member
 
Registered: Apr 2015
Posts: 689

Original Poster
Rep: Reputation: Disabled
Yes!!
 
Old 02-10-2019, 01:33 PM   #4
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 12,009

Rep: Reputation: 3687Reputation: 3687Reputation: 3687Reputation: 3687Reputation: 3687Reputation: 3687Reputation: 3687Reputation: 3687Reputation: 3687Reputation: 3687Reputation: 3687
so resolv.conf is generated by networkmanager.
https://ma.ttias.be/centos-7-network...tcresolv-conf/
https://manpages.debian.org/jessie/n...conf.5.en.html see option dns
 
1 members found this post helpful.
Old 02-10-2019, 01:54 PM   #5
PROBLEMCHYLD
Member
 
Registered: Apr 2015
Posts: 689

Original Poster
Rep: Reputation: Disabled
This link worked for me,
Quote:
Originally Posted by pan64 View Post
so resolv.conf is generated by networkmanager.
https://ma.ttias.be/centos-7-network...tcresolv-conf/
using
Code:
dns=none
Thanks....
 
Old 02-10-2019, 02:54 PM   #6
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 8,712

Rep: Reputation: Disabled
Another way is to make /etc/resolv.conf immutable. As root:
Code:
chattr +i /etc/resolv.conf
 
Old 02-10-2019, 03:03 PM   #7
PROBLEMCHYLD
Member
 
Registered: Apr 2015
Posts: 689

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Didier Spaier View Post
Another way is to make /etc/resolv.conf immutable. As root:
Code:
chattr +i /etc/resolv.conf
I did read about that command but was hesitant because a lot of people opposed. How would you reverse the command?
 
Old 02-10-2019, 03:05 PM   #8
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 12,009

Rep: Reputation: 3687Reputation: 3687Reputation: 3687Reputation: 3687Reputation: 3687Reputation: 3687Reputation: 3687Reputation: 3687Reputation: 3687Reputation: 3687Reputation: 3687
see man chattr
Code:
The format of a symbolic mode is +-=[aAcCdDeijsStTu].

The  operator  '+'  causes  the  selected attributes to be added to the
existing attributes of the files; '-' causes them to  be  removed;
But anyway I do not suggest you to do that way.
 
Old 02-10-2019, 05:01 PM   #9
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 8,712

Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
But anyway I do not suggest you to do that way.
Why not?
 
Old 02-10-2019, 05:09 PM   #10
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 12,009

Rep: Reputation: 3687Reputation: 3687Reputation: 3687Reputation: 3687Reputation: 3687Reputation: 3687Reputation: 3687Reputation: 3687Reputation: 3687Reputation: 3687Reputation: 3687
just I don't know how will networkmanager handle the situation. I think it will fail in this case.
 
Old 02-10-2019, 05:27 PM   #11
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 8,712

Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
just I don't know how will networkmanager handle the situation. I think it will fail in this case.
No, it works. I sometime use that to avoid using the DNS servers of my web provider, not responsive at times.
 
Old 02-10-2019, 06:04 PM   #12
PROBLEMCHYLD
Member
 
Registered: Apr 2015
Posts: 689

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Didier Spaier View Post
No, it works. I sometime use that to avoid using the DNS servers of my web provider, not responsive at times.
I'll give your method a shot when I get my SSD and 16gb ram on a clean install Slackware64 in the near future. Thanks for multiple methods......
 
Old Yesterday, 03:04 AM   #13
FlinchX
Member
 
Registered: Nov 2017
Distribution: Slackware Linux
Posts: 285

Rep: Reputation: Disabled
Just for the record: if you're not using Network Manager but you're pulling network settings info via DHCP, your resolv.conf file may get overwritten as well. To prevent that, see /etc/rc.d/rc.inet1.conf and search for 'DHCP_KEEPRESOLV' setting there.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DNS Hosts.conf or resolv.conf problem mac_casey SUSE / openSUSE 0 03-26-2006 10:21 AM
resolv.conf is not updated automatically metalyric Linux - Networking 9 06-04-2004 06:51 AM
/etc/resolv.conf configuration when behind a router(not a linux router) rmanocha Linux - Networking 2 04-28-2004 02:52 AM
File permissions not sticking, DMA not working... Gveto Linux - General 11 12-17-2002 03:00 PM
anaconda post-install error - resolv.conf not found anamika Linux - Distributions 3 09-19-2002 04:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration