Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Jul 2002 08:29:46 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        sagacious <sagacious@unixhideout.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Running DNS on FreeBSD4.6-STABLE
Message-ID:  <20020704072946.GC63198@happy-idiot-talk.infracaninophi>
In-Reply-To: <CGEIKJFNGMJHCMFBJGJFCENACAAA.sagacious@unixhideout.com>
References:  <CGEIKJFNGMJHCMFBJGJFCENACAAA.sagacious@unixhideout.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jul 04, 2002 at 01:38:17AM -0400, sagacious wrote:
 
> [labs] /etc/namedb# nslookup freebsd.org
> Server:  localhost.unixhideout.com
> Address:  127.0.0.1
> 
> Name:    freebsd.org
> Address:  216.136.204.21
> 
> [labs] /etc/namedb#
> 
> 
> that looks like its working right?

Congratulations. You've successfully configured a cacheing nameserver
which will do recursive lookups on your behalf.

> [labs] /etc/namedb# nslookup 192.168.1.20
> Server:  localhost.unixhideout.com
> Address:  127.0.0.1
> 
> *** localhost.unixhideout.com can't find 192.168.1.20: Non-existent
> host/domain
> [labs] /etc/namedb#

This is the other half of nameserver operation: providing the
authoritative data.  Now, 192.168.1.20 is a RFC1918 address, which
means that it won't be registered on any internet nameserver.

If you want your nameserver to resolve that address, you're going to
have to install your own zone data files for the
1.168.192.in-addr.arpa. domain.

In your /etc/namedb/named.conf file, you'll need a zone statement:

zone "1.168.192.in-addr.arpa" {
        type master;
        file "p/1.168.192.in-addr.arpa";
        //allow-query {                     // Add acl's as required
        //        any;
        //};
        //allow-transfer {
        //        secondaries;
        //};
};

Then in /etc/named/p/1.168.192.in-addr.arpa you need a zone data file
that contains principally PTR records for mapping addresses to
hostnames.  Something like this:

$TTL    3600

@       IN      SOA     ns0.unixhideout.com.     hostmaster.unixhideout.com. (
                        2002070400      ; Serial
                        10800           ; Refresh (3H)
                        3600            ; Retry   (1H)
                        604800          ; Expire  (1W)
                        43200 )         ; Minimum (12H)
                NS      ns0.unixhideout.com.
                NS      ns1.unixhideout.com.
;
0               PTR     net.unixhideout.com.
1               PTR     ns0.unixhideout.com.
2               PTR     ns1.unixhideout.com.
;
99              PTR     j-random-host.unixhideout.com.
; etc.


That will let you resolve IP numbers into hostnames.  You'll need
similar zone statements and data files to provide the corresponding
forward lookups, which contains mostly A, MX, CNAME as such like
records.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
Tel: +44 1628 476614                                  Marlow
Fax: +44 0870 0522645                                 Bucks., SL7 1TH UK

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020704072946.GC63198>