Attach bind-9.2.4rc4 to the base system. Rip out bind-8 binaries and add
[dragonfly.git] / etc / namedb / README
1 $DragonFly: src/etc/namedb/README,v 1.1 2004/05/27 18:15:40 dillon Exp $
2
3                         Running BIND-9's NAMED 
4
5     First, note that if all you want to do is list a set of name servers,
6     you can simply edit /etc/resolv.conf.  There is no need to run named.
7
8     An example /etc/resolv.conf file might be:
9
10     ---- cut here ----
11     domain your.domain.blah
12     search your.domain.blah someother.domain.blah
13     nameserver 192.168.5.5              <<<< IP addresses of nameservers
14     nameserver 192.168.5.10
15     ---- cut here ----
16
17     If you want to run named the 'named' and 'named.conf' manual pages,
18     and other manual pages, should be helpful.  
19
20     To get a basic named running you have to follow these steps:
21
22     * Generate an rndc.key file in /etc/namedb so 'rndc' works
23     * Generate localhost.rev and localhost-v6.rev
24     * Obtain the latest root.zone file or use named.root.
25     * Edit named.conf as appropriate for what you are trying to do.
26     * Start named with rndc and enable it in /etc/rc.conf
27
28     (1) Generating rndc.key
29
30         cd /etc/namedb; rndc-confgen -a; chown bind rndc.key
31
32         The default named.conf already contains the appropriate include
33         line and controls { } directive to allow rndc to access named
34         once a key has been generated.  This program should generate
35         a 'rndc.key' file.  Since we run named as user 'bind' by default,
36         the rndc.key file must be owned by the 'bind' user.
37
38     (2) Running './make-localhost' in /etc/namedb will generate
39         "localhost.rev" and "localhost-v6.rev".  The default named.conf
40         file references these files.  It is important for your named.conf
41         to be a master for localhost lookups to avoid certain types of
42         spoofing attacks.
43
44     (3) Obtain the latest root.zone file.  Running "./getroot" in 
45         /etc/namedb will download the latest root.zone file.  Edit
46         your named.conf to comment out the named.root hint directive and
47         uncomment the root.zone master directive.
48
49         Using a root.zone file is more reliable then using a hint file.
50         It is a good idea to run the getroot script once a week from a
51         cron job to keep your root.zone file up-to-date.
52
53     (4) Edit named.conf.  If you want to run named it must be for a reason,
54         so you need to edit named.conf to set up the desired environment.
55         named is typically used as a caching forwarding server, or a 
56         straight caching server.
57
58     (5) Start named.  named is typically started using the
59         /usr/sbin/named.restart script.  This script will pull in 
60         rc.conf to figure out the appropriate arguments and then run rndc
61         with the appropriate options to [re]start named.
62
63     Always test your running named to make sure it is operating as advertised.
64     Run 'rndc status' to double check rndc's access to the named process,
65     and use 'dig @localhost some.domain.name' to run a test lookup on a
66     domain using your name server to make sure it works properly.
67