How to Install and configure DNS-server (bind) in CentOS/RHEL 7

Bind (Berkeley Internet Name Daemon) is also known as the default – this is the best known and most used DNS server on the Internet. I will try to describe how to install and configure the service in the chrooted environment (chroot operation changes the root directory in Unix-like operating systems. program started with altered root directory will only have access to the files contained in this directory, so if you want to allow the program to access other directories or file systems (for example, /proc), it is necessary to mount the necessary directories in the target directory or device.).

  • First, install the tools and related utilities:

  • Now prepare the chroot directory: mount the files and folders, and perform the initial configuration of the DNS server:
  • Note: in acl “xfer” I added the server IP addresses that will be secondary servers for zones. If you are on the domain name system (DNS) server to host any zones are not going to block – this can be left blank, or enter there IP address secondary servers for your zone.

  • Configure the firewall for DNS server:

  • Turn on auto start and run the DNS Server service:
  • Note: the 2-nd and 3-rd best DNS Server enter the IP address of your ISP’s DNS servers, so rezolving will run a little faster.

  • Check availability:

  • If in the preceding paragraph, no error occurred – add functionality, configure the server as the master for multiple zones (if the server you want to configure as a slave for the skip and read the following):

  • If the server needs to be configured as slave, do the following:

That’s all, the DNS server is set up and ready to go!

Leave a Reply