Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 557
  • 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
New Tabletop Appliances Blow Competitors Away!

WatchGuard’s new T15, T35 and T55 tabletop UTMs provide the highest-performing security inspection in their class, allowing users at small offices, home offices and distributed enterprises to experience blazing-fast Internet speeds without sacrificing enterprise-grade security.

 
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

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

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