The following instructions will help you install and configure BIND on CentOS 6.

Install BIND with the following command:

yum install bind -y

Create a zone file for the new domain

vi /var/named/

Add the zone information for the new domain

@       IN      SOA (
2012080701      ; Serial
1H      ; Refresh
30M       ; Retry
20D    ; Expire
1H )  ; Minimum

@       IN      NS
@       IN      NS
ns1     IN      A
ns2     IN      A

@       IN      MX  10

www     IN      A
smtp    IN      A
ftp     IN      A

Add the new zone file to the named.conf file.

vi /etc/named.conf

Add the following text to add the zone file

zone "" {
type master;
file "/var/named/";

Change the following lines from:

listen-on port 53 {; };
allow-query { localhost; };


listen-on port 53 {; }; // Enter the interface you want BIND to listen on.
allow-query { any; };  // May also be an IP address or subnet

Optionally add forwarders by adding the following line:

forwarders {;; };

You may turn off recursion if it isn’t required by changing the following line”

recursion yes;


recursion no;

Restart the named service

service named restart