🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.computers.linux
Article #47369

Re: domain name zone file

#47369
From: greyman
Date: Mon, 11 Jan 1999 00:00
114 lines
4904 bytes
G'day Chris,

DNS can be a bit of black magic at times. There is an excellent book from
O'Reilly's (http://www.ora.com) called 'DNS and BIND' which is a must if you
will be doing the troubleshooting, customising and/or handling multiple
domains. You can use 'man named' to get the operators used within the
configuration files and/or use the following as a guide.

The simple answer would be for me to show you an example of a straight
forward single domain:

1st file: /etc/named.boot
===================
This one tells 'named' what domains it is authorative for as well as directs
the DNS towards your ISP's caching DNS that acts as a 'forwarder'. An
example is:

    ;
    ; GMCS Named Configuration file
    ;
    ; You should put your zone files in a directory of their own.
    ;   try /var/named, /usr/local/named.
    directory                                            /usr/local/named

    ; In order for the DNS to find entries, it must be able to find
    ;  each root domain server to follow the path. Download the
    ;  named.ca file using
    ;  'dig @a.root-servers.net . ns > /usr/local/named/named.ca'
    ; This line specifies which filname you chose.

    cache            .                                    named.ca

    ; Primary zones are 'authoritive' once the parent domain
    ;  server has an entry for yours

    primary         gmcs.com.au              named.gmcs.com.au

    ; All nameservers need one of these. It should be with the
    ;  distribution installed 'bind-xxxx' package

    primary         0.0.127.in-addr.arpa    named.local

    ; If you also want to be authoritive for your IP address range

    primary         210.31.203.in-addr.arpa named.arpa

    ; If your ISP provides a caching nameserver it is a good idea
    ;  to point your DNS at it. Yours will then check in with this one
    ;  rather than going to the root servers and following the tree down
    ;  until it finds the right DNS to query. Speeds up queries. Don't point
    ;  at this one though (unless you are directly connected to Telstra Big
    ;  Puddle.

    forwarders      192.168.1.199

2nd File: the zone file for your domain
=============================
Here is my very simple zone file for a couple of hosts (visible on the
Internet that is). These settings are pretty normal.

The first part is to specify the 'authority' record itself.
    ; BIND version named 4.9.6
    ; zone 'gmcs.com.au'   last serial # 1998121601

    $ORIGIN com.au.

    gmcs    IN      SOA     eden.gmcs.com.au. graham.gmcs.com.au. (
                            1998122801 ; Serial number
                            10800   ; Refresh after 3 hours
                            3600    ; Retry after 1 hour
                            3600000 ; Expire after 1000 hours
                            86400 ) ; Minimum TTL of 1 day

            IN      NS      eden.gmcs.com.au.
            IN      NS      ns1.telstra.net.

            IN      TXT     "Graham Miller Computer Services."
            IN      TXT     "Ph +61-7-54460100, Fax +61-7-54460717."
            IN      TXT     "Browse http://www.gmcs.com.au for info."

            IN      MX      0 eden.gmcs.com.au.

Then you specify the hosts in your domain thus:
    $ORIGIN gmcs.com.au.

    ;# HOST IPs
    net1            IN      A       203.46.81.128
    gateway         IN      A       203.46.81.129
    eden            IN      A       203.46.81.130

    larrakin        IN      A       203.46.81.142

    ;# CNAMES
    www     IN      CNAME   eden.gmcs.com.au.
    mail    IN      CNAME   eden.gmcs.com.au.
    ftp     IN      CNAME   eden.gmcs.com.au.

That's it! Replace your info into these files and then restart named with:
    /etc/rc.d/init.d/named restart

Look in your 'messages' log file (probably /var/log/messages) for
information about what named has done or any errors it reports.

Hope this helps
Greyman
graham@gmcs.com.au

Chris Brown wrote in message <77avg2$md0$1@the-fly.zip.com.au>...
>does any one where i can find some detailed information and good examples
on
>how to set up an authoritive zone data file for a dns server on a red-hat
>linux 5.0 system?
>
>
Technical Details
Message-ID: <AVim2.17$Rs2.924@nsw.nnrp.telstra.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <77avg2$md0$1@the-fly.zip.com.au>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 102983,89a99e8a70f7bd2c
X-Google-Attributes: gid102983,public
From: "greyman" <graham@gmcs.com.au>
Subject: Re: domain name zone file
Date: 1999/01/11
Message-ID: <AVim2.17$Rs2.924@nsw.nnrp.telstra.net>
X-Deja-AN: 431170992
References: <77avg2$md0$1@the-fly.zip.com.au>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
X-Complaints-To: abuse@telstra.net
X-Trace: nsw.nnrp.telstra.net 916044512 203.46.81.139 (Mon, 11 Jan 1999 19:48:32 EST)
Organization: Telstra Big Pond Direct
NNTP-Posting-Date: Mon, 11 Jan 1999 19:48:32 EST
Newsgroups: aus.computers.linux