Linux – Howto Redirect unresolved DNS queries to a host

binddomain-name-systemlinuxUbuntu

I am using BIND 9.7.0-P1 on a Linux box (Ubuntu 10.04.2).

I would like to set up the BIND server to resolve all externally unresolved
DNS queries to a given, internal host. Is this possible? How is it done?

I tried setting forwarders to:

forwarders {10.0.1.2; };

However, that didn't help.

Best Answer

NXDOMAIN hijacking is not possible with BIND. This can be done using the PowerDNS Recursor lua scripting. The Ubuntu 10.04 repositories have a package for PowerDNS Recursor which supports the lua scripting functionality.

As other have stated there can be significant consequences to NXDOMIAN hijacking and you understand the potential issues before implementing.