[XenoCafe Logo] Click for Homepage
Home Tutorials Forum Blog Advertising Links Contact About



Configuring BIND on RedHat (DNS under Linux)
Part 3 - Secondary Name Server for a Zone

Written by Tony Bhimani
July 21, 2004

Requirements
RedHat Linux 9
BIND 9.2.1

Now we will configure BIND to be a secondary name server for a single zone. We will use the same fictitous domain somefakedomain.com from before. Before we do anything for the secondary zone we should edit our primary zone file and add the secondary server. All name servers for our zone should have a NS entry and the hostname defined. Using the steps from before, open your zone file in vi and add the NS for your secondary name server below the primary. Also add the hostname under hosts and modify the serial to a new value. Be sure to use the public IP address of your second system in place of the 192.168.1.201 I use in the example. Save your changes. This is what your zone file should resemble on the primary name server.

Next we need to edit the /etc/named.conf to inform BIND to send a copy of our zone to the secondary name server. Open named.conf in vi and modify the zone entry. Include allow-transfer { 192.168.1.201; }; and save your changes. Your named.conf should look similar to this.

Now we will configure the secondary name server. Make sure BIND is installed and running. Refer to part 1 of this tutorial if you are in doubt or need a refresher.

Open /etc/named.conf and enter this below the localhost zone.

zone "somefakedomain.com" IN {
	type slave;
	file "somefakedomain.com.zone";
	masters { 192.168.1.200; };
};

Be sure to replace 192.168.1.200 with the public IP address of your primary server. Save named.conf and yours should look similar to this.

That's it! Now all you have to do is reload the zone on the primary server. Issue this command..

rndc reload

Now if you check your system log you should see the zone being transferred to the secondary server.

cat /var/log/messages

Go into /var/named on the secondary server and list the directory. You should see a copy of the zone file somefakedomain.com.zone.

cd /var/named
ls

If you view the contents of the zone it should look similar to that of the master copy.

cat somefakedomain.com.zone

This concludes the Configuring BIND on RedHat (DNS under Linux) tutorial.



How would you rate the usefulness of this content?

Poor 1
2
3
4
5
6
7
8
9
Outstanding

Optional: Tell us why you rated the content this way.
Characters remaining: 1024
Average rating: 7.99 out of 9.

1 2 3 4 5 6 7 8 9
88 people have rated this content.
[ Previous Page ] [ 1 ] [ 2 ] [ 3 ] This page has been viewed 25,124 times
Copyright © 2004-2010 XenoCafe. All Rights Reserved. XenoCafe is Powered by Linux. Free your mind and your wallet. Switch to Linux.