Aliasing one domain to another

Edvard Tuinder bindlist at lunytune.nl
Mon Sep 22 16:56:23 UTC 2003


According to Nico De Ranter:
> Hi,
> 
> for historical reasons I have a number of domains that all point
> to the same machines. Is there some easy way to make 1 domain a complete
> alias for another domain without having to duplicate all records?
> i.o.w. I have a number of hosts registered in domainA.com, I now
> want domainB.com to contain the same hosts without having to manualy
> duplicate all records.

There are a number of ways to achieve this, but the easiest is probably to
load one zone file for all zones that should be identical. As in

zone "zone1.net" {
        type master;
        file "soa/zone1.net.soa";
};

zone "zone2.net" {
        type master;
        file "soa/test.net.soa";
};


If you then modify that one zone file the changes will be in all three
zones (do remember to reload all zones, through rndc reload).

Alternatively you could use DNAME to duplicate an entire zone:
As soa file for zone2.net:

; named file for zone2.net
$TTL 86400
@ IN SOA ns1.zone1.net. hostmaster.zone1.net. ( 2003072101 28800 3600 604800 86400 )
  IN NS ns1.zone1.net
  DNAME  zone1.net.

This will also duplicate all data (or actually it's a way of aliasing).

-Ed


More information about the bind-users mailing list