Solved

BIND9 is not caching responses.

Posted on 2009-07-11
8
544 Views
Last Modified: 2013-12-06
I have a BIND9-based DNS server set up here at home.

I serves as the master for a couple of internal domains, and everything else is resolved via a forwarders directive in the config file.

The problem is that the server goes out the forwarders to get an ip address every single time a domain name is requested.

If i request www.google.co.uk 10 times in a row, it does 10 requests out to the forwarders. This seems to indicate that the server is not caching responses.

How can i make it cache responses so that subsequent requests for the same domain name dont require a request to the forwarders.
0
Comment
Question by:davepusey
  • 4
  • 3
8 Comments
 
LVL 43

Accepted Solution

by:
ravenpl earned 500 total points
ID: 24833507
Are You sure You are using the local bind9 as resolver (/etc/resolv.conf)
Have You configured caching nameserver in bind(zone ".") or just forwarders?
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 24833508
Also, I suggest to use http://members.home.nl/p.a.rombouts/pdnsd/index.html as caching resolver instead of full fledged dns server.
0
 
LVL 2

Author Comment

by:davepusey
ID: 24834028
>> Are You sure You are using the local bind9 as resolver (/etc/resolv.conf)

Yes!

>> Have You configured caching nameserver in bind(zone ".") or just forwarders?

Please explain.

>> Also, I suggest to use http://members.home.nl/p.a.rombouts/pdnsd/index.html as caching resolver instead of full fledged dns server.

I still need the ability to host a few zones so I think BIND is still the best choice.
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 24834077
> http://www.langfeldt.net/DNS-HOWTO/BIND-9/DNS-HOWTO-3.html
To have bind caching, it has to have hint zone "." configured.
Additionally You could use the glibc build-in dns caching with nscd service
service nscd status
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 2

Author Comment

by:davepusey
ID: 24834760
Yes the root zone is there... as included in the original installation...


// prime the server with knowledge of the root servers

zone "." {

        type hint;

        file "/etc/bind/db.root";

};

Open in new window

0
 
LVL 2

Author Comment

by:davepusey
ID: 24834766
I've been unable to find any type of cache file, or any config for it.

Perhaps this is what's missing?

Unfortunatly I don't know how to configure such a file.
0
 
LVL 10

Expert Comment

by:ampranti
ID: 25080064
May you paste here your named.conf.options  file?
0
 
LVL 2

Author Comment

by:davepusey
ID: 25080746
I've fixed it now by removing the forwarder directives, and adding the root hint zone.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
One of the most often confused topics in the area DNS is the idea of GLUE records. Specifically, what they are, when they are needed, when they are provided, and how they are created. First, WHAT IS GLUE? To understand GLUE, you must first under…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now