1 $DragonFly: src/etc/namedb/README,v 1.1 2004/05/27 18:15:40 dillon Exp $
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.
8 An example /etc/resolv.conf file might be:
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
17 If you want to run named the 'named' and 'named.conf' manual pages,
18 and other manual pages, should be helpful.
20 To get a basic named running you have to follow these steps:
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
28 (1) Generating rndc.key
30 cd /etc/namedb; rndc-confgen -a; chown bind rndc.key
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.
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
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.
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.
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.
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.
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.