Zone Files

 
You will have several zone files. The number depends on your network.

Domain: mydns.stdi.com
File name: mydns.stdi.com.dns
;
; dns zone for for mydns.stdi.com
;
$ORIGIN mydns.stdi.com.
$TTL 3h
; any time you make a change to the domain, bump the
; "serial" setting below. the format is easy:
; YYYYMMDDI, with the I being an iterator in case you
; make more than one change during any one day
;
mydns.stdi.com.         IN  SOA   thinkpad postmaster (
                        200601042 ; serial
                        3H        ; refresh
                        1H        ; retry
                        1W        ; expire
                        1H )      ; minimum
;
; name server (NS) 
;
mydns.stdi.com.         IN NS      thinkpad.mydns.stdi.com.
;
; hostnames, in alphabetical order
;
thinkpad                IN A     192.168.1.200
;
; WHITELIST ENTRIES
;
4.156.176.207           IN A     127.0.0.1
6.156.176.207           IN A     127.0.0.1
This zone file is for the mydns.stdi.com subdomain. There must be a delegation in the stdi.com domain.The stdi.com zone file has two entries, a NS entry to define the name server and an address record to define the host.
mydns     NS   mydns.stdi.com
mydns     A    192.168.1.200

Loopback configuration
The next two files can be used as-is and define the local host or loopback address.
Domain: localhost
File name: localhost.dns
;
; loopback/localhost zone file
;
$TTL 1D
$ORIGIN localhost.
@          IN SOA @ root (
              1 ; Serial
             8H ; Refresh
            15M ; Retry
             1W ; Expire
            1D) ; Minimum TTL
           IN NS @
           IN A 127.0.0.1
Domain: 0.0.127.in-addr.arpa
File name: 127.0.0.dns
;
; reverse pointers for localhost
;
$TTL 1D
$ORIGIN 0.0.127.in-addr.arpa.
@           IN SOA localhost. root.localhost. (
               1 ; serial
              8H ; refresh
             15M ; retry
              1W ; expire
            1D ) ; minimum
            IN NS  localhost.
          1 IN PTR localhost.


A very short zonefile introduction
When adding entries in a zone file, many of the positional paramters are optional. The full Address entry with all parameters looks like this:
hostname ttl IN A 192.168.1.200
hostname [optional]Usually the hostname. If the name doesn't end with a dot, the default domain is appended. The default domain comes from previous definitions. In our examples, we use the $ORIGIN to set the domain.
ttl [optional]Time to live
IN [optional]Class, IN stands for Internet
AAddress
192.168.1.200IP address

When adding a Whitelist entry, we have two basic options. Both of the following Address records are identical.

$ORIGIN mydns.stdi.com.
200.1.168.192  A  127.0.0.1
200.1.168.192.mydns.stdi.com.  A  127.0.0.1

When you add the complete host name, terminte the name with a dot. If the dot is missing, the default domain is appended.

Back

First published on January 01, 2006

Timestamp: 11/16/2019 10:41:29 PM EST [on srv7cps]
1996 - 2019 STDI Consulting Inc.
All Rights Reserved