Table of Contents
BIND - Notes
Conditional Forwarding
To add conditional forwarding for a specific zone, add the following to named.conf:
zone "domain.com" in { type forward; forward only; forwarders { 10.1.1.1; 10.1.1.2; 10.1.1.3; }; };
Where “domain.com” is the domain to forward queries for and 10.1.1.1, 10.1.1.2, 10.1.1.3 are DNS servers to forward the queries to.
NOTE for this to work, recursion needs to be enabled!
Sources:
Server Fault - Conditional DNS forwarding with named on Linux
Server Fault - BIND9 forwarders not working. Internal DNS resolves but doesn't forward requests it can't process
Empty Root Zone
To replace the default root hints with an empty root zone, for example to prevent resolving external non-forwarded domains when recursion is enabled, add the following to named.conf:
zone "." { type hint; file "db\empty.txt"; };
Make sure to point “file” to an empty file. On Unix-like operating systems you can use “/dev/null” instead.