From owner-freebsd-questions Thu Jul 4 0:29:57 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A17E437B400 for ; Thu, 4 Jul 2002 00:29:54 -0700 (PDT) Received: from smtp.infracaninophile.co.uk (happy-idiot-talk.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9957843E09 for ; Thu, 4 Jul 2002 00:29:53 -0700 (PDT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost.infracaninophile.co.uk [IPv6:::1]) by smtp.infracaninophile.co.uk (8.12.4/8.12.4) with ESMTP id g647TqtD063537; Thu, 4 Jul 2002 08:29:52 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost) by happy-idiot-talk.infracaninophile.co.uk (8.12.4/8.12.4/Submit) id g647Tksg063536; Thu, 4 Jul 2002 08:29:46 +0100 (BST) Date: Thu, 4 Jul 2002 08:29:46 +0100 From: Matthew Seaman To: sagacious Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Running DNS on FreeBSD4.6-STABLE Message-ID: <20020704072946.GC63198@happy-idiot-talk.infracaninophi> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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