]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - testdata/04-checkconf.tdir/good.all
Vendor import of Unbound 1.11.0.
[FreeBSD/FreeBSD.git] / testdata / 04-checkconf.tdir / good.all
1 # To test, all options are used.
2 #
3 # Example configuration file.
4 #
5 # See unbound.conf(5) man page.
6 #
7 # this is a comment.
8
9 #Use this to include other text into the file.
10 #include: "otherfile.conf"
11
12 # The server clause sets the main parameters. 
13 server:
14         # whitespace is not necessary, but looks cleaner.
15
16         # verbosity number, 0 is least verbose. 1 is default.
17         verbosity: 2
18         
19         # number of threads to create. 1 disables threading.
20         num-threads: 1
21
22         # specify the interfaces to answer queries from by ip-address.
23         # If you give none the default (all) interface is used.
24         # specify every interface on a new 'interface:' labelled line.
25         interface: 192.0.2.153
26         interface: 192.0.2.154
27         interface: 2001:DB8::5
28
29         # port to answer queries from
30         port: 53
31
32         # number of port to allocate per thread, determines the size of the
33         # port range. A larger port range gives more resistance to certain
34         # spoof attacks, as it gets harder to guess which port is used. 
35         # But also takes more system resources (for open sockets).
36         outgoing-range: 16
37
38         outgoing-port-permit: 1000-1020
39         outgoing-port-avoid: 2000-2048
40         outgoing-port-avoid: 3000
41
42         # number of outgoing simultaneous tcp buffers to hold per thread.
43         outgoing-num-tcp: 10
44
45         # number of incoming simultaneous tcp buffers to hold per thread.
46         incoming-num-tcp: 10
47         
48         # buffer size for handling DNS data. No messages larger than this
49         # size can be sent or received, by UDP or TCP. In bytes.
50         msg-buffer-size: 65552
51
52         # the amount of memory to use for the message cache.
53         # in bytes. default is 4 Mb
54         msg-cache-size: 4194304
55
56         # the number of slabs to use for the message cache.
57         # the number of slabs must be a power of 2.
58         # more slabs reduce lock contention, but fragment memory usage.
59         msg-cache-slabs: 4
60
61         # the number of queries that a thread gets to service.
62         num-queries-per-thread: 1024
63
64         # the amount of memory to use for the RRset cache.
65         # in bytes. default is 4 Mb
66         rrset-cache-size: 4194304
67
68         # the number of slabs to use for the RRset cache.
69         # the number of slabs must be a power of 2.
70         # more slabs reduce lock contention, but fragment memory usage.
71         rrset-cache-slabs: 4
72
73         # the time to live (TTL) value for cached roundtrip times and
74         # EDNS version information for hosts. In seconds.
75         infra-host-ttl: 900
76
77         # the time to live (TTL) value for cached lame delegations. In sec.
78         infra-lame-ttl: 900
79
80         # the number of slabs to use for the Infrastructure cache.
81         # the number of slabs must be a power of 2.
82         # more slabs reduce lock contention, but fragment memory usage.
83         infra-cache-slabs: 4
84
85         # the maximum number of hosts that are cached (roundtrip times, EDNS).
86         infra-cache-numhosts: 10000
87
88         # the maximum size of the lame zones cached per host. in bytes.
89         infra-cache-lame-size: 10240
90
91         # Enable IPv4, "yes" or "no".
92         do-ip4: yes
93
94         # Enable IPv6, "yes" or "no".
95         do-ip6: yes
96
97         # Enable UDP, "yes" or "no".
98         do-udp: yes
99
100         # Enable TCP, "yes" or "no".
101         do-tcp: yes
102
103         # if given, a chroot(2) is done to the given directory.
104         # i.e. you can chroot to the working directory, for example,
105         # for extra security, but make sure all files are in that directory.
106         chroot: ""
107
108         # if given, user privileges are dropped (after binding port),
109         # and the given username is assumed. Default is nothing "".
110         username: "nobody"
111
112         # the working directory.
113         directory: "."
114
115         # the log file, "" means log to stderr. 
116         # Use of this option sets use-syslog to "no".
117         logfile: ""
118         
119         # Log to syslog(3) if yes. The log facility LOG_DAEMON is used to 
120         # log to, with identity "unbound". If yes, it overrides the logfile.
121         use-syslog: no 
122
123         # the pid file.
124         pidfile: "unbound.pid"
125         
126         # enable to not answer id.server and hostname.bind queries.
127         hide-identity: no
128         
129         # enable to not answer version.server and version.bind queries.
130         hide-version: no
131         
132         # the identity to report. Leave "" or default to return hostname.
133         identity: ""
134         
135         # the version to report. Leave "" or default to return package version.
136         version: ""
137         
138         # the target fetch policy.
139         # series of integers describing the policy per dependency depth. 
140         # The number of values in the list determines the maximum dependency 
141         # depth the recursor will pursue before giving up. Each integer means:
142         #       -1 : fetch all targets opportunistically,
143         #       0: fetch on demand,
144         #       positive value: fetch that many targets opportunistically.
145         # Enclose the list of numbers between quotes ("").
146         target-fetch-policy: "3 2 1 0 0"
147         
148         # Harden against very small EDNS buffer sizes. 
149         harden-short-bufsize: yes
150         
151         # Harden against unseemly large queries.
152         harden-large-queries: yes
153         
154         # Harden against out of zone rrsets, to avoid spoofing attempts. 
155         harden-glue: yes
156         
157         # Do not query the following addresses. No DNS queries are sent there.
158         # List one address per entry. To block other ports than the default
159         # DNS port, use "1.2.3.4@123" to block port 123 for 1.2.3.4.
160         do-not-query-address: 127.0.0.1
161         do-not-query-address: 127.0.0.2
162         do-not-query-address: 127.255.255.255
163         do-not-query-address: ::1
164         
165         # module configuration of the server. A string with identifiers
166         # separated by spaces. "iterator" or "validator iterator"
167         module-config: "validator iterator"
168         
169         # File with trusted keys for validation. Specify more than one file
170         # with several entries, one file per entry.
171         # Zone file format, with DS and DNSKEY entries.
172         trust-anchor-file: ""
173         
174         # Trusted key for validation. DS or DNSKEY. specify the RR on a
175         # single line, surrounded by "". TTL is ignored. class is IN default.
176         # (These examples are from August 2007 and may not be valid anymore).
177         trust-anchor: "nlnetlabs.nl. DNSKEY 257 3 5 AQPzzTWMz8qSWIQlfRnPckx2BiVmkVN6LPupO3mbz7FhLSnm26n6iG9N Lby97Ji453aWZY3M5/xJBSOS2vWtco2t8C0+xeO1bc/d6ZTy32DHchpW 6rDH1vp86Ll+ha0tmwyy9QP7y2bVw5zSbFCrefk8qCUBgfHm9bHzMG1U BYtEIQ=="
178         trust-anchor: "jelte.nlnetlabs.nl. DS 42860 5 1 14D739EB566D2B1A5E216A0BA4D17FA9B038BE4A"
179
180         # File with trusted keys for validation. Specify more than one file
181         # with several entries, one file per entry. Like trust-anchor-file
182         # but has a different file format. Format is BIND-9 style format, 
183         # the trusted-keys { name flag proto algo "key"; }; clauses are read.
184         trusted-keys-file: ""
185
186         # Override the date for validation with a specific fixed date.
187         # Do not set this unless you are debugging signature inception
188         # and expiration. "" or "0" turns the feature off. 
189         val-override-date: ""
190         
191         # The time to live for bogus data, rrsets and messages. This avoids
192         # some of the revalidation, until the time interval expires. in secs.
193         val-bogus-ttl: 900
194         
195         # Should additional section of secure message also be kept clean of
196         # unsecure data. Useful to shield the users of this validator from
197         # potential bogus data in the additional section. All unsigned data 
198         # in the additional section is removed from secure messages.
199         val-clean-additional: yes
200         
201         # Turn permissive mode on to permit bogus messages. Thus, messages
202         # for which security checks failed will be returned to clients,
203         # instead of SERVFAIL. It still performs the security checks, which
204         # result in interesting log files and possibly the AD bit in
205         # replies if the message is found secure. The default is off.
206         val-permissive-mode: no
207         
208         # It is possible to configure NSEC3 maximum iteration counts per
209         # keysize. Keep this table very short, as linear search is done.
210         # A message with an NSEC3 with larger count is marked insecure.
211         # List in ascending order the keysize and count values.
212         val-nsec3-keysize-iterations: "1024 150 2048 500 4096 2500"
213
214         # the amount of memory to use for the key cache.
215         # in bytes. default is 4 Mb
216         key-cache-size: 4194304
217
218         # the number of slabs to use for the key cache.
219         # the number of slabs must be a power of 2.
220         # more slabs reduce lock contention, but fragment memory usage.
221         key-cache-slabs: 4
222
223         # the value of the Differentiated Services Codepoint (DSCP)
224         # in the differentiated services field (DS) of the outgoing
225         # IP packets
226         ip-dscp: 5
227
228 # Stub zones.
229 # Create entries like below, to make all queries for 'example.com' and 
230 # 'example.org' go to the given list of nameservers. list zero or more 
231 # nameservers by hostname or by ipaddress.
232 stub-zone:
233         name: "example.com"
234         stub-addr: 192.0.2.68
235 stub-zone:
236         name: "example.org"
237         stub-host: ns.example.com.
238
239 # Forward zones
240 # Create entries like below, to make all queries for 'example.com' and
241 # 'example.org' go to the given list of servers. These servers have to handle
242 # recursion to other nameservers. List zero or more nameservers by hostname
243 # or by ipaddress. Use an entry with name "." to forward all queries.
244 forward-zone:
245         name: "example.com"
246         forward-addr: 192.0.2.68
247         forward-addr: 192.0.2.73@5355  # forward to port 5355.
248 forward-zone:
249         name: "example.org"
250         forward-host: fwd.example.com