On Sat, Sep 01, 2007 at 01:34:00PM -0700, David Newman wrote:
> > The name server FQDN is server1.abcd._com_.xy (first domain)
> > but, how to name the server in the SOA record for the rest
> > of the domains?
> 
> 1. Add more zones for your new domains in your named.conf file.
> 
> Here's a bind 9 example:
> 
>         zone  "abcd.com.xy" in {
>                 type master;
>                 file "/etc/namedb/master/db.abcd.com.xy";
>                 allow-query { any; };
>                 allow-transfer { xfer; };
>         };
> 

On OpenBSD named runs chroot in /var/named:


options {
        ..
        ..
        allow-query { any; };
        allow-transfer { xfer; };
};

zone  "example.com" {
        type master;
        file "master/example.com";
};

zone  "example.org" {
        type master;
        file "master/example.org";
};

zone  "example.net" {
        type master;
        file "master/example.net";
};




If the contents of the zones are to be basically the same, do this
instead (use one template):



zone  "example.com" {
        type master;
        file "master/example.template";
};

zone  "example.org" {
        type master;
        file "master/example.template";
};

zone  "example.net" {
        type master;
        file "master/example.template";
};




And in /var/named/master/example.template do:



$TTL 2D                         ; client caching [RFC 1035]

@       SOA (
        ns0.your.domain.        ; master name server
        [EMAIL PROTECTED]       ;zone maintainer's email [RFC 2142]
        2007070200              ; serial, todays date + todays serial #
        1D                      ; refresh
        2H                      ; retry
        5W                      ; expire
        2D )                    ; client negative caching [RFC 2308]

        NS      ns1.your.domain.
        NS      ns2.your.domain.
        NS      ns3.your.domain.

        MX      0       smtp.your.domain.

www     CNAME   vweb.your.domain.
imap    CNAME   vmail.your.domain.
pop     CNAME   vmail.your.domain.
...
..




If you want there to be a hostmaster per domain, just do this in the
template, it will get expanded to hostmaster@<domain-in-the-@>, remember
that the zone's name gets set in named.conf, not in the zone file
(usually..., so the name of the zone file does not need to reflect the
name of the zone, just conventional for us hostmasters to read quickly):


        hostmaster              ;zone maintainer's email [RFC 2142]


Buy the DNS & BIND book, and the DNS & BIND Cookbook too.
-- 
Craig Skinner | http://www.kepax.co.uk | [EMAIL PROTECTED]

Reply via email to