Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] multiple dns nameservers
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
mistake25
Tux's lil' helper
Tux's lil' helper


Joined: 20 May 2008
Posts: 144

PostPosted: Wed Sep 01, 2010 1:45 pm    Post subject: [solved] multiple dns nameservers Reply with quote

hi,

i run my own dns for my personal purposes, and i want to use it.
in /etc/resolv.conf i have two lines:
nameserver xxx.xxx.xxx.xxx (ip of public dns)
nameserver yyy.yyy.yyy.yyy (ip of my own dns)

and when i try to ping adress that is provided by my own dns i will get error unkown host, if i set my dns as first i'm able to ping that url and also i'm able to ping any other public url, but i don't want to have my own dn as primary server. what can i do to make it work?

thanks


Last edited by mistake25 on Wed Sep 01, 2010 8:43 pm; edited 2 times in total
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7585
Location: almost Mile High in the USA

PostPosted: Wed Sep 01, 2010 2:09 pm    Post subject: Reply with quote

I run my own caching DNS server using bind, and only use it in my resolv.conf as primary/only ... not sure what the problem is?

It also has local entries along with forwarding the non local machines upstream...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
mistake25
Tux's lil' helper
Tux's lil' helper


Joined: 20 May 2008
Posts: 144

PostPosted: Wed Sep 01, 2010 3:38 pm    Post subject: Reply with quote

if i set it as primary, everything works fine, but if i set it as secondary, it fails, and i want to use it as secondary
Back to top
View user's profile Send private message
doctork
Guru
Guru


Joined: 25 Apr 2004
Posts: 370
Location: Cleveland, OH

PostPosted: Wed Sep 01, 2010 4:38 pm    Post subject: Reply with quote

mistake25 wrote:
if i set it as primary, everything works fine, but if i set it as secondary, it fails, and i want to use it as secondary
I guess my answer would be, you can't. The resolver library will attempt to reach the first server in resolv.conf and not try the second unless the first server is unavailable. If the first responds with "unknown host", the resolver is satisfied, and tells you so. The setup described by eccerr0r above works well. I've been using similar for years. It has the added advantage of caching queries and thus speeding up operations.
--
doc
Back to top
View user's profile Send private message
Princess Nell
l33t
l33t


Joined: 15 Apr 2005
Posts: 818

PostPosted: Wed Sep 01, 2010 7:39 pm    Post subject: Reply with quote

Let me see if I understand this correctly: your own DNS server is authoritative for your own zone, and you wish to resolve hosts in that zone. The zone is private and not available on public DNS.

If this is the case, your setup is not correct. You want only your own server in resolv.conf. This way, all requests will go to your own server, it will resolve hosts from the private zone itself, and pass queries for other hosts up or answer them from the cache.

You want to add a secondary server for resiliency and also add it to resolv.conf, or your dhcp server if you have dynamic clients.

A more secure setup would see authoritative and recursive server on separate machines.
Back to top
View user's profile Send private message
mistake25
Tux's lil' helper
Tux's lil' helper


Joined: 20 May 2008
Posts: 144

PostPosted: Wed Sep 01, 2010 8:43 pm    Post subject: Reply with quote

ok it was my fault, i tought that when primary dns server reports unknown host, then it is asked secondary dns.

thank you for explaination
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum