Link to home
Start Free TrialLog in
Avatar of edmundli
edmundli

asked on

setup DNS server and zone transfer issue

Dear all,

Recently, I am building DNS server under Linux 7.2 with Bind 8.x

We already have DNS server running as a Primary
I would like to build a Secondary DNS , and then obtain all the domains, zone etc from Primary DNS,then act the secondary DNS as primary.

Please advise with details steps
Edmund
Avatar of jlevie
jlevie

Okay the steps are:

1) Edit each of the zone files on the primary to list your secondary as a nameserver for your domain(s).

2) Obtain a copy of the primary's named.conf and change each of the zone definitions from sonewthing like:

zone "." {
        type hint;
        file "named.root";
};

zone "0.0.127.in-addr.arpa" {
        type master;
        notify no;
        file "localhost.rev";
};

zone "domain.tld"  {
        type master;
        allow transfer { 1.1.1.2; }
        file "domain.tld.zone";
};

to something like:

zone "." {
        type hint;
        file "named.root";
};

zone "0.0.127.in-addr.arpa" {
        type master;
        notify no;
        file "localhost.rev";
};

zone "domain.tld" {
        type slave;
        masters { 1.1.1.1; };
        allow transfer {
1.1.1.1; };
        file "domain.tld.zone";
}

Note that the hint (root nameservers) and localhost zones are the same on the master and secondary. The other zones on the secondary are defined as 'slave'. You'll need to copy and edit as appropriate the localhost zone file from the master and copy the hint zone file also.

3) Adjust the configuration of the master to allow the secondary to transfer the zones by adding the 'allow transfer to each zone, as above, except the hint and localhost zones.

4) Restart Bind on the master and check /var/log/messages for any named startup problems.

5) Start Bind on the secondary and check for any named startup problems. When you see all of the zones have been transfered configure some client to use the secondary as its nameserver and make sure that you can resolve names and IP's.

6) Edit named.conf and the  zone files on the secondary as appropriate to make the secondary a master.That will mean changing "type" from slave to master, removing the "masters" aqnd "allow transfer" definition from named.conf. Each of the zone files will need adjustment of the SOA and the nameserver definitions. You may also need to change the data in the central registry that defines the nameservers for your domain.

7) Restart named on the secondary and it should then be your new master.

Of course, if your existing master is a Unix or Linux box it would be easier to just copy named.conf and the zone files to the new server, edit as required, and start the new box up as a master.
Avatar of The--Captain
Cheers, Jim!  Long time no see...

I concur whoheatedly with your last sentence.

-Jon
Cheers back to you, Jon.

Yeah the last option is the best, but if the primary DNS server is currently an NT or 2000 system copying files isn't an option.
Avatar of edmundli

ASKER

The product name of our DNS is "Borderware" which is not either NT or unix base, but I believe this is running under linux (with no prompt login).

Please advise.

Just create the secondary files as jlevie advised.
I would recommend the 4th edition of the DNS and Bind book from O'Reilly.
I try to install the latest 9.2.1rc2. It seems that there is no problem on both redhat 7.2 and solars 8, however I try to find any named.conf etc, but with no luck.

my steps
1) configure
2) make

even try
configure --prefix=/usr/local/dns
make
make install

please advise
ASKER CERTIFIED SOLUTION
Avatar of jlevie
jlevie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

Thanks for the answer

Edmund