LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 11:50 AM   #1
PROBLEMCHYLD
Senior Member
 
Registered: Apr 2015
Posts: 1,201

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, 12:03 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,138

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
Is Network Manager running?
 
Old 02-10-2019, 12:22 PM   #3
PROBLEMCHYLD
Senior Member
 
Registered: Apr 2015
Posts: 1,201

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

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
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, 12:54 PM   #5
PROBLEMCHYLD
Senior Member
 
Registered: Apr 2015
Posts: 1,201

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, 01:54 PM   #6
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,055

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

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, 02:05 PM   #8
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,792

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
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, 04:01 PM   #9
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,055

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, 04:09 PM   #10
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,792

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
just I don't know how will networkmanager handle the situation. I think it will fail in this case.
 
Old 02-10-2019, 04:27 PM   #11
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,055

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, 05:04 PM   #12
PROBLEMCHYLD
Senior Member
 
Registered: Apr 2015
Posts: 1,201

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 02-14-2019, 02:04 AM   #13
FlinchX
Member
 
Registered: Nov 2017
Distribution: Slackware Linux
Posts: 666

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.
 
Old 03-26-2019, 11:55 PM   #14
PROBLEMCHYLD
Senior Member
 
Registered: Apr 2015
Posts: 1,201

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
This method is very aggressive and I love it. Thanks!!!!!!
 
  


Reply



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 09:21 AM
resolv.conf is not updated automatically metalyric Linux - Networking 9 06-04-2004 05:51 AM
/etc/resolv.conf configuration when behind a router(not a linux router) rmanocha Linux - Networking 2 04-28-2004 01:52 AM
File permissions not sticking, DMA not working... Gveto Linux - General 11 12-17-2002 02:00 PM
anaconda post-install error - resolv.conf not found anamika Linux - Distributions 3 09-19-2002 03:37 PM

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

All times are GMT -5. The time now is 10:09 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
Open Source Consulting | Domain Registration