bind-tutorial

Hi all,

I am sorry if my question is little bit silly, i want to ask about, anyone can give me a link to tutorial about how to install bind9-dns on freebsd? please..

i found a few tutorial on google, and i was try to do what it tells to do..but, i become confuse because there is so much different things between one tutorial and another..so i don't know which one is correct.. :(


Thanks..
 
Installing it is simply a matter of installing the package or port. See the handbook on that.

As for configuring bind itself any linux/*nix tutorial will do. Bind=bind it doesn't matter on what OS it runs on.
 
I did the following "quick start" up for someone recently. It isn't meant to represent the be-all end-all configuration for bind but perhaps gets you further along the way.

Assuming you've got bind installed from ports (don't forget to edit /etc/rc.conf):

Code:
cd /etc/named
mkdir soa
cd soa
cat > db.yourdomain.com <<EOF

Then paste the following (edit your domain details carefully first, or after creating the file):

Code:
; this is a bare minimum stub 
$TTL 3600
@       IN      SOA     ns1.yourdomain.com. hostmaster.yourdomain.com. (
                        2009032401  ; serial number in YYYYMMDD01, 02, 03, etc format. 
                        10800
                        3600
                        604800
                    86400 )         ; min TTL of 1 day
    
; primary name servers
        IN      NS      ns1.yourdomain.com.
        IN      NS      ns2.yourdomain.com.

; mailexchangers
                MX      10 mx1.yourdomain.com.
; ident
                TXT     "Foo Bar Inc. We eat kittens."

;  addresses for canonical names; we'll assume you have minimum two IP's
yourdomain.com.         IN  A       12.34.56.78
eggs.yourdomain.com.    IN  A       12.34.56.78
bacon.yourdomain.com.   IN  A       12.34.56.79

mx1.yourdomain.com.     IN  CNAME   eggs.yourdomain.com.
ns1.yourdomain.com.     IN  CNAME   eggs.yourdomain.com.
ns2.yourdomain.com.     IN  CNAME   bacon.yourdomain.com.

; you could use short form aliases too
mail                    IN  CNAME   yourdomain.com.
ftp                     IN  CNAME   yourdomain.com.
www                     IN  CNAME   yourdomain.com.

EOF
That'll leave you with a "zone file" for your domain in the subdirectory `soa`. Now we have to edit named.conf:

Code:
cd ..
vim named.conf

ADD at the very bottom a reference to your newly created zone file:

Code:
zone "yourdomain.com" in {
    type master;
    file "soa/db.yourdomain.com";
    allow-query { any; };
};

Near the top of your named.conf if you don't have an "acl" stanza ADD the following:

Code:
acl internal {127.0.0.1;};

You no doubt will have an "options" block; ensure that at least these lines are in it. Don't remove things you don't know about:

Code:
options {
    version "surely you must be joking";
    allow-recursion { internal; };

;... more stuff
}
If this kick start doesn't get you going, then it's time to hire someone.
 
If you know how DNS works, the FreeBSD doc is enough.
Seems you need a bind doc in general, this is a good cookbook: DNS and BIND (5th Edition).
It's the same over all platforms.
 
SirDice said:
Installing it is simply a matter of installing the package or port. See the handbook on that.

As for configuring bind itself any linux/*nix tutorial will do. Bind=bind it doesn't matter on what OS it runs on.

Roger that, sir..thanks, for your advise, i am just in panic mode, i meet freebsd since last two weeks ago, and i have deadline for my dns server..puff..make me feel nervous.. -__-"

mwatkins said:
I did the following "quick start" up for someone recently. It isn't meant to represent the be-all end-all configuration for bind but perhaps gets you further along the way.

Assuming you've got bind installed from ports (don't forget to edit /etc/rc.conf):

Code:
cd /etc/named
mkdir soa
cd soa
cat > db.yourdomain.com <<EOF

Then paste the following (edit your domain details carefully first, or after creating the file):

Code:
; this is a bare minimum stub 
$TTL 3600
@       IN      SOA     ns1.yourdomain.com. hostmaster.yourdomain.com. (
                        2009032401  ; serial number in YYYYMMDD01, 02, 03, etc format. 
                        10800
                        3600
                        604800
                    86400 )         ; min TTL of 1 day
    
; primary name servers
        IN      NS      ns1.yourdomain.com.
        IN      NS      ns2.yourdomain.com.

; mailexchangers
                MX      10 mx1.yourdomain.com.
; ident
                TXT     "Foo Bar Inc. We eat kittens."

;  addresses for canonical names; we'll assume you have minimum two IP's
yourdomain.com.         IN  A       12.34.56.78
eggs.yourdomain.com.    IN  A       12.34.56.78
bacon.yourdomain.com.   IN  A       12.34.56.79

mx1.yourdomain.com.     IN  CNAME   eggs.yourdomain.com.
ns1.yourdomain.com.     IN  CNAME   eggs.yourdomain.com.
ns2.yourdomain.com.     IN  CNAME   bacon.yourdomain.com.

; you could use short form aliases too
mail                    IN  CNAME   yourdomain.com.
ftp                     IN  CNAME   yourdomain.com.
www                     IN  CNAME   yourdomain.com.

EOF
That'll leave you with a "zone file" for your domain in the subdirectory `soa`. Now we have to edit named.conf:

Code:
cd ..
vim named.conf

ADD at the very bottom a reference to your newly created zone file:

Code:
zone "yourdomain.com" in {
    type master;
    file "soa/db.yourdomain.com";
    allow-query { any; };
};

Near the top of your named.conf if you don't have an "acl" stanza ADD the following:

Code:
acl internal {127.0.0.1;};

You no doubt will have an "options" block; ensure that at least these lines are in it. Don't remove things you don't know about:

Code:
options {
    version "surely you must be joking";
    allow-recursion { internal; };

;... more stuff
}
If this kick start doesn't get you going, then it's time to hire someone.

Whoooaa..thanks a lot, sir..hehehe.. :D
I would try.. :D

hydra said:
If you know how DNS works, the FreeBSD doc is enough.
Seems you need a bind doc in general, this is a good cookbook: DNS and BIND (5th Edition).
It's the same over all platforms.

Yeah, you right, sir.. i just in hurry with my deadline, and in panic mode..so i feel so nervous.. and can't think clearly.. :(

varda said:
Take a look to ZYTRAX web site for some BIND9 documentation. It slightly outdated but has descriptions for most common configuration clauses and has examples too.

http://www.zytrax.com/books/dns/

Whooo..awesome..!! this is really complete sir..!! Thanks..! :D

johnblue said:

Roger that, sir..! I am on my way, thanks to give me your clue.. :D

--------------------------------

Now on, this is my problem, on
Code:
tail -f /var/log/messages
:

Code:
Apr 18 16:30:59 bsd1 named[1033]: starting BIND 9.3.5-P2 -t /var/named -u bind
Apr 18 16:30:59 bsd1 named[1033]: none:0: open: /etc/namedb/rndc.key: file not found
Apr 18 16:30:59 bsd1 named[1033]: couldn't add command channel 127.0.0.1#953: file not found
Apr 18 16:30:59 bsd1 named[1033]: none:0: open: /etc/namedb/rndc.key: file not found
Apr 18 16:30:59 bsd1 named[1033]: couldn't add command channel ::1#953: file not found
Apr 18 16:30:59 bsd1 named[1033]: dns_master_load: master/xx.xxx.xxx.in-addr.arpa.rev:2: unexpected end of line
Apr 18 16:30:59 bsd1 named[1033]: dns_master_load: master/xx.xxx.xxx.in-addr.arpa.rev:1: unexpected end of input
Apr 18 16:30:59 bsd1 named[1033]: zone xx.xxx.xxx.in-addr.arpa/IN: loading master file master/xx.xxx.xxx.in-addr.arpa.rev: unexpected end of input
Apr 18 16:30:59 bsd1 named[1033]: dns_master_load: master/mydomain.com.zone:2: unexpected end of line
Apr 18 16:30:59 bsd1 named[1033]: dns_master_load: master/mydomain.com.zone:1: unexpected end of input
Apr 18 16:30:59 bsd1 named[1033]: zone mydomain.com/IN: loading master file master/mydomain.com.zone: unexpected end of input

Can anyone give me more clue..hehehe.. :D
i think i had wrong in my reverse conf, but i was look it in a few times, and i thought i write it true..
Anyway, so sorry to bothering all of u..

Thanks.. :D
 
Thanks to all seniors, my problem solved, much of it, because i am not carefully write the file zone..hehe..once again, thanks a lot.. :D
 
Back
Top