Step 1. You need to create the /etc/named.conf file and decide in what directory to put the other files used by DNS
options { directory "/var/named"; }; zone "."{ type hint; file "named.ca"; }; zone "yourdomain.com"{ type master; file "yourdomain.named.hosts"; notify no; }; zone "6.168.192.in-addr.arpa"{ type master; file "6.168.192.in-addr.arpa"; }; zone "0.0.127.in-addr.arpa"{ type master; file "named.local"; };
Ok break it down.
options -- Tells the directory where the files for the local DNS server are found (/var/named).
zone -- Identifies each area of responsibility that the DNS server knows about and the files associated with that area. These files are located in the directory defined by the directory option. These zone files are defined in this configuration:
The file named.ca is a local cache of the highest-level DNS servers on the Internet (this is the root name servers).
The file yourdomain.named.hosts is the master host file for the yourdomain.com domain. A name server can handle many domains, by just adding more of this section and changing the domain and the file.
zone "yourotherdomain.com"{ type master; file "yourotherdomain.named.hosts"; notify no; };
The file 6.168.192.in-addr.arpa allows the server to do a reverse lookup of the domain.
The file named.local contains authoritative information for any hosts that you can access through the current host's loopback network interface. It normally contains just one host entry, localhost