From owner-freebsd-questions Thu May 10 11:36:33 2001 Delivered-To: freebsd-questions@freebsd.org Received: from marlo.eagle.ca (marlo.eagle.ca [209.167.16.10]) by hub.freebsd.org (Postfix) with ESMTP id 3BBE737B422 for ; Thu, 10 May 2001 11:36:27 -0700 (PDT) (envelope-from freymann@eagle.ca) Received: from phantom (staff.eagle.ca [209.167.16.15]) by marlo.eagle.ca (8.11.0/8.11.0) with SMTP id f4AIXLJ83299; Thu, 10 May 2001 14:33:21 -0400 (EDT) (envelope-from freymann@eagle.ca) Message-ID: <00d001c0d980$1fb34ee0$0f01a8c0@phantom> Reply-To: "Gerald T. Freymann" From: "Gerald T. Freymann" To: "Jeff Kolp" , "Lee Mark Mercado" Cc: References: Subject: Re: DNS Date: Thu, 10 May 2001 14:36:27 -0400 Organization: eagle.ca MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > it's connected via DSL that has a STATIC IP. Well, that sure makes it easier then! > ** FYI : the box is also an internet router/server for my local network > computers - which is already setup and running perfectly fine. ** Perfect. You going to run DNS for the domain I take it? Then you need to adjust your startup files so the box knows it's now you.atyourdomain.com (SIDE BAR: your freebsd box needs a "name" -- don't just call it "atyourdomain.com" -- give it a machine name as well... like "mybox.atmydomain.com". My examples will follow as "you.atyourdomain.com") You'll need to adjust /etc/resolv.conf domain atyourdomain.com nameserver a.b.c.d where a.b.c.d is the ip # of your freebsd box. And some changes to /etc/rc.conf are in order named_enable="YES" named_flags="-u bind -g bind" hostname="you.atyourdomain.com" You are going to run named as the user:group of bind:bind aren't you? ;-) As root, you'll need to create a directory --> mkdir /var/named and then change user:group to bind --> chown bind:bind /var/named --> chmod 755 /var/named Then in your /etc/namedb/named.conf file, you have some more work to do.. options { # # named boot file # directory "/etc/namedb"; pid-file "/var/named/named.pid"; forwarders { 142.77.2.36; # your upstream's DNS would be good here }; }; # zone "." { type hint; file "root.cache"; }; # zone "atyourdomain.com" { type master; file "atyourdomain.com.zone"; }; zone "c.b.a.in-addr.arpa" { type master; file "atyourdomain.com.rev"; }; zone "127.in-addr.arpa" { type master; file "localhost.rev"; }; Different SysAdmins handle the forward and reverse file names differently, but this is a good start at least. Pay very close attention to the periods at the end of various entries. Forward DNS entries go in "atyourdomain.com.zone" Something like.. -------------------------------- $TTL 3d ; Default cached time to live for all records @ IN SOA atyourdomain.com. root.atyourdomain.com. ( 2001051001 172800 3600 1728000 172800 ) IN NS ns.atyourdomain.com. IN MX 0 you.atyourdomain.com. $ORIGIN atyourdomain.com. atyourdomain.com. IN A a.b.c.d you IN A a.b.c.d ns IN A a.b.c.d -------------------------------- Reverse DNS entries go in "atyourdomain.com.rev" Something like... -------------------------------- $TTL 3d ; Default cached time to live for all records @ IN SOA atyourdomain.com. root.atyourdomain.com. ( 2001051001; Serial 172800 ; Refresh every 2 days 3600 ; Retry every hour 1728000 ; Expire every 20 days 172800 ); Minimum 2 days ; IN NS ns.atyourdomain.com. d IN PTR you.atyourdomain.com. d IN PTR atyourdomain.com. -------------------------------- "d" in this case the last number of your IP number used earlier a.b.c.d Now restart named. Would be good to do some nslookups on your forward and reverse.. nslookup a.b.c.d then whatever that returns, do the same nslookup you.atyourdomain.com I would expect the two to jive. Once you have your DNS set up, go back to the registrar that you registered your domain at, and submit a zone change, indicating that the IP you use is now the primary DNS. Maybe somebody else you know will do secondary for you, or just omit it (if that's possible?) With the zone file I've created, you would submit: Primary DNS: ns.atyourdomain.com a.b.c.d How's that for a good start? -gf To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message