Single Bind (nameserver) for multiple domains (zones)

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


Hi:

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 ns.domain1.com and was the authoritative server for
domain1.com.

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 domain1.com (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: devdomain.com) with the following zone file:

# devdomain.com
zone "devdomain.com" {
    type master;
    file "/var/named/dynamic/db.devdomain.com";
    update-policy {
            grant rndc-key zonesub ANY;
    };
};


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

The problem I am running into is if I query that domain (devdomain.com) for
say test1.devdomain.com (which isn't present in the zone file) it ends up
query test1.devdomain.com.domain1.com. 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 domain1.com 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.

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/bind-users/attachments/20150708/51b90288/attachment.html>


More information about the bind-users mailing list