2 domains in 1 zone file...how?
Bob Vance
bobvance at alumni.caltech.edu
Sat Jan 27 18:58:41 UTC 2001
I do it with a $INCLUDE file, for no real good reason, other than kind
of a general feeling that it leaves me with a little more flexibility.
All names pertaining to names within the zone are "relative"
(they do *not* end with a "." ).
E.g.,
@ .... ; for current origin
www in a 1.2.3.4
yoho cname www
Notice that if all the names are relative anyway, you *could* simply
point named.conf to the one and same file for *both* zones and be done
with it.
I actually keep the SOA and NS records in a separate $INCLUDE file,
although it's not necessary.
named.conf looks like:
(here is where both declarations *could*
point the same file.
)
...
zone "vance.home.sbm.com" {
type master;
file ".pri/vance.home.sbm.com";
forwarders { }; /*20010123jrv*/
};
zone "vance" {
type master;
file ".pri/vance";
forwarders { }; /*20010123jrv*/
};
...
My zone files look like:
for the "vance." domain :
; .pri/vance
; $ORIGIN vance
$INCLUDE .pri/soa.vance
$INCLUDE .pri/incl.vance
for the "vance.home.sbm.com." domain :
; .pri/vance.home.sbm.com
; $ORIGIN vance.home.sbm.com.
$INCLUDE .pri/soa.vance
$INCLUDE .pri/incl.vance
Notice that the 2 files are essentially the *same* -- so they *could*
be the same in actuality !
The SOA include file looks like:
$TTL 3600
@ IN SOA ns.vance. dns_admin.mailx.vance. (
...
)
NS ns.vance.
and the main "incl.file" contains most of the data:
localhost IN A 127.0.0.1
@ IN MX 10 mailx
@ IN MX 20 mailx.atl.sbm.com.
ns IN A 192.168.1.6
linux1 IN A 192.168.1.6
mailx IN A 192.168.1.6
...
-------------------------------------------------
Tks | <mailto:BVance at sbm.com>
BV | <mailto:BobVance at alumni.caltech.edu>
Sr. Technical Consultant, SBM, A Gates/Arrow Co.
Vox 770-623-3430 11455 Lakefield Dr.
Fax 770-623-3429 Duluth, GA 30097-1511
==================================================
On 25 Jan 2001 10:11:19 -0800, "Jamie P. Bontrager" <jamie at kctc.net>
wrote:
>If I have domain-a.com and domain-b.com that both point to the same ip
and
>website, is there a way to combine zone files for both domains in bind
8? I
>cannot find any reference to this in the O'Reilly book on bind.
More information about the bind-users
mailing list