Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 559
  • Last Modified:

BIND9 is not caching responses.

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
davepusey
Asked:
davepusey
  • 4
  • 3
1 Solution
 
ravenplCommented:
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
 
ravenplCommented:
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
 
davepuseyAuthor Commented:
>> 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
Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

 
ravenplCommented:
> 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
 
davepuseyAuthor Commented:
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
 
davepuseyAuthor Commented:
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
 
amprantiCommented:
May you paste here your named.conf.options  file?
0
 
davepuseyAuthor Commented:
I've fixed it now by removing the forwarder directives, and adding the root hint zone.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now