]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/unbound/doc/example.conf.in
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / unbound / doc / example.conf.in
1 #
2 # Example configuration file.
3 #
4 # See unbound.conf(5) man page, version 1.4.20.
5 #
6 # this is a comment.
7
8 #Use this to include other text into the file.
9 #include: "otherfile.conf"
10
11 # The server clause sets the main parameters. 
12 server:
13         # whitespace is not necessary, but looks cleaner.
14
15         # verbosity number, 0 is least verbose. 1 is default.
16         verbosity: 1
17
18         # print statistics to the log (for every thread) every N seconds.
19         # Set to "" or 0 to disable. Default is disabled.
20         # statistics-interval: 0
21
22         # enable cumulative statistics, without clearing them after printing.
23         # statistics-cumulative: no
24
25         # enable extended statistics (query types, answer codes, status)
26         # printed from unbound-control. default off, because of speed.
27         # extended-statistics: no
28
29         # number of threads to create. 1 disables threading.
30         # num-threads: 1
31
32         # specify the interfaces to answer queries from by ip-address.
33         # The default is to listen to localhost (127.0.0.1 and ::1).
34         # specify 0.0.0.0 and ::0 to bind to all available interfaces.
35         # specify every interface[@port] on a new 'interface:' labelled line.
36         # The listen interfaces are not changed on reload, only on restart.
37         # interface: 192.0.2.153
38         # interface: 192.0.2.154
39         # interface: 192.0.2.154@5003
40         # interface: 2001:DB8::5
41
42         # enable this feature to copy the source address of queries to reply.
43         # Socket options are not supported on all platforms. experimental. 
44         # interface-automatic: no
45
46         # port to answer queries from
47         # port: 53
48
49         # specify the interfaces to send outgoing queries to authoritative
50         # server from by ip-address. If none, the default (all) interface
51         # is used. Specify every interface on a 'outgoing-interface:' line.
52         # outgoing-interface: 192.0.2.153
53         # outgoing-interface: 2001:DB8::5
54         # outgoing-interface: 2001:DB8::6
55
56         # number of ports to allocate per thread, determines the size of the
57         # port range that can be open simultaneously.  About double the
58         # num-queries-per-thread, or, use as many as the OS will allow you.
59         # outgoing-range: 4096
60
61         # permit unbound to use this port number or port range for
62         # making outgoing queries, using an outgoing interface.
63         # outgoing-port-permit: 32768
64
65         # deny unbound the use this of port number or port range for
66         # making outgoing queries, using an outgoing interface.
67         # Use this to make sure unbound does not grab a UDP port that some
68         # other server on this computer needs. The default is to avoid
69         # IANA-assigned port numbers.
70         # If multiple outgoing-port-permit and outgoing-port-avoid options
71         # are present, they are processed in order.
72         # outgoing-port-avoid: "3200-3208"
73
74         # number of outgoing simultaneous tcp buffers to hold per thread.
75         # outgoing-num-tcp: 10
76
77         # number of incoming simultaneous tcp buffers to hold per thread.
78         # incoming-num-tcp: 10
79
80         # buffer size for UDP port 53 incoming (SO_RCVBUF socket option).
81         # 0 is system default.  Use 4m to catch query spikes for busy servers.
82         # so-rcvbuf: 0
83
84         # buffer size for UDP port 53 outgoing (SO_SNDBUF socket option).
85         # 0 is system default.  Use 4m to handle spikes on very busy servers.
86         # so-sndbuf: 0
87
88         # EDNS reassembly buffer to advertise to UDP peers (the actual buffer
89         # is set with msg-buffer-size). 1480 can solve fragmentation (timeouts).
90         # edns-buffer-size: 4096
91
92         # buffer size for handling DNS data. No messages larger than this
93         # size can be sent or received, by UDP or TCP. In bytes.
94         # msg-buffer-size: 65552
95
96         # the amount of memory to use for the message cache.
97         # plain value in bytes or you can append k, m or G. default is "4Mb". 
98         # msg-cache-size: 4m
99
100         # the number of slabs to use for the message cache.
101         # the number of slabs must be a power of 2.
102         # more slabs reduce lock contention, but fragment memory usage.
103         # msg-cache-slabs: 4
104
105         # the number of queries that a thread gets to service.
106         # num-queries-per-thread: 1024
107
108         # if very busy, 50% queries run to completion, 50% get timeout in msec
109         # jostle-timeout: 200
110
111         # the amount of memory to use for the RRset cache.
112         # plain value in bytes or you can append k, m or G. default is "4Mb". 
113         # rrset-cache-size: 4m
114
115         # the number of slabs to use for the RRset cache.
116         # the number of slabs must be a power of 2.
117         # more slabs reduce lock contention, but fragment memory usage.
118         # rrset-cache-slabs: 4
119
120         # the time to live (TTL) value lower bound, in seconds. Default 0.
121         # If more than an hour could easily give trouble due to stale data.
122         # cache-min-ttl: 0
123
124         # the time to live (TTL) value cap for RRsets and messages in the
125         # cache. Items are not cached for longer. In seconds.
126         # cache-max-ttl: 86400
127
128         # the time to live (TTL) value for cached roundtrip times, lameness and
129         # EDNS version information for hosts. In seconds.
130         # infra-host-ttl: 900
131
132         # the number of slabs to use for the Infrastructure cache.
133         # the number of slabs must be a power of 2.
134         # more slabs reduce lock contention, but fragment memory usage.
135         # infra-cache-slabs: 4
136
137         # the maximum number of hosts that are cached (roundtrip, EDNS, lame).
138         # infra-cache-numhosts: 10000
139
140         # Enable IPv4, "yes" or "no".
141         # do-ip4: yes
142
143         # Enable IPv6, "yes" or "no".
144         # do-ip6: yes
145
146         # Enable UDP, "yes" or "no".
147         # do-udp: yes
148
149         # Enable TCP, "yes" or "no".
150         # do-tcp: yes
151
152         # upstream connections use TCP only (and no UDP), "yes" or "no"
153         # useful for tunneling scenarios, default no.
154         # tcp-upstream: no
155
156         # Detach from the terminal, run in background, "yes" or "no".
157         # do-daemonize: yes
158
159         # control which clients are allowed to make (recursive) queries
160         # to this server. Specify classless netblocks with /size and action.
161         # By default everything is refused, except for localhost.
162         # Choose deny (drop message), refuse (polite error reply),
163         # allow (recursive ok), allow_snoop (recursive and nonrecursive ok)
164         # access-control: 0.0.0.0/0 refuse
165         # access-control: 127.0.0.0/8 allow
166         # access-control: ::0/0 refuse
167         # access-control: ::1 allow
168         # access-control: ::ffff:127.0.0.1 allow
169
170         # if given, a chroot(2) is done to the given directory.
171         # i.e. you can chroot to the working directory, for example,
172         # for extra security, but make sure all files are in that directory.
173         #
174         # If chroot is enabled, you should pass the configfile (from the
175         # commandline) as a full path from the original root. After the
176         # chroot has been performed the now defunct portion of the config 
177         # file path is removed to be able to reread the config after a reload. 
178         #
179         # All other file paths (working dir, logfile, roothints, and
180         # key files) can be specified in several ways:
181         #       o as an absolute path relative to the new root.
182         #       o as a relative path to the working directory.
183         #       o as an absolute path relative to the original root.
184         # In the last case the path is adjusted to remove the unused portion.
185         #
186         # The pid file can be absolute and outside of the chroot, it is 
187         # written just prior to performing the chroot and dropping permissions.
188         #
189         # Additionally, unbound may need to access /dev/random (for entropy).
190         # How to do this is specific to your OS.
191         #
192         # If you give "" no chroot is performed. The path must not end in a /.
193         # chroot: "@UNBOUND_CHROOT_DIR@"
194
195         # if given, user privileges are dropped (after binding port),
196         # and the given username is assumed. Default is user "unbound".
197         # If you give "" no privileges are dropped.
198         # username: "@UNBOUND_USERNAME@"
199
200         # the working directory. The relative files in this config are 
201         # relative to this directory. If you give "" the working directory
202         # is not changed.
203         # directory: "@UNBOUND_RUN_DIR@"
204
205         # the log file, "" means log to stderr. 
206         # Use of this option sets use-syslog to "no".
207         # logfile: ""
208
209         # Log to syslog(3) if yes. The log facility LOG_DAEMON is used to 
210         # log to, with identity "unbound". If yes, it overrides the logfile.
211         # use-syslog: yes 
212
213         # print UTC timestamp in ascii to logfile, default is epoch in seconds.
214         # log-time-ascii: no
215         
216         # print one line with time, IP, name, type, class for every query.
217         # log-queries: no
218
219         # the pid file. Can be an absolute path outside of chroot/work dir.
220         # pidfile: "@UNBOUND_PIDFILE@"
221
222         # file to read root hints from.
223         # get one from ftp://FTP.INTERNIC.NET/domain/named.cache
224         # root-hints: ""
225
226         # enable to not answer id.server and hostname.bind queries.
227         # hide-identity: no
228
229         # enable to not answer version.server and version.bind queries.
230         # hide-version: no
231
232         # the identity to report. Leave "" or default to return hostname.
233         # identity: ""
234
235         # the version to report. Leave "" or default to return package version.
236         # version: ""
237
238         # the target fetch policy.
239         # series of integers describing the policy per dependency depth. 
240         # The number of values in the list determines the maximum dependency 
241         # depth the recursor will pursue before giving up. Each integer means:
242         #       -1 : fetch all targets opportunistically,
243         #       0: fetch on demand,
244         #       positive value: fetch that many targets opportunistically.
245         # Enclose the list of numbers between quotes ("").
246         # target-fetch-policy: "3 2 1 0 0"
247
248         # Harden against very small EDNS buffer sizes. 
249         # harden-short-bufsize: no
250
251         # Harden against unseemly large queries.
252         # harden-large-queries: no
253
254         # Harden against out of zone rrsets, to avoid spoofing attempts. 
255         # harden-glue: yes
256
257         # Harden against receiving dnssec-stripped data. If you turn it
258         # off, failing to validate dnskey data for a trustanchor will 
259         # trigger insecure mode for that zone (like without a trustanchor).
260         # Default on, which insists on dnssec data for trust-anchored zones.
261         # harden-dnssec-stripped: yes
262
263         # Harden against queries that fall under dnssec-signed nxdomain names.
264         # harden-below-nxdomain: no
265
266         # Harden the referral path by performing additional queries for
267         # infrastructure data.  Validates the replies (if possible).
268         # Default off, because the lookups burden the server.  Experimental 
269         # implementation of draft-wijngaards-dnsext-resolver-side-mitigation.
270         # harden-referral-path: no
271
272         # Use 0x20-encoded random bits in the query to foil spoof attempts.
273         # This feature is an experimental implementation of draft dns-0x20.
274         # use-caps-for-id: no
275
276         # Enforce privacy of these addresses. Strips them away from answers. 
277         # It may cause DNSSEC validation to additionally mark it as bogus. 
278         # Protects against 'DNS Rebinding' (uses browser as network proxy). 
279         # Only 'private-domain' and 'local-data' names are allowed to have 
280         # these private addresses. No default.
281         # private-address: 10.0.0.0/8
282         # private-address: 172.16.0.0/12
283         # private-address: 192.168.0.0/16
284         # private-address: 169.254.0.0/16
285         # private-address: fd00::/8
286         # private-address: fe80::/10
287
288         # Allow the domain (and its subdomains) to contain private addresses.
289         # local-data statements are allowed to contain private addresses too.
290         # private-domain: "example.com"
291
292         # If nonzero, unwanted replies are not only reported in statistics,
293         # but also a running total is kept per thread. If it reaches the
294         # threshold, a warning is printed and a defensive action is taken,
295         # the cache is cleared to flush potential poison out of it.
296         # A suggested value is 10000000, the default is 0 (turned off).
297         # unwanted-reply-threshold: 0
298
299         # Do not query the following addresses. No DNS queries are sent there.
300         # List one address per entry. List classless netblocks with /size,
301         # do-not-query-address: 127.0.0.1/8
302         # do-not-query-address: ::1
303
304         # if yes, the above default do-not-query-address entries are present.
305         # if no, localhost can be queried (for testing and debugging).
306         # do-not-query-localhost: yes
307
308         # if yes, perform prefetching of almost expired message cache entries.
309         # prefetch: no
310
311         # if yes, perform key lookups adjacent to normal lookups.
312         # prefetch-key: no
313
314         # if yes, Unbound rotates RRSet order in response.
315         # rrset-roundrobin: no
316
317         # if yes, Unbound doesn't insert authority/additional sections
318         # into response messages when those sections are not required.
319         # minimal-responses: no
320
321         # module configuration of the server. A string with identifiers
322         # separated by spaces. "iterator" or "validator iterator"
323         # module-config: "validator iterator"
324
325         # File with trusted keys, kept uptodate using RFC5011 probes,
326         # initial file like trust-anchor-file, then it stores metadata.
327         # Use several entries, one per domain name, to track multiple zones.
328         #
329         # If you want to perform DNSSEC validation, run unbound-anchor before
330         # you start unbound (i.e. in the system boot scripts).  And enable:
331         # Please note usage of unbound-anchor root anchor is at your own risk
332         # and under the terms of our LICENSE (see that file in the source).
333         # auto-trust-anchor-file: "@UNBOUND_ROOTKEY_FILE@"
334
335         # File with DLV trusted keys. Same format as trust-anchor-file.
336         # There can be only one DLV configured, it is trusted from root down.
337         # Download http://ftp.isc.org/www/dlv/dlv.isc.org.key
338         # dlv-anchor-file: "dlv.isc.org.key"
339
340         # File with trusted keys for validation. Specify more than one file
341         # with several entries, one file per entry.
342         # Zone file format, with DS and DNSKEY entries.
343         # Note this gets out of date, use auto-trust-anchor-file please.
344         # trust-anchor-file: ""
345         
346         # Trusted key for validation. DS or DNSKEY. specify the RR on a
347         # single line, surrounded by "". TTL is ignored. class is IN default.
348         # Note this gets out of date, use auto-trust-anchor-file please.
349         # (These examples are from August 2007 and may not be valid anymore).
350         # trust-anchor: "nlnetlabs.nl. DNSKEY 257 3 5 AQPzzTWMz8qSWIQlfRnPckx2BiVmkVN6LPupO3mbz7FhLSnm26n6iG9N Lby97Ji453aWZY3M5/xJBSOS2vWtco2t8C0+xeO1bc/d6ZTy32DHchpW 6rDH1vp86Ll+ha0tmwyy9QP7y2bVw5zSbFCrefk8qCUBgfHm9bHzMG1U BYtEIQ=="
351         # trust-anchor: "jelte.nlnetlabs.nl. DS 42860 5 1 14D739EB566D2B1A5E216A0BA4D17FA9B038BE4A"
352
353         # File with trusted keys for validation. Specify more than one file
354         # with several entries, one file per entry. Like trust-anchor-file
355         # but has a different file format. Format is BIND-9 style format, 
356         # the trusted-keys { name flag proto algo "key"; }; clauses are read.
357         # you need external update procedures to track changes in keys.
358         # trusted-keys-file: ""
359
360         # Ignore chain of trust. Domain is treated as insecure.
361         # domain-insecure: "example.com"
362
363         # Override the date for validation with a specific fixed date.
364         # Do not set this unless you are debugging signature inception
365         # and expiration. "" or "0" turns the feature off. -1 ignores date.
366         # val-override-date: ""
367
368         # The time to live for bogus data, rrsets and messages. This avoids
369         # some of the revalidation, until the time interval expires. in secs.
370         # val-bogus-ttl: 60
371
372         # The signature inception and expiration dates are allowed to be off
373         # by 10% of the signature lifetime (expir-incep) from our local clock.
374         # This leeway is capped with a minimum and a maximum.  In seconds.
375         # val-sig-skew-min: 3600
376         # val-sig-skew-max: 86400
377
378         # Should additional section of secure message also be kept clean of
379         # unsecure data. Useful to shield the users of this validator from
380         # potential bogus data in the additional section. All unsigned data 
381         # in the additional section is removed from secure messages.
382         # val-clean-additional: yes
383
384         # Turn permissive mode on to permit bogus messages. Thus, messages
385         # for which security checks failed will be returned to clients,
386         # instead of SERVFAIL. It still performs the security checks, which
387         # result in interesting log files and possibly the AD bit in
388         # replies if the message is found secure. The default is off.
389         # val-permissive-mode: no
390
391         # Ignore the CD flag in incoming queries and refuse them bogus data.
392         # Enable it if the only clients of unbound are legacy servers (w2008)
393         # that set CD but cannot validate themselves.
394         # ignore-cd-flag: no
395
396         # Have the validator log failed validations for your diagnosis.
397         # 0: off. 1: A line per failed user query. 2: With reason and bad IP.
398         # val-log-level: 0
399
400         # It is possible to configure NSEC3 maximum iteration counts per
401         # keysize. Keep this table very short, as linear search is done.
402         # A message with an NSEC3 with larger count is marked insecure.
403         # List in ascending order the keysize and count values.
404         # val-nsec3-keysize-iterations: "1024 150 2048 500 4096 2500"
405         
406         # instruct the auto-trust-anchor-file probing to add anchors after ttl.
407         # add-holddown: 2592000 # 30 days
408
409         # instruct the auto-trust-anchor-file probing to del anchors after ttl.
410         # del-holddown: 2592000 # 30 days
411
412         # auto-trust-anchor-file probing removes missing anchors after ttl.
413         # If the value 0 is given, missing anchors are not removed.
414         # keep-missing: 31622400 # 366 days
415
416         # the amount of memory to use for the key cache.
417         # plain value in bytes or you can append k, m or G. default is "4Mb". 
418         # key-cache-size: 4m
419
420         # the number of slabs to use for the key cache.
421         # the number of slabs must be a power of 2.
422         # more slabs reduce lock contention, but fragment memory usage.
423         # key-cache-slabs: 4
424
425         # the amount of memory to use for the negative cache (used for DLV).
426         # plain value in bytes or you can append k, m or G. default is "1Mb". 
427         # neg-cache-size: 1m
428
429         # a number of locally served zones can be configured.
430         #       local-zone: <zone> <type>
431         #       local-data: "<resource record string>"
432         # o deny serves local data (if any), else, drops queries. 
433         # o refuse serves local data (if any), else, replies with error.
434         # o static serves local data, else, nxdomain or nodata answer.
435         # o transparent gives local data, but resolves normally for other names
436         # o redirect serves the zone data for any subdomain in the zone.
437         # o nodefault can be used to normally resolve AS112 zones.
438         # o typetransparent resolves normally for other types and other names
439         #
440         # defaults are localhost address, reverse for 127.0.0.1 and ::1
441         # and nxdomain for AS112 zones. If you configure one of these zones
442         # the default content is omitted, or you can omit it with 'nodefault'.
443         # 
444         # If you configure local-data without specifying local-zone, by
445         # default a transparent local-zone is created for the data.
446         #
447         # You can add locally served data with
448         # local-zone: "local." static
449         # local-data: "mycomputer.local. IN A 192.0.2.51"
450         # local-data: 'mytext.local TXT "content of text record"'
451         #
452         # You can override certain queries with
453         # local-data: "adserver.example.com A 127.0.0.1"
454         #
455         # You can redirect a domain to a fixed address with
456         # (this makes example.com, www.example.com, etc, all go to 192.0.2.3)
457         # local-zone: "example.com" redirect
458         # local-data: "example.com A 192.0.2.3"
459         #
460         # Shorthand to make PTR records, "IPv4 name" or "IPv6 name".
461         # You can also add PTR records using local-data directly, but then
462         # you need to do the reverse notation yourself.
463         # local-data-ptr: "192.0.2.3 www.example.com"
464
465         # service clients over SSL (on the TCP sockets), with plain DNS inside
466         # the SSL stream.  Give the certificate to use and private key.
467         # default is "" (disabled).  requires restart to take effect.
468         # ssl-service-key: "path/to/privatekeyfile.key"
469         # ssl-service-pem: "path/to/publiccertfile.pem"
470         # ssl-port: 443
471
472         # request upstream over SSL (with plain DNS inside the SSL stream).
473         # Default is no.  Can be turned on and off with unbound-control.
474         # ssl-upstream: no
475
476 # Python config section. To enable:
477 # o use --with-pythonmodule to configure before compiling.
478 # o list python in the module-config string (above) to enable.
479 # o and give a python-script to run.
480 python:
481         # Script file to load
482         # python-script: "@UNBOUND_SHARE_DIR@/ubmodule-tst.py"
483
484 # Remote control config section. 
485 remote-control:
486         # Enable remote control with unbound-control(8) here.
487         # set up the keys and certificates with unbound-control-setup.
488         # control-enable: no
489
490         # what interfaces are listened to for remote control.
491         # give 0.0.0.0 and ::0 to listen to all interfaces.
492         # control-interface: 127.0.0.1
493         # control-interface: ::1
494
495         # port number for remote control operations.
496         # control-port: 8953
497
498         # unbound server key file.
499         # server-key-file: "@UNBOUND_RUN_DIR@/unbound_server.key"
500
501         # unbound server certificate file.
502         # server-cert-file: "@UNBOUND_RUN_DIR@/unbound_server.pem"
503
504         # unbound-control key file.
505         # control-key-file: "@UNBOUND_RUN_DIR@/unbound_control.key"
506
507         # unbound-control certificate file.
508         # control-cert-file: "@UNBOUND_RUN_DIR@/unbound_control.pem"
509
510 # Stub zones.
511 # Create entries like below, to make all queries for 'example.com' and 
512 # 'example.org' go to the given list of nameservers. list zero or more 
513 # nameservers by hostname or by ipaddress. If you set stub-prime to yes, 
514 # the list is treated as priming hints (default is no).
515 # With stub-first yes, it attempts without the stub if it fails.
516 # stub-zone:
517 #       name: "example.com"
518 #       stub-addr: 192.0.2.68
519 #       stub-prime: no
520 #       stub-first: no
521 # stub-zone:
522 #       name: "example.org"
523 #       stub-host: ns.example.com.
524
525 # Forward zones
526 # Create entries like below, to make all queries for 'example.com' and
527 # 'example.org' go to the given list of servers. These servers have to handle
528 # recursion to other nameservers. List zero or more nameservers by hostname
529 # or by ipaddress. Use an entry with name "." to forward all queries.
530 # If you enable forward-first, it attempts without the forward if it fails.
531 # forward-zone:
532 #       name: "example.com"
533 #       forward-addr: 192.0.2.68
534 #       forward-addr: 192.0.2.73@5355  # forward to port 5355.
535 #       forward-first: no
536 # forward-zone:
537 #       name: "example.org"
538 #       forward-host: fwd.example.com