LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-22-2014, 11:54 AM   #1
redwhat
LQ Newbie
 
Registered: Sep 2014
Posts: 21

Rep: Reputation: Disabled
/etc/resolv.conf problem


hi

i have error from selinux
i put the nameserver of 208.67.222.222 [opendns]
now i have some problem with,
i don't remember that default setting in /etc/resolv.conf
some 1 can tell me what they are?
 
Old 09-22-2014, 01:15 PM   #2
netnix99
Member
 
Registered: Jun 2011
Distribution: redhat, CentOS, OpenBSD
Posts: 298

Rep: Reputation: 99
It should typically just be two lines:

search mydomainname.com
nameserver IP_of_DNS_Server

If you are using DHCP, and have all of the associated fields pre-defined in the DHCP configuration, Network Manager will automatically create and update this file, simply restart your network services and it will be reverted back to the settings contained in the DHCP SEerver configuration.
 
1 members found this post helpful.
Old 09-23-2014, 01:28 AM   #3
redwhat
LQ Newbie
 
Registered: Sep 2014
Posts: 21

Original Poster
Rep: Reputation: Disabled
1sec..

i have problem with selinux :

SELinux is preventing /usr/sbin/NetworkManager from unlink access on the file .

i really want to keep dns of opendns what i can do about this >?

this is my /etc/resolv.conf :

# Generated by NetworkManager
nameserver 208.67.222.222 + 208.67.220.220


i try before this :
# Generated by NetworkManager
nameserver 208.67.222.222
nameserver 208.67.220.220


but it still give me error in Selinux

Last edited by redwhat; 09-23-2014 at 02:54 AM.
 
Old 09-23-2014, 07:35 AM   #4
netnix99
Member
 
Registered: Jun 2011
Distribution: redhat, CentOS, OpenBSD
Posts: 298

Rep: Reputation: 99
I will assume you are using DHCP. If so, you can edit /etc/dhclient.conf and insert the line:
Code:
supersede domain-name-servers 208.67.222.222, 208.67.222.222;
This will cause NetworkManager to rewrite the /etc/resolv.conf file with the new information.
 
Old 09-23-2014, 07:39 AM   #5
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Try a "restorecon /etc/resolv.conf"

The security label is likely incorrect. The above command will restore the security context for the file.
 
Old 09-24-2014, 01:46 AM   #6
redwhat
LQ Newbie
 
Registered: Sep 2014
Posts: 21

Original Poster
Rep: Reputation: Disabled
netnix99 thank you it seems to work
jpollard thank you too.
 
  


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
resolv.conf problem? brixtoncalling Slackware 16 05-26-2010 04:45 AM
DNS Hosts.conf or resolv.conf problem mac_casey SUSE / openSUSE 0 03-26-2006 09:21 AM
problem with resolv.conf roddyguk Linux - Software 8 01-18-2006 12:57 PM
Problem with resolv.conf divdude Linux - Networking 6 08-01-2005 09:43 PM
Resolv.conf problem saurya_s Linux - Software 3 01-11-2004 12:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:12 AM.

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