How to configure DNS server in RedHat Enterprise Linux

Posted: 18 Sep 2018 in LINUX
Tags: , , , , ,

In this tutorial i will show you how to configure DNS server in Linux. We will learn to configure zone file and reverse lookup zone file.We will also learn about dns packages and dns services.We will also learn to change the ownership of files which we need to change.I have used Virtualbox for configuring and testing this DNS lab.The operating system i used for DNS server is RHEL5 and the DNS Client machines is WindowsXP.

Learn More server configuration on Linux.

DHCP SERVER Configuration in Linux.

NIS Server Configuration on Linux.

Apache server Configuration on Linux


The ip address for DNS server is and domain name is

Step 1: set hostname to


#vim /etc/sysconfig/network



Step 2:Check the ip address of your DNS machine.


dns server ip

As i have assigned a static ip address to My DNS Machine and that is


step 3: Install bind package required for DNS.


# yum install bind* -y


Step 4: Change main configuration file of DNS named.conf


#vim /var/named/chroot/etc/named.conf



Step 5: Install caching-nameserver package reqiured for dns


Step 6:Configure ZONE FILES


I have defined two zone files for forward zone and for reverse zone.

Remember that both These files will be stored in /var/named/chroot/var/named/  directory.

I will use two sample files for creating these both files.


Step 7:Change directory to /var/named/chroot/var/named and copy the sample files to name which we have set in named.conf

dns config folder


Step 8: Now open  and edit forward zone file


forward zone file


Step 9:Now open reverse lookup zone file


Open reverse lookup zone file and edit for reverse dns configuration

dns file

Lets Understand DNS Records:


A           : stands for Address Record

AAAA   :  stands for IPV6 Address Record

CNAME :  Alias of one name to another

MX        : Mail Exchange Record

NS        :  Name server Record

PTR     : Pointer Record (Pointer to a Canonical name)

SOA    : Start of a Authirity record


Step 10:Now changed the ownership of these zone files to named group

step 11:Now start the named service

dns service



Step 11: Testing DNS on Clinet machine Which is windowsXP here.

dns client


Check IP Address of your DNS Client Machine:

dns client


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.