Caching only dns server
You can build a caching only dns server as a forwarder (proxy) or without zones except db.root (classical caching-only).
forwarder
options {
forwarders { 10.123.188.150; 10.123.68.18; };
forward only;
allow-query { any; };
allow-query-cache { any; };
allow-transfer { none; };
allow-update-forwarding { none; };
allow-notify { none; };
};
caching-only
options {
directory "/var/cache/bind";
allow-query { any; };
// allow-recursion { any; };
recursion yes;
};
zone "." {
type hint;
file "/etc/bind/db.root.intra";
};
// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912
zone "localhost" {
type master;
file "/etc/bind/db.local";
};
zone "127.in-addr.arpa" {
type master;
file "/etc/bind/db.127";
};
zone "0.in-addr.arpa" {
type master;
file "/etc/bind/db.0";
};
zone "255.in-addr.arpa" {
type master;
file "/etc/bind/db.255";
};
For an intranet the
db.root.intra
contains the internal root server.
. 3600000 IN NS NS1.DNS.SERVICE.BLA.NET.
NS1.DNS.SERVICE.BLA.NET. 3600000 A 10.123.188.150
. 3600000 IN NS NS2.DNS.SERVICE.BLA.NET.
NS2.DNS.SERVICE.BLA.NET. 3600000 A 10.123.68.18