This tutorial explains how to setup a DNS master and slave server using RedHat Linux. This configuration is tested on RHES 4.0 and Fedore Core 5 systems. Configuration for both is the same. 11-02-2007: I recently added a new article: Howto setup dynamic DNS |
1. Install BIND on Fedora and set rights to the directories:
# yum install bind-chroot # chmod 755 /var/named/ # chmod 775 /var/named/chroot/ # chmod 775 /var/named/chroot/var/ # chmod 775 /var/named/chroot/var/named/ # chmod 775 /var/named/chroot/var/run/ # chmod 777 /var/named/chroot/var/run/named/ # cd /var/named/chroot/var/named/ # ln -s ../../ chroot # chkconfig –levels 235 named on # /etc/init.d/named start Bind will run in a chroot jail under /var/named/chroot/var/named/ |
2. Configuration file DNS master server
# vi /etc/named.conf
// // named.conf for Red Hat caching-nameserver // named configured as master server (RRD 26-01-2006) // include "/etc/rndc.key"; acl internal { 10.0.0.0/8; }; options { // allow-query { internal; }; forwarders { zone "." IN { zone "0.0.127.in-addr.arpa" IN { zone "r71.nl" { zone "roderickderks.nl" { zone "10.in-addr.arpa" { |
3. Configuration file DNS slave server
# vi /etc/named.conf
// include "/etc/rndc.key"; // acl internal { 10.0.0.0/8; }; options { // allow-query { internal; }; forwarders { zone "." IN { zone "0.0.127.in-addr.arpa" IN { zone "r71.nl" { zone "roderickderks.nl" { zone "10.in-addr.arpa" { |
4. Configuration zone and reverse lookup files
# vi etc/named/chroot/var/named/r71.nl.zone
$TTL 3D NS galibier.r71.nl. localhost A 127.0.0.1 r71.nl. IN A 10.0.2.5 router01 IN A 10.0.1.254 mail IN CNAME galibier |
# vi etc/named/chroot/var/named/r71.nl.rev
$ORIGIN . $TTL 86400 ; 1 day 10.in-addr.arpa IN SOA r71.nl. roderick.r71.nl. ( 2006070301 ; serial 10800 ; refresh (3 hours) 3600 ; retry (1 hour) 432000 ; expire (5 days) 86400 ; minimum (1 day) ) NS bonette.r71.nl. NS ventoux.r71.nl. NS galibier.r71.nl. $ORIGIN 0.10.in-addr.arpa. 254.1 PTR router01.r71.nl. $ORIGIN 2.0.10.in-addr.arpa. 1 PTR tenerife.r71.nl. 2 PTR tenerife.r71.nl. 3 PTR ventoux.r71.nl. 5 PTR imap.r71.nl. PTR smtp.r71.nl. PTR ghost.r71.nl. PTR webmail.r71.nl. PTR galibier.r71.nl. 6 PTR bonette.r71.nl. 7 PTR tourmalette.r71.nl. 8 PTR aubisque.r71.nl. $ORIGIN 0.10.in-addr.arpa. 1.3 PTR printer01.r71.nl. $ORIGIN 4.0.10.in-addr.arpa. 100 PTR pc01.r71.nl. |
Leave a Reply