Implementing DNS in Linux
In a Nutshell - CIW Course Section 3, Part B1, Chapter 4
Overview
In Linux DNS is configured and controlled through a number of text files. These include named.Iocal, named.conf, resolve.conf, <domain>.hosts and rev.<domain>.hosts.
NAMED.LOCAL FILE
Note: In the course notes IOCAL begins with the letter "I" as in India. Do a search on Google and you get one result with this spelling, use "L" for Lima and you get thousands, make up your own mind.
This may seem an odd place to begin discussing DNS on Linux, but hopefully it will become apparent as we move on.
The named.Iocal file covers the loopback network. The format will be repeated in a number of the other files used here. Thecomments within the file are fairly self-documenting and it can be considered as a header section, covering the start of authority, and a number of record entries. In this case there is only one entry which is a pointer record to the localhost.
Forward Zone File
The forward zone file is sometimes referred to as the <domain>.hosts file. Above is an example of a <domain>.hosts file. In this case the domain is "studentx.com" so the filename will be studentx.hosts. Again we have the header information and, this time, two host (A) records. As this is a forward lookup zone file, only the machine names studentx and studenty need to be included. This will make more sense when you look at the next paragraph. Note also that the hostnames do not include a period(".") so will have the domain studentx.com appended to them.
Reverse Zone File
The above example is of a rev.<domain>.hosts file. Again, in this example, the filename will be rev.studentx.hosts. Like the forward zone file this includes the header and a number of records. The reverse zone records are pointers and must include the FQDN (Fully Qualified Domain Name).
DNS Initialisation Files
A number of Unix systems, including Linux use the Berkeley Internet Name Daemon (BIND) as the program to provide the DNS service. The named.conf file holds the names of the other files that comprise the DNS configuration. In this example the domain is ciwcertified, but if you substitute this for studentx you will see the relationship to the earlier files. The last section, containing named.ca, identifies a file that contains data to the root servers (external, master, DNS servers).

