LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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, 12:54 PM   #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, 02:15 PM   #2
netnix99
Member
 
Registered: Jun 2011
Distribution: redhat, CentOS, OpenBSD
Posts: 298

Rep: Reputation: 98
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, 02: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 03:54 AM.
 
Old 09-23-2014, 08:35 AM   #4
netnix99
Member
 
Registered: Jun 2011
Distribution: redhat, CentOS, OpenBSD
Posts: 298

Rep: Reputation: 98
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, 08:39 AM   #5
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,712

Rep: Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279
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, 02: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


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

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

All times are GMT -5. The time now is 11:05 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