Install and Configure Primary (Master) BIND DNS Server – RHEL 6 – CentOS 6

Updated on March 24, 2018
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)

Primary (Master) BIND DNS Server – RHEL 6 – CentOS 6 BIND DNS Server is a widely used DNS Server. Because domain names are alphabetic, they are easier to remember. So if we will browse the Internet we don’t need to remember IP addresses. For example, the domain name might translate to

This video tutorial will show you how to setup and configure Primary (Master) BIND DNS Server on RHEL 6.x  or CentOS 6.x:

  • Install BIND
  • Configure BIND
  • Create primary DNS zone for linuxlab.local domain
  • Add NS, A, MX records to zone

How to Install and Configure Primary (Master) BIND DNS Server on RHEL 6 and CentOS 6

1. Install BIND
yum install bind

Related Article  How to Perform Step by Step Exchange 2010 Single Mailbox Item Restore with Windows Server Backup

2. Enable named service
chkconfig named on

3. Edit /etc/named.conf

4. Start named ( BIND) service
service named start

5.Edit /etc/named.conf

6. Copy /var/named/named.localhost
cp named.localhost linuxlab.local

7. Edit /var/named/linuxlab.local

@ IN SOA ns1.linuxlab.local. hostmaster.linuxlab.local. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum

IN NS ns1.linuxlab.local.
@ IN MX 10 mail.linuxlab.local.
ns1 IN A
webserver IN A
www IN CNAME webserver.linuxlab.local.
mail IN A

8. Modify file’s ownership
chown root:named linuxlab.local

9. service named reload

10. Run dns queries against this DNS server
dig @localhost ns1.linuxlab.local
dig @localhost webserver.linuxlab.local
dig @localhost linuxlab.local MX
dig @localhost linuxlab.local NS

Hope you found it informative and useful. Any questions or comments are welcomed.

Related Article  Installing Debian 7.0 Wheezy in VMware Workstation 9