LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 01-24-2010, 01:27 PM   #1
jmoschetti45
Member
 
Registered: Oct 2004
Location: Michigan
Distribution: Debian Squeeze (2.6.32-5)
Posts: 136
Blog Entries: 1

Rep: Reputation: 17
resolv.conf nameserver ordering/priorities


I know I can put several name servers in resolv.conf.

Thing is, I'm toying around with OpenNIC at the moment, so I have 3 of theirs in the list right now.

I'd like to also be able to use OpenDNS ones, because to some extent the filtering is nice for other people who connect to my router.

That said, the router is setup to use OpenDNS,and I simply have my own box setup to use OpenNIC.

Now, is there a way for me to set my box up to use OpenDNS, and if the query fails (eg: .inc .glue), have it automatically fall over to OpenNIC ones?
 
Old 01-24-2010, 01:40 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
it sounds like you actually want a local bind server to handle forwarding queries. resolv.conf just takes them in order, preferring a local host address if available.
 
Old 01-24-2010, 01:50 PM   #3
jmoschetti45
Member
 
Registered: Oct 2004
Location: Michigan
Distribution: Debian Squeeze (2.6.32-5)
Posts: 136
Blog Entries: 1

Original Poster
Rep: Reputation: 17
Any howto's on the subject?
 
Old 01-25-2010, 08:14 AM   #4
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 3,910

Rep: Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776
Quote:
Originally Posted by jmoschetti45 View Post
I know I can put several name servers in resolv.conf.
Provided that by 'several' you mean 'two, or fewer', that is completely correct (IIRC). Well, to be technically correct, you can put as many in as you want, it just won't use the ones after the second. Not that you'd necessarily want to do that, given the performance penalty...

Quote:
Thing is, I'm toying around with OpenNIC at the moment, so I have 3 of theirs in the list right now.

I'd like to also be able to use OpenDNS ones, because to some extent the filtering is nice for other people who connect to my router.
(Pardon me, but) Weird: you want to configure filtering to block certain sites - that I can understand. And then you want to configure it so that that the filtering sometimes doesn't work. That, I don't understand, but that's OK, too.

Quote:
Now, is there a way for me to set my box up to use OpenDNS, and if the query fails (eg: .inc .glue), have it automatically fall over to OpenNIC ones?
Well, if you put the OpenDNS one first and then the OpenNIC one, it will try one first and then, if the first server does not give a reply, it will try the other one. But, it will do this for every query, so it will always be slow for every query that does fall over to the second server, having had to wait for the timeout. It is only a stub resolver, after all.

(Err, and obviously, if it did use a third, that would be very slow.)

Quote:
Any howto's on the subject?
There probably are, but would you mind saying on which subject you wanted this how-to:
  • the use of a stub resolver
  • overview of the advantages and disadvantages of different name caching programs
  • how to install and/or configure some particular name server
 
Old 01-25-2010, 09:41 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
Sorry, ignore my comments, BIND doesn't have any way to prefer the order of nameservers. All goes to really suggest something's wonky in the logic of what you want to achieve.
 
Old 01-25-2010, 10:18 AM   #6
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,551
Blog Entries: 28

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
dnsmasq can be configured to use multiple DNS servers. Log inspection suggests it selects the fastest one at startup and dynamically adjusts once running.

dnsmasq is relatively easy to configure, too, except for some trickery to stop it querying upstream servers for the local domain defined in the hosts file, details here.
 
Old 01-25-2010, 11:27 AM   #7
jmoschetti45
Member
 
Registered: Oct 2004
Location: Michigan
Distribution: Debian Squeeze (2.6.32-5)
Posts: 136
Blog Entries: 1

Original Poster
Rep: Reputation: 17
I believe I'm just going to give up on this, it's a lot more technical than I was hoping and not worth the effort.

Point in having OpenDNS was I have the "filter time-wasters" or whatever it is (max filtering, blocks myspace/youtube/porn and such) set up so when friends/family come over and connect to my wireless, they don't waste all my bandwidth. I figured it'd be nice to have that option on my own box, simply because OpenDNS takes out a few odd pages here or there that come up once in a while.
 
  


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
NameServer Resolv Performance Problem instrumentpilot Linux - Networking 3 07-31-2009 10:21 AM
resolv.conf deletes nameserver entries Mirkridian Linux - Wireless Networking 1 02-19-2007 01:59 AM
router being added to resolv.conf as nameserver thatwouldbeme Linux - Networking 3 11-15-2006 12:44 PM
How to specify a default nameserver in /etc/resolv.con libregeek Linux - Networking 6 11-19-2005 11:41 AM
pppd: nameserver -> /etc/resolv.conf ?? tredegar Linux - Networking 6 03-21-2004 07:45 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration