LINUXMAKER, OpenSource, Tutorials

The reverse lookup file

In order for the IP address to be resolved from the fully qualified domain name (FQDN), we need a reverse lookup file on the DNS server. This is named db.x.y.z, for example db.0.21.156.188. In this file the computer name (FQDN) is assigned to the last octet of an IP address, which corresponds to the respective host, by means of a PTR record. The PTR records are responsible for the reverse translation of IP addresses into names.

;; db.0.21.156.188

$TTL 2D
@       IN      SOA     ns1.mycompany.com. hosmaster@mycompany.com. (
                               2018012002      ; Serial
                                       3H      ; refresh after 3 hours
                                       1H      ; retry after 1 hour
                                       1W      ; expire after 1 week
                                       1D)     ; minimum TTL of 1 day

@       IN      NS      ns1.mycompany.com.
10      IN      PTR     mail.mycompany.com.
20      IN      PTR     www.mycompany.com.
150     IN      PTR     app.mycompany.com.

Importantly, the translated names are the FQDNs that end with a dot.

The performance of alias entries, MX records, etc. does not happen again here.