Single Bind (nameserver) for multiple domains (zones)

Matthew Ceroni matthewceroni at
Thu Jul 9 00:12:40 UTC 2015


Up until this point I have configured bind to serve a single domain (zone)
and the bind server itself (the nameserver) lived on that domain. As an
example the server was and was the authoritative server for

I am in a situation where I need to configure bind to service multiple
domains and have run into a problem.

My situation as such. The bind server itself sits on (which is
actually the company primary domain) and as such the resolv.conf points to
the company DNS servers.

I then configure a zone (ie: with the following zone file:

zone "" {
    type master;
    file "/var/named/dynamic/";
    update-policy {
            grant rndc-key zonesub ANY;

$TTL 10800      ; 3 hours
@               IN      SOA vccops at (
                                42      ; serial
                                86400   ; refresh (1 day)
                                3600    ; retry (1 hour)
                                604800  ; expire (1 week)
                                3600    ; minimum (1 hour)
                IN      NS

The problem I am running into is if I query that domain ( for
say (which isn't present in the zone file) it ends up
query And our company domain (domain1 in
this example) returns a default IP for anything queried against it. Which I
don't want.

The search path in the resolv.conf on the bind server has so it
appears bind couldn't find the result (since it wasn't in the zone file)
and then just followed the path the OS would do to lookup records (append
the search path and try those).

Any assistance would be appreciated.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the bind-users mailing list