Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 May 2001 14:36:27 -0400
From:      "Gerald T. Freymann" <freymann@eagle.ca>
To:        "Jeff Kolp" <linux@icpn.com>, "Lee Mark Mercado" <mercadolee@hotmail.com>
Cc:        <freebsd-questions@FreeBSD.ORG>
Subject:   Re: DNS
Message-ID:  <00d001c0d980$1fb34ee0$0f01a8c0@phantom>
References:  <F102bh29cM3oryKFRJr00001e93@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00d001c0d980$1fb34ee0$0f01a8c0>