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:
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.