HOW TO CONFIGURE LINUX DNS SERVER STEP BY STEP GUIDE EXAMPLE AND IMPLEMENTATION

A DNS server, or name server, is used to resolve an IP address to a hostname or vice versa.
You can set up four different types of DNS servers:

  • A master DNS server for your domain(s), which stores authoritative records for your domain.

  • A slave DNS server, which relies on a master DNS server for data.

  • A caching-only DNS server, which stores recent requests like a proxy server. It otherwise refers to other DNS servers.

  • A forwarding-only DNS server, which refers all, requests to other DNS servers.

CONFIGURE DNS SERVER

In this example we will configure a dns server and will test from client side.

For this example we are using three systems one linux server one linux clients and one window clients.

Step 1 - bind and caching-nameserver rpm is required to configure dns. Check them for install if not found install them


step1.bmp




Step 2 - set hostname to server.example.com and ip address to 192.168.0.254



step2.bmp



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 our example we are creating a new named.conf file 




step3.bmp


Or do editing exactly as shown here in image 

step4.bmp



save this file with :wq and exit

 

Configure 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.

step5.bmp

By default this file will look like this 

 

step6.bmp

Change this file exactly as shown in image below


step7.bmp

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

step8.bmp

By default it will look like this

step9.bmp

Change this file exactly as shown in image below



step10.bmp

 

Now changed the ownership of these zone files to named group 

step11.bmp


你可能感兴趣的:(Address,different,records,otherwise,recent)