example.conf.in revision 296415
1228753Smm# 2228753Smm# Example configuration file. 3228753Smm# 4228753Smm# See unbound.conf(5) man page, version 1.5.8. 5228753Smm# 6228753Smm# this is a comment. 7228753Smm 8228753Smm#Use this to include other text into the file. 9228753Smm#include: "otherfile.conf" 10228753Smm 11228753Smm# The server clause sets the main parameters. 12228753Smmserver: 13228753Smm # whitespace is not necessary, but looks cleaner. 14228753Smm 15228753Smm # verbosity number, 0 is least verbose. 1 is default. 16228753Smm verbosity: 1 17228753Smm 18228753Smm # print statistics to the log (for every thread) every N seconds. 19228753Smm # Set to "" or 0 to disable. Default is disabled. 20228753Smm # statistics-interval: 0 21228753Smm 22228753Smm # enable cumulative statistics, without clearing them after printing. 23228753Smm # statistics-cumulative: no 24228753Smm 25228753Smm # enable extended statistics (query types, answer codes, status) 26228753Smm # printed from unbound-control. default off, because of speed. 27228753Smm # extended-statistics: no 28228753Smm 29228753Smm # number of threads to create. 1 disables threading. 30228753Smm # num-threads: 1 31228753Smm 32228753Smm # specify the interfaces to answer queries from by ip-address. 33228753Smm # The default is to listen to localhost (127.0.0.1 and ::1). 34228753Smm # specify 0.0.0.0 and ::0 to bind to all available interfaces. 35228753Smm # specify every interface[@port] on a new 'interface:' labelled line. 36228753Smm # The listen interfaces are not changed on reload, only on restart. 37228753Smm # interface: 192.0.2.153 38228753Smm # interface: 192.0.2.154 39228753Smm # interface: 192.0.2.154@5003 40228753Smm # interface: 2001:DB8::5 41228753Smm 42228753Smm # enable this feature to copy the source address of queries to reply. 43228753Smm # Socket options are not supported on all platforms. experimental. 44228753Smm # interface-automatic: no 45228753Smm 46228753Smm # port to answer queries from 47228753Smm # port: 53 48228753Smm 49228753Smm # specify the interfaces to send outgoing queries to authoritative 50228753Smm # server from by ip-address. If none, the default (all) interface 51228753Smm # is used. Specify every interface on a 'outgoing-interface:' line. 52228753Smm # outgoing-interface: 192.0.2.153 53228753Smm # outgoing-interface: 2001:DB8::5 54232153Smm # outgoing-interface: 2001:DB8::6 55228753Smm 56228753Smm # number of ports to allocate per thread, determines the size of the 57232153Smm # port range that can be open simultaneously. About double the 58228753Smm # num-queries-per-thread, or, use as many as the OS will allow you. 59228753Smm # outgoing-range: 4096 60228753Smm 61228753Smm # permit unbound to use this port number or port range for 62228753Smm # making outgoing queries, using an outgoing interface. 63228753Smm # outgoing-port-permit: 32768 64228753Smm 65228753Smm # deny unbound the use this of port number or port range for 66228753Smm # making outgoing queries, using an outgoing interface. 67228753Smm # Use this to make sure unbound does not grab a UDP port that some 68228753Smm # other server on this computer needs. The default is to avoid 69228753Smm # IANA-assigned port numbers. 70228753Smm # If multiple outgoing-port-permit and outgoing-port-avoid options 71228753Smm # are present, they are processed in order. 72228753Smm # outgoing-port-avoid: "3200-3208" 73228753Smm 74228753Smm # number of outgoing simultaneous tcp buffers to hold per thread. 75228753Smm # outgoing-num-tcp: 10 76228753Smm 77232153Smm # number of incoming simultaneous tcp buffers to hold per thread. 78232153Smm # incoming-num-tcp: 10 79228753Smm 80228753Smm # buffer size for UDP port 53 incoming (SO_RCVBUF socket option). 81228753Smm # 0 is system default. Use 4m to catch query spikes for busy servers. 82228753Smm # so-rcvbuf: 0 83228753Smm 84228753Smm # buffer size for UDP port 53 outgoing (SO_SNDBUF socket option). 85228753Smm # 0 is system default. Use 4m to handle spikes on very busy servers. 86228753Smm # so-sndbuf: 0 87232153Smm 88232153Smm # use SO_REUSEPORT to distribute queries over threads. 89228753Smm # so-reuseport: no 90228753Smm 91228753Smm # use IP_TRANSPARENT so the interface: addresses can be non-local 92228753Smm # and you can config non-existing IPs that are going to work later on 93228753Smm # (uses IP_BINDANY on FreeBSD). 94228753Smm # ip-transparent: no 95228753Smm 96228753Smm # EDNS reassembly buffer to advertise to UDP peers (the actual buffer 97228753Smm # is set with msg-buffer-size). 1480 can solve fragmentation (timeouts). 98228753Smm # edns-buffer-size: 4096 99228753Smm 100228753Smm # Maximum UDP response size (not applied to TCP response). 101228753Smm # Suggested values are 512 to 4096. Default is 4096. 65536 disables it. 102228753Smm # max-udp-size: 4096 103228753Smm 104228753Smm # buffer size for handling DNS data. No messages larger than this 105228753Smm # size can be sent or received, by UDP or TCP. In bytes. 106228753Smm # msg-buffer-size: 65552 107228753Smm 108228753Smm # the amount of memory to use for the message cache. 109228753Smm # plain value in bytes or you can append k, m or G. default is "4Mb". 110228753Smm # msg-cache-size: 4m 111228753Smm 112228753Smm # the number of slabs to use for the message cache. 113228753Smm # the number of slabs must be a power of 2. 114228753Smm # more slabs reduce lock contention, but fragment memory usage. 115228753Smm # msg-cache-slabs: 4 116228753Smm 117228753Smm # the number of queries that a thread gets to service. 118228753Smm # num-queries-per-thread: 1024 119228753Smm 120228753Smm # if very busy, 50% queries run to completion, 50% get timeout in msec 121228753Smm # jostle-timeout: 200 122228753Smm 123228753Smm # msec to wait before close of port on timeout UDP. 0 disables. 124228753Smm # delay-close: 0 125228753Smm 126228753Smm # the amount of memory to use for the RRset cache. 127228753Smm # plain value in bytes or you can append k, m or G. default is "4Mb". 128228753Smm # rrset-cache-size: 4m 129228753Smm 130228753Smm # the number of slabs to use for the RRset cache. 131228753Smm # the number of slabs must be a power of 2. 132228753Smm # more slabs reduce lock contention, but fragment memory usage. 133228753Smm # rrset-cache-slabs: 4 134228753Smm 135228753Smm # the time to live (TTL) value lower bound, in seconds. Default 0. 136228753Smm # If more than an hour could easily give trouble due to stale data. 137228753Smm # cache-min-ttl: 0 138228753Smm 139228753Smm # the time to live (TTL) value cap for RRsets and messages in the 140228753Smm # cache. Items are not cached for longer. In seconds. 141228753Smm # cache-max-ttl: 86400 142228753Smm 143228753Smm # the time to live (TTL) value cap for negative responses in the cache 144228753Smm # cache-max-negative-ttl: 3600 145228753Smm 146228753Smm # the time to live (TTL) value for cached roundtrip times, lameness and 147228753Smm # EDNS version information for hosts. In seconds. 148228753Smm # infra-host-ttl: 900 149228753Smm 150228753Smm # minimum wait time for responses, increase if uplink is long. In msec. 151228753Smm # infra-cache-min-rtt: 50 152228753Smm 153228753Smm # the number of slabs to use for the Infrastructure cache. 154228753Smm # the number of slabs must be a power of 2. 155228753Smm # more slabs reduce lock contention, but fragment memory usage. 156228753Smm # infra-cache-slabs: 4 157228753Smm 158228753Smm # the maximum number of hosts that are cached (roundtrip, EDNS, lame). 159228753Smm # infra-cache-numhosts: 10000 160228753Smm 161228753Smm # Enable IPv4, "yes" or "no". 162228753Smm # do-ip4: yes 163228753Smm 164228753Smm # Enable IPv6, "yes" or "no". 165228753Smm # do-ip6: yes 166228753Smm 167228753Smm # Enable UDP, "yes" or "no". 168228753Smm # do-udp: yes 169228753Smm 170228753Smm # Enable TCP, "yes" or "no". 171228753Smm # do-tcp: yes 172228753Smm 173228753Smm # upstream connections use TCP only (and no UDP), "yes" or "no" 174228753Smm # useful for tunneling scenarios, default no. 175228753Smm # tcp-upstream: no 176228753Smm 177228753Smm # Maximum segment size (MSS) of TCP socket on which the server 178228753Smm # responds to queries. Default is 0, system default MSS. 179228753Smm # tcp-mss: 0 180228753Smm 181228753Smm # Maximum segment size (MSS) of TCP socket for outgoing queries. 182228753Smm # Default is 0, system default MSS. 183228753Smm # outgoing-tcp-mss: 0 184228753Smm 185228753Smm # Detach from the terminal, run in background, "yes" or "no". 186238856Smm # do-daemonize: yes 187228753Smm 188238856Smm # control which clients are allowed to make (recursive) queries 189228753Smm # to this server. Specify classless netblocks with /size and action. 190228753Smm # By default everything is refused, except for localhost. 191228753Smm # Choose deny (drop message), refuse (polite error reply), 192228753Smm # allow (recursive ok), allow_snoop (recursive and nonrecursive ok) 193228753Smm # deny_non_local (drop queries unless can be answered from local-data) 194228753Smm # refuse_non_local (like deny_non_local but polite error reply). 195228753Smm # access-control: 0.0.0.0/0 refuse 196228753Smm # access-control: 127.0.0.0/8 allow 197228753Smm # access-control: ::0/0 refuse 198228753Smm # access-control: ::1 allow 199228753Smm # access-control: ::ffff:127.0.0.1 allow 200228753Smm 201228753Smm # if given, a chroot(2) is done to the given directory. 202228753Smm # i.e. you can chroot to the working directory, for example, 203228753Smm # for extra security, but make sure all files are in that directory. 204228753Smm # 205228753Smm # If chroot is enabled, you should pass the configfile (from the 206228753Smm # commandline) as a full path from the original root. After the 207228753Smm # chroot has been performed the now defunct portion of the config 208228753Smm # file path is removed to be able to reread the config after a reload. 209228753Smm # 210228753Smm # All other file paths (working dir, logfile, roothints, and 211228753Smm # key files) can be specified in several ways: 212228753Smm # o as an absolute path relative to the new root. 213228753Smm # o as a relative path to the working directory. 214228753Smm # o as an absolute path relative to the original root. 215228753Smm # In the last case the path is adjusted to remove the unused portion. 216228753Smm # 217228753Smm # The pid file can be absolute and outside of the chroot, it is 218228753Smm # written just prior to performing the chroot and dropping permissions. 219228753Smm # 220228753Smm # Additionally, unbound may need to access /dev/random (for entropy). 221228753Smm # How to do this is specific to your OS. 222228753Smm # 223228753Smm # If you give "" no chroot is performed. The path must not end in a /. 224228753Smm # chroot: "@UNBOUND_CHROOT_DIR@" 225228753Smm 226228753Smm # if given, user privileges are dropped (after binding port), 227228753Smm # and the given username is assumed. Default is user "unbound". 228228753Smm # If you give "" no privileges are dropped. 229228753Smm # username: "@UNBOUND_USERNAME@" 230228753Smm 231228753Smm # the working directory. The relative files in this config are 232228753Smm # relative to this directory. If you give "" the working directory 233228753Smm # is not changed. 234228753Smm # directory: "@UNBOUND_RUN_DIR@" 235228753Smm 236228753Smm # the log file, "" means log to stderr. 237228753Smm # Use of this option sets use-syslog to "no". 238228753Smm # logfile: "" 239228753Smm 240228753Smm # Log to syslog(3) if yes. The log facility LOG_DAEMON is used to 241228753Smm # log to, with identity "unbound". If yes, it overrides the logfile. 242228753Smm # use-syslog: yes 243228753Smm 244228753Smm # print UTC timestamp in ascii to logfile, default is epoch in seconds. 245228753Smm # log-time-ascii: no 246228753Smm 247228753Smm # print one line with time, IP, name, type, class for every query. 248228753Smm # log-queries: no 249228753Smm 250228753Smm # the pid file. Can be an absolute path outside of chroot/work dir. 251228753Smm # pidfile: "@UNBOUND_PIDFILE@" 252228753Smm 253228753Smm # file to read root hints from. 254228753Smm # get one from https://www.internic.net/domain/named.cache 255228753Smm # root-hints: "" 256228753Smm 257228753Smm # enable to not answer id.server and hostname.bind queries. 258228753Smm # hide-identity: no 259228753Smm 260228753Smm # enable to not answer version.server and version.bind queries. 261228753Smm # hide-version: no 262228753Smm 263228753Smm # the identity to report. Leave "" or default to return hostname. 264228753Smm # identity: "" 265228753Smm 266228753Smm # the version to report. Leave "" or default to return package version. 267228753Smm # version: "" 268228753Smm 269228753Smm # the target fetch policy. 270228753Smm # series of integers describing the policy per dependency depth. 271228753Smm # The number of values in the list determines the maximum dependency 272228753Smm # depth the recursor will pursue before giving up. Each integer means: 273228753Smm # -1 : fetch all targets opportunistically, 274228753Smm # 0: fetch on demand, 275228753Smm # positive value: fetch that many targets opportunistically. 276228753Smm # Enclose the list of numbers between quotes (""). 277228753Smm # target-fetch-policy: "3 2 1 0 0" 278228753Smm 279228753Smm # Harden against very small EDNS buffer sizes. 280228753Smm # harden-short-bufsize: no 281228753Smm 282228753Smm # Harden against unseemly large queries. 283228753Smm # harden-large-queries: no 284228753Smm 285228753Smm # Harden against out of zone rrsets, to avoid spoofing attempts. 286228753Smm # harden-glue: yes 287228753Smm 288228753Smm # Harden against receiving dnssec-stripped data. If you turn it 289228753Smm # off, failing to validate dnskey data for a trustanchor will 290228753Smm # trigger insecure mode for that zone (like without a trustanchor). 291228753Smm # Default on, which insists on dnssec data for trust-anchored zones. 292228753Smm # harden-dnssec-stripped: yes 293228753Smm 294228753Smm # Harden against queries that fall under dnssec-signed nxdomain names. 295228753Smm # harden-below-nxdomain: no 296228753Smm 297228753Smm # Harden the referral path by performing additional queries for 298228753Smm # infrastructure data. Validates the replies (if possible). 299228753Smm # Default off, because the lookups burden the server. Experimental 300228753Smm # implementation of draft-wijngaards-dnsext-resolver-side-mitigation. 301228753Smm # harden-referral-path: no 302228753Smm 303228753Smm # Harden against algorithm downgrade when multiple algorithms are 304228753Smm # advertised in the DS record. If no, allows the weakest algorithm 305228753Smm # to validate the zone. 306228753Smm # harden-algo-downgrade: no 307228753Smm 308232153Smm # Sent minimum amount of information to upstream servers to enhance 309232153Smm # privacy. Only sent minimum required labels of the QNAME and set QTYPE 310228753Smm # to NS when possible. 311228753Smm # qname-minimisation: no 312228753Smm 313228753Smm # Use 0x20-encoded random bits in the query to foil spoof attempts. 314228753Smm # This feature is an experimental implementation of draft dns-0x20. 315228753Smm # use-caps-for-id: no 316228753Smm 317228753Smm # Domains (and domains in them) without support for dns-0x20 and 318228753Smm # the fallback fails because they keep sending different answers. 319228753Smm # caps-whitelist: "licdn.com" 320228753Smm 321228753Smm # Enforce privacy of these addresses. Strips them away from answers. 322228753Smm # It may cause DNSSEC validation to additionally mark it as bogus. 323228753Smm # Protects against 'DNS Rebinding' (uses browser as network proxy). 324228753Smm # Only 'private-domain' and 'local-data' names are allowed to have 325228753Smm # these private addresses. No default. 326228753Smm # private-address: 10.0.0.0/8 327228753Smm # private-address: 172.16.0.0/12 328228753Smm # private-address: 192.168.0.0/16 329228753Smm # private-address: 169.254.0.0/16 330228753Smm # private-address: fd00::/8 331228753Smm # private-address: fe80::/10 332228753Smm # private-address: ::ffff:0:0/96 333228753Smm 334228753Smm # Allow the domain (and its subdomains) to contain private addresses. 335228753Smm # local-data statements are allowed to contain private addresses too. 336228753Smm # private-domain: "example.com" 337228753Smm 338228753Smm # If nonzero, unwanted replies are not only reported in statistics, 339228753Smm # but also a running total is kept per thread. If it reaches the 340228753Smm # threshold, a warning is printed and a defensive action is taken, 341228753Smm # the cache is cleared to flush potential poison out of it. 342228753Smm # A suggested value is 10000000, the default is 0 (turned off). 343228753Smm # unwanted-reply-threshold: 0 344228753Smm 345228753Smm # Do not query the following addresses. No DNS queries are sent there. 346228753Smm # List one address per entry. List classless netblocks with /size, 347228753Smm # do-not-query-address: 127.0.0.1/8 348228753Smm # do-not-query-address: ::1 349228753Smm 350228753Smm # if yes, the above default do-not-query-address entries are present. 351228753Smm # if no, localhost can be queried (for testing and debugging). 352228753Smm # do-not-query-localhost: yes 353228753Smm 354228753Smm # if yes, perform prefetching of almost expired message cache entries. 355228753Smm # prefetch: no 356232153Smm 357228753Smm # if yes, perform key lookups adjacent to normal lookups. 358228753Smm # prefetch-key: no 359228753Smm 360228753Smm # if yes, Unbound rotates RRSet order in response. 361232153Smm # rrset-roundrobin: no 362232153Smm 363228753Smm # if yes, Unbound doesn't insert authority/additional sections 364228753Smm # into response messages when those sections are not required. 365228753Smm # minimal-responses: no 366228753Smm 367228753Smm # module configuration of the server. A string with identifiers 368228753Smm # separated by spaces. Syntax: "[dns64] [validator] iterator" 369228753Smm # module-config: "validator iterator" 370228753Smm 371228753Smm # File with trusted keys, kept uptodate using RFC5011 probes, 372228753Smm # initial file like trust-anchor-file, then it stores metadata. 373228753Smm # Use several entries, one per domain name, to track multiple zones. 374228753Smm # 375228753Smm # If you want to perform DNSSEC validation, run unbound-anchor before 376232153Smm # you start unbound (i.e. in the system boot scripts). And enable: 377228753Smm # Please note usage of unbound-anchor root anchor is at your own risk 378228753Smm # and under the terms of our LICENSE (see that file in the source). 379228753Smm # auto-trust-anchor-file: "@UNBOUND_ROOTKEY_FILE@" 380232153Smm 381228753Smm # File with DLV trusted keys. Same format as trust-anchor-file. 382228753Smm # There can be only one DLV configured, it is trusted from root down. 383228753Smm # DLV is going to be decommissioned. Please do not use it any more. 384228753Smm # dlv-anchor-file: "dlv.isc.org.key" 385228753Smm 386228753Smm # File with trusted keys for validation. Specify more than one file 387228753Smm # with several entries, one file per entry. 388228753Smm # Zone file format, with DS and DNSKEY entries. 389228753Smm # Note this gets out of date, use auto-trust-anchor-file please. 390228753Smm # trust-anchor-file: "" 391228753Smm 392232153Smm # Trusted key for validation. DS or DNSKEY. specify the RR on a 393232153Smm # single line, surrounded by "". TTL is ignored. class is IN default. 394228753Smm # Note this gets out of date, use auto-trust-anchor-file please. 395232153Smm # (These examples are from August 2007 and may not be valid anymore). 396232153Smm # trust-anchor: "nlnetlabs.nl. DNSKEY 257 3 5 AQPzzTWMz8qSWIQlfRnPckx2BiVmkVN6LPupO3mbz7FhLSnm26n6iG9N Lby97Ji453aWZY3M5/xJBSOS2vWtco2t8C0+xeO1bc/d6ZTy32DHchpW 6rDH1vp86Ll+ha0tmwyy9QP7y2bVw5zSbFCrefk8qCUBgfHm9bHzMG1U BYtEIQ==" 397228753Smm # trust-anchor: "jelte.nlnetlabs.nl. DS 42860 5 1 14D739EB566D2B1A5E216A0BA4D17FA9B038BE4A" 398228753Smm 399228753Smm # File with trusted keys for validation. Specify more than one file 400228753Smm # with several entries, one file per entry. Like trust-anchor-file 401228753Smm # but has a different file format. Format is BIND-9 style format, 402228753Smm # the trusted-keys { name flag proto algo "key"; }; clauses are read. 403228753Smm # you need external update procedures to track changes in keys. 404228753Smm # trusted-keys-file: "" 405228753Smm 406228753Smm # Ignore chain of trust. Domain is treated as insecure. 407232153Smm # domain-insecure: "example.com" 408232153Smm 409228753Smm # Override the date for validation with a specific fixed date. 410232153Smm # Do not set this unless you are debugging signature inception 411232153Smm # and expiration. "" or "0" turns the feature off. -1 ignores date. 412228753Smm # val-override-date: "" 413228753Smm 414228753Smm # The time to live for bogus data, rrsets and messages. This avoids 415232153Smm # some of the revalidation, until the time interval expires. in secs. 416232153Smm # val-bogus-ttl: 60 417228753Smm 418232153Smm # The signature inception and expiration dates are allowed to be off 419232153Smm # by 10% of the signature lifetime (expir-incep) from our local clock. 420228753Smm # This leeway is capped with a minimum and a maximum. In seconds. 421228753Smm # val-sig-skew-min: 3600 422228753Smm # val-sig-skew-max: 86400 423228753Smm 424228753Smm # Should additional section of secure message also be kept clean of 425232153Smm # unsecure data. Useful to shield the users of this validator from 426232153Smm # potential bogus data in the additional section. All unsigned data 427228753Smm # in the additional section is removed from secure messages. 428228753Smm # val-clean-additional: yes 429228753Smm 430228753Smm # Turn permissive mode on to permit bogus messages. Thus, messages 431228753Smm # for which security checks failed will be returned to clients, 432228753Smm # instead of SERVFAIL. It still performs the security checks, which 433232153Smm # result in interesting log files and possibly the AD bit in 434232153Smm # replies if the message is found secure. The default is off. 435232153Smm # val-permissive-mode: no 436232153Smm 437232153Smm # Ignore the CD flag in incoming queries and refuse them bogus data. 438232153Smm # Enable it if the only clients of unbound are legacy servers (w2008) 439228753Smm # that set CD but cannot validate themselves. 440228753Smm # ignore-cd-flag: no 441228753Smm 442228753Smm # Have the validator log failed validations for your diagnosis. 443228753Smm # 0: off. 1: A line per failed user query. 2: With reason and bad IP. 444228753Smm # val-log-level: 0 445228753Smm 446228753Smm # It is possible to configure NSEC3 maximum iteration counts per 447228753Smm # keysize. Keep this table very short, as linear search is done. 448228753Smm # A message with an NSEC3 with larger count is marked insecure. 449228753Smm # List in ascending order the keysize and count values. 450228753Smm # val-nsec3-keysize-iterations: "1024 150 2048 500 4096 2500" 451228753Smm 452232153Smm # instruct the auto-trust-anchor-file probing to add anchors after ttl. 453232153Smm # add-holddown: 2592000 # 30 days 454232153Smm 455228753Smm # instruct the auto-trust-anchor-file probing to del anchors after ttl. 456228753Smm # del-holddown: 2592000 # 30 days 457228753Smm 458228753Smm # auto-trust-anchor-file probing removes missing anchors after ttl. 459228753Smm # If the value 0 is given, missing anchors are not removed. 460228753Smm # keep-missing: 31622400 # 366 days 461228753Smm 462228753Smm # debug option that allows very small holddown times for key rollover 463228753Smm # permit-small-holddown: no 464228753Smm 465228753Smm # the amount of memory to use for the key cache. 466228753Smm # plain value in bytes or you can append k, m or G. default is "4Mb". 467228753Smm # key-cache-size: 4m 468228753Smm 469228753Smm # the number of slabs to use for the key cache. 470248616Smm # the number of slabs must be a power of 2. 471228753Smm # more slabs reduce lock contention, but fragment memory usage. 472228753Smm # key-cache-slabs: 4 473228753Smm 474228753Smm # the amount of memory to use for the negative cache (used for DLV). 475228753Smm # plain value in bytes or you can append k, m or G. default is "1Mb". 476228753Smm # neg-cache-size: 1m 477228753Smm 478232153Smm # By default, for a number of zones a small default 'nothing here' 479228753Smm # reply is built-in. Query traffic is thus blocked. If you 480228753Smm # wish to serve such zone you can unblock them by uncommenting one 481228753Smm # of the nodefault statements below. 482228753Smm # You may also have to use domain-insecure: zone to make DNSSEC work, 483232153Smm # unless you have your own trust anchors for this zone. 484232153Smm # local-zone: "localhost." nodefault 485228753Smm # local-zone: "127.in-addr.arpa." nodefault 486228753Smm # local-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." nodefault 487228753Smm # local-zone: "onion." nodefault 488228753Smm # local-zone: "10.in-addr.arpa." nodefault 489228753Smm # local-zone: "16.172.in-addr.arpa." nodefault 490228753Smm # local-zone: "17.172.in-addr.arpa." nodefault 491228753Smm # local-zone: "18.172.in-addr.arpa." nodefault 492228753Smm # local-zone: "19.172.in-addr.arpa." nodefault 493228753Smm # local-zone: "20.172.in-addr.arpa." nodefault 494228753Smm # local-zone: "21.172.in-addr.arpa." nodefault 495228753Smm # local-zone: "22.172.in-addr.arpa." nodefault 496228753Smm # local-zone: "23.172.in-addr.arpa." nodefault 497228753Smm # local-zone: "24.172.in-addr.arpa." nodefault 498228753Smm # local-zone: "25.172.in-addr.arpa." nodefault 499228753Smm # local-zone: "26.172.in-addr.arpa." nodefault 500228753Smm # local-zone: "27.172.in-addr.arpa." nodefault 501228753Smm # local-zone: "28.172.in-addr.arpa." nodefault 502228753Smm # local-zone: "29.172.in-addr.arpa." nodefault 503228753Smm # local-zone: "30.172.in-addr.arpa." nodefault 504228753Smm # local-zone: "31.172.in-addr.arpa." nodefault 505228753Smm # local-zone: "168.192.in-addr.arpa." nodefault 506228753Smm # local-zone: "0.in-addr.arpa." nodefault 507228753Smm # local-zone: "254.169.in-addr.arpa." nodefault 508228753Smm # local-zone: "2.0.192.in-addr.arpa." nodefault 509228753Smm # local-zone: "100.51.198.in-addr.arpa." nodefault 510228753Smm # local-zone: "113.0.203.in-addr.arpa." nodefault 511228753Smm # local-zone: "255.255.255.255.in-addr.arpa." nodefault 512228753Smm # local-zone: "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.0.ip6.arpa." nodefault 513228753Smm # local-zone: "d.f.ip6.arpa." nodefault 514228753Smm # local-zone: "8.e.f.ip6.arpa." nodefault 515228753Smm # local-zone: "9.e.f.ip6.arpa." nodefault 516228753Smm # local-zone: "a.e.f.ip6.arpa." nodefault 517228753Smm # local-zone: "b.e.f.ip6.arpa." nodefault 518228753Smm # local-zone: "8.b.d.0.1.0.0.2.ip6.arpa." nodefault 519228753Smm # And for 64.100.in-addr.arpa. to 127.100.in-addr.arpa. 520228753Smm 521228753Smm # If unbound is running service for the local host then it is useful 522228753Smm # to perform lan-wide lookups to the upstream, and unblock the 523228753Smm # long list of local-zones above. If this unbound is a dns server 524228753Smm # for a network of computers, disabled is better and stops information 525228753Smm # leakage of local lan information. 526228753Smm # unblock-lan-zones: no 527228753Smm 528228753Smm # The insecure-lan-zones option disables validation for 529228753Smm # these zones, as if they were all listed as domain-insecure. 530228753Smm # insecure-lan-zones: no 531228753Smm 532228753Smm # a number of locally served zones can be configured. 533228753Smm # local-zone: <zone> <type> 534228753Smm # local-data: "<resource record string>" 535228753Smm # o deny serves local data (if any), else, drops queries. 536228753Smm # o refuse serves local data (if any), else, replies with error. 537228753Smm # o static serves local data, else, nxdomain or nodata answer. 538228753Smm # o transparent gives local data, but resolves normally for other names 539228753Smm # o redirect serves the zone data for any subdomain in the zone. 540228753Smm # o nodefault can be used to normally resolve AS112 zones. 541228753Smm # o typetransparent resolves normally for other types and other names 542228753Smm # o inform resolves normally, but logs client IP address 543228753Smm # o inform_deny drops queries and logs client IP address 544228753Smm # 545228753Smm # defaults are localhost address, reverse for 127.0.0.1 and ::1 546228753Smm # and nxdomain for AS112 zones. If you configure one of these zones 547228753Smm # the default content is omitted, or you can omit it with 'nodefault'. 548228753Smm # 549228753Smm # If you configure local-data without specifying local-zone, by 550228753Smm # default a transparent local-zone is created for the data. 551228753Smm # 552228753Smm # You can add locally served data with 553228753Smm # local-zone: "local." static 554228753Smm # local-data: "mycomputer.local. IN A 192.0.2.51" 555228753Smm # local-data: 'mytext.local TXT "content of text record"' 556228753Smm # 557228753Smm # You can override certain queries with 558228753Smm # local-data: "adserver.example.com A 127.0.0.1" 559228753Smm # 560228753Smm # You can redirect a domain to a fixed address with 561228753Smm # (this makes example.com, www.example.com, etc, all go to 192.0.2.3) 562228753Smm # local-zone: "example.com" redirect 563228753Smm # local-data: "example.com A 192.0.2.3" 564228753Smm # 565228753Smm # Shorthand to make PTR records, "IPv4 name" or "IPv6 name". 566228753Smm # You can also add PTR records using local-data directly, but then 567228753Smm # you need to do the reverse notation yourself. 568228753Smm # local-data-ptr: "192.0.2.3 www.example.com" 569228753Smm 570228753Smm # service clients over SSL (on the TCP sockets), with plain DNS inside 571228753Smm # the SSL stream. Give the certificate to use and private key. 572228753Smm # default is "" (disabled). requires restart to take effect. 573228753Smm # ssl-service-key: "path/to/privatekeyfile.key" 574228753Smm # ssl-service-pem: "path/to/publiccertfile.pem" 575228753Smm # ssl-port: 853 576228753Smm 577228753Smm # request upstream over SSL (with plain DNS inside the SSL stream). 578228753Smm # Default is no. Can be turned on and off with unbound-control. 579228753Smm # ssl-upstream: no 580228753Smm 581228753Smm # DNS64 prefix. Must be specified when DNS64 is use. 582228753Smm # Enable dns64 in module-config. Used to synthesize IPv6 from IPv4. 583228753Smm # dns64-prefix: 64:ff9b::0/96 584228753Smm 585228753Smm # ratelimit for uncached, new queries, this limits recursion effort. 586228753Smm # ratelimiting is experimental, and may help against randomqueryflood. 587228753Smm # if 0(default) it is disabled, otherwise state qps allowed per zone. 588228753Smm # ratelimit: 0 589228753Smm 590228753Smm # ratelimits are tracked in a cache, size in bytes of cache (or k,m). 591228753Smm # ratelimit-size: 4m 592228753Smm # ratelimit cache slabs, reduces lock contention if equal to cpucount. 593228753Smm # ratelimit-slabs: 4 594228753Smm 595228753Smm # 0 blocks when ratelimited, otherwise let 1/xth traffic through 596228753Smm # ratelimit-factor: 10 597228753Smm 598228753Smm # override the ratelimit for a specific domain name. 599228753Smm # give this setting multiple times to have multiple overrides. 600228753Smm # ratelimit-for-domain: example.com 1000 601228753Smm # override the ratelimits for all domains below a domain name 602228753Smm # can give this multiple times, the name closest to the zone is used. 603228753Smm # ratelimit-below-domain: example 1000 604228753Smm 605228753Smm# Python config section. To enable: 606238856Smm# o use --with-pythonmodule to configure before compiling. 607238856Smm# o list python in the module-config string (above) to enable. 608228753Smm# o and give a python-script to run. 609228753Smmpython: 610228753Smm # Script file to load 611228753Smm # python-script: "@UNBOUND_SHARE_DIR@/ubmodule-tst.py" 612228753Smm 613228753Smm# Remote control config section. 614228753Smmremote-control: 615228753Smm # Enable remote control with unbound-control(8) here. 616238856Smm # set up the keys and certificates with unbound-control-setup. 617238856Smm # control-enable: no 618228753Smm 619228753Smm # Set to no and use an absolute path as control-interface to use 620228753Smm # a unix local named pipe for unbound-control. 621228753Smm # control-use-cert: yes 622228753Smm 623228753Smm # what interfaces are listened to for remote control. 624228753Smm # give 0.0.0.0 and ::0 to listen to all interfaces. 625228753Smm # control-interface: 127.0.0.1 626228753Smm # control-interface: ::1 627228753Smm 628228753Smm # port number for remote control operations. 629228753Smm # control-port: 8953 630228753Smm 631228753Smm # unbound server key file. 632228753Smm # server-key-file: "@UNBOUND_RUN_DIR@/unbound_server.key" 633228753Smm 634228753Smm # unbound server certificate file. 635228753Smm # server-cert-file: "@UNBOUND_RUN_DIR@/unbound_server.pem" 636228753Smm 637228753Smm # unbound-control key file. 638228753Smm # control-key-file: "@UNBOUND_RUN_DIR@/unbound_control.key" 639228753Smm 640228753Smm # unbound-control certificate file. 641228753Smm # control-cert-file: "@UNBOUND_RUN_DIR@/unbound_control.pem" 642228753Smm 643228753Smm# Stub zones. 644228753Smm# Create entries like below, to make all queries for 'example.com' and 645228753Smm# 'example.org' go to the given list of nameservers. list zero or more 646228753Smm# nameservers by hostname or by ipaddress. If you set stub-prime to yes, 647228753Smm# the list is treated as priming hints (default is no). 648228753Smm# With stub-first yes, it attempts without the stub if it fails. 649228753Smm# Consider adding domain-insecure: name and local-zone: name nodefault 650228753Smm# to the server: section if the stub is a locally served zone. 651228753Smm# stub-zone: 652228753Smm# name: "example.com" 653228753Smm# stub-addr: 192.0.2.68 654228753Smm# stub-prime: no 655228753Smm# stub-first: no 656228753Smm# stub-zone: 657228753Smm# name: "example.org" 658228753Smm# stub-host: ns.example.com. 659228753Smm 660228753Smm# Forward zones 661228753Smm# Create entries like below, to make all queries for 'example.com' and 662228753Smm# 'example.org' go to the given list of servers. These servers have to handle 663228753Smm# recursion to other nameservers. List zero or more nameservers by hostname 664228753Smm# or by ipaddress. Use an entry with name "." to forward all queries. 665228753Smm# If you enable forward-first, it attempts without the forward if it fails. 666228753Smm# forward-zone: 667232153Smm# name: "example.com" 668228753Smm# forward-addr: 192.0.2.68 669228753Smm# forward-addr: 192.0.2.73@5355 # forward to port 5355. 670232153Smm# forward-first: no 671232153Smm# forward-zone: 672232153Smm# name: "example.org" 673232153Smm# forward-host: fwd.example.com 674232153Smm