The forward zone file is where we define DNS records for forward DNS lookups.
That is, when the DNS receives a name query, "host1.nyc3.example.com" for example, it will look in the forward zone file to resolve host1's corresponding private IP address.
If you utilize multiple datacenters, you can set up an internal DNS within each respective datacenter.
Let's create the directory where our zone files will reside.
According to our local configuration, that location should be $TTL 604800 @ IN SOA localhost. ( 2 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800 ) ; Negative Cache TTL ; @ IN NS localhost.
When you are finished adding all of your desired zones, save and exit the file.
Now that our zones are specified in BIND, we need to create the corresponding forward and reverse zone files.
If you are unfamiliar with DNS concepts, it is recommended that you read at least the first three parts of our Introduction to Managing DNS.
For the purposes of this article, we will assume the following: With these assumptions, we decide that it makes sense to use a naming scheme that uses "nyc3.example.com" to refer to our private subnet or zone.
Reverse zone file are where we define DNS PTR records for reverse DNS lookups.
That is, when the DNS receives a query by IP address, "10.128.100.101" for example, it will look in the reverse zone file(s) to resolve the corresponding FQDN, "host1.nyc3.example.com" in this case.
Note that the first column consists of the last two octets of your servers' private IP addresses in reversed order.
Be sure to substitute names and private IP addresses to match your servers: If your named configuration files have no syntax errors, you will return to your shell prompt and see no error messages.
Using our example private IP addresses, we will add ns1, ns2, host1, and host2 to our list of trusted clients: file.