Login

A DNS Server is used to resolve an IP address to hostname or hostname to IP address. There are 4 different types of DNS Server :-

  1. A Master DNS
  2. A Slave DNS
  3. A Caching only DNS
  4. A Forwarding only DNS

Configuring A DNS Server

  1. Bind and Caching name server is required to configure a DNS.

2.  Set hostname to server.example.com and IP address to 192.168.0.254

Main configuration file for dns server is named.conf. By default this file is not created in /var/named/chroot/etc/ directory. Instead of named.conf a sample file /var/named/chroot/etc/named.caching-nameserver.conf is created. This file is use to make a caching only name server. You can also do editing in this file after changing its name to named.conf to configure master dns server or you can manually create a new named.conf file.

In this example we are creating a new named.conf file

Save this file with :wq and exit

Configuring zone file

We have defined two zone files example.com.zone for forward zone and 0.168.192.in-addr.arpa for reverse zone. These files will be store in /var/named/chroot/var/named/ location. We will use two sample files for creating these files.

A default file will look like this :

Make the changes as shown in image below :

Now open reverse lookup zone file 0.168.192.in-addr.arpa

By default it will look like this :

Make the following changes as shown in figure :

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