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.
LVL 2
davepuseyAsked:
Who is Participating?
 
ravenplConnect With a Mentor Commented:
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
Will You Be GDPR Compliant by 5/28/2018?

GDPR? That's a regulation for the European Union. But, if you collect data from customers or employees within the EU, then you need to know about GDPR and make sure your organization is compliant by May 2018. Check out our preparation checklist to make sure you're on track today!

 
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
All Courses

From novice to tech pro — start learning today.