Merge from vendor branch LESS:
[dragonfly.git] / etc / namedb / named.conf
1 // $FreeBSD: src/etc/namedb/named.conf,v 1.6.2.7 2003/02/13 13:16:51 keramida Exp $
2 // $DragonFly: src/etc/namedb/named.conf,v 1.5 2006/05/17 19:22:32 joerg Exp $
3 //
4 // Refer to the named.conf(5) and named(8) man pages for details.  If
5 // you are ever going to set up a primary server, make sure you
6 // understand the hairy details of how DNS works.  Even with
7 // simple mistakes, you can break connectivity for affected parties,
8 // or cause huge amounts of useless Internet traffic.
9
10 include "rndc.key";
11
12 controls {
13     inet 127.0.0.1 allow { 127.0.0.1; } keys { "rndc-key"; };
14 };
15
16 acl access {
17         localhost;
18         localnets;
19 };
20
21 options {
22 // When running chroot /etc/namedb/etc/namedb is a softlink to ".." just
23 // so we can leave the directory directive set to something that works
24 // in both chroot and normal modes.
25 //
26         directory "/etc/namedb";
27
28 // In addition to the "forwarders" clause, you can force your name
29 // server to never initiate queries of its own, but always ask its
30 // forwarders only, by enabling the following line:
31 //
32 //      forward only;
33
34
35 // Prevent external networks from using us to query domains we are not
36 // authoritative for.
37 //
38         allow-recursion { 
39                 localhost; 
40         };
41
42 // If you've got a DNS server around at your upstream provider, enter 
43 // its IP address here, and enable the line below.  This will make you
44 // benefit from its cache, thus reduce overall DNS traffic in the Internet.
45 //
46 //      forwarders {
47 //              127.0.0.1;
48 //      };
49
50 // If there is a firewall between you and nameservers you want
51 // to talk to, you might need to uncomment the query-source
52 // directive below.  Previous versions of BIND always asked
53 // questions using port 53, but BIND 8.1 uses an unprivileged
54 // port by default.
55 //
56 //      query-source address * port 53;
57
58 // If running in a sandbox the base directory is typically not writable,
59 // store the dump file in the secondaries directory.
60 //
61         dump-file "s/named_dump.db";
62 };
63
64 // Note: the following will be supported in a future release.
65 //
66 // host { any; } {
67 //      topology {
68 //              127.0.0.0/8;
69 //      };
70 // };
71
72 // If you intend to run a recursive name server you need some hints to
73 // find the root zone ".", or you need a root.zone file which contains
74 // records for all top level domains (e.g. like '.com').
75 //
76 // A hint file is included and can be used for a quick-and-dirty 
77 // configuration, but it is better to use the 'getroot' script and pull 
78 // the real root.zone file.  
79 //
80 // If you use a root.zone file then comment out the hint directive below
81 // and uncomment the root.zone directive.  Set up a cron job to run the
82 // ./getroot script once a week to keep the root.zone file up-to-date.
83 //
84 // FOR SAFETY, THE "/etc/namedb" DIRECTORY and the "getroot" SCRIPT SHOULD
85 // BE OWNED BY ROOT AND ONLY WRITABLE BY ROOT.
86
87 zone "." {
88         type hint;
89         file "named.root";
90 };
91
92 // zone "." {
93 //      type master;
94 //      file "root.zone";
95 // };
96
97
98 // Setting up secondaries is way easier and a rough example for this
99 // is provided below.
100 //
101 // If you enable a local name server, don't forget to enter 127.0.0.1
102 // first in your /etc/resolv.conf so this server will be queried.
103 // Also, make sure to enable it in /etc/rc.conf.
104
105 zone "0.0.127.IN-ADDR.ARPA" {
106         type master;
107         file "localhost.rev";
108 };
109
110 // RFC 3152
111 zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA" {
112         type master;
113         file "localhost-v6.rev";
114 };
115
116 // RFC 1886 -- deprecated
117 zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.INT" {
118         type master;
119         file "localhost-v6.rev";
120 };
121
122 // NB: Do not use the IP addresses below, they are faked, and only
123 // serve demonstration/documentation purposes!
124 //
125 // Example secondary config entries.  It can be convenient to become
126 // a secondary at least for the zone your own domain is in.  Ask
127 // your network administrator for the IP address of the responsible
128 // primary.
129 //
130 // Never forget to include the reverse lookup (IN-ADDR.ARPA) zone!
131 // (This is named after the first bytes of the IP address, in reverse
132 // order, with ".IN-ADDR.ARPA" appended.)
133 //
134 // Before starting to set up a primary zone, make sure you fully
135 // understand how DNS and BIND works.  There are sometimes
136 // non-obvious pitfalls.  Setting up a secondary is simpler.
137 //
138 // NB: Don't blindly enable the examples below. :-)  Use actual names
139 // and addresses instead.
140 //
141 // NOTE!!! FreeBSD can run bind in a sandbox (see named_flags in rc.conf).
142 // The directory containing the secondary zones must be write accessible 
143 // to bind.  The following sequence is suggested:
144 //
145 //      mkdir /etc/namedb/s
146 //      chown bind:bind /etc/namedb/s
147 //      chmod 750 /etc/namedb/s
148 //
149 //
150 // zone "domain.com" {
151 //      type slave;
152 //      file "s/domain.com.bak";
153 //      masters {
154 //              192.168.1.1;
155 //      };
156 // };
157 //
158 // zone "0.168.192.in-addr.arpa" {
159 //      type slave;
160 //      file "s/0.168.192.in-addr.arpa.bak";
161 //      masters {
162 //              192.168.1.1;
163 //      };
164 // };
165