1238106Sdes# 2238106Sdes# Example configuration file. 3238106Sdes# 4296415Sdes# See unbound.conf(5) man page, version 1.5.8. 5238106Sdes# 6238106Sdes# this is a comment. 7238106Sdes 8238106Sdes#Use this to include other text into the file. 9238106Sdes#include: "otherfile.conf" 10238106Sdes 11292206Sdes# The server clause sets the main parameters. 12238106Sdesserver: 13238106Sdes # whitespace is not necessary, but looks cleaner. 14238106Sdes 15238106Sdes # verbosity number, 0 is least verbose. 1 is default. 16238106Sdes verbosity: 1 17238106Sdes 18238106Sdes # print statistics to the log (for every thread) every N seconds. 19238106Sdes # Set to "" or 0 to disable. Default is disabled. 20238106Sdes # statistics-interval: 0 21238106Sdes 22238106Sdes # enable cumulative statistics, without clearing them after printing. 23238106Sdes # statistics-cumulative: no 24238106Sdes 25238106Sdes # enable extended statistics (query types, answer codes, status) 26238106Sdes # printed from unbound-control. default off, because of speed. 27238106Sdes # extended-statistics: no 28238106Sdes 29238106Sdes # number of threads to create. 1 disables threading. 30238106Sdes # num-threads: 1 31238106Sdes 32238106Sdes # specify the interfaces to answer queries from by ip-address. 33238106Sdes # The default is to listen to localhost (127.0.0.1 and ::1). 34238106Sdes # specify 0.0.0.0 and ::0 to bind to all available interfaces. 35238106Sdes # specify every interface[@port] on a new 'interface:' labelled line. 36238106Sdes # The listen interfaces are not changed on reload, only on restart. 37238106Sdes # interface: 192.0.2.153 38238106Sdes # interface: 192.0.2.154 39238106Sdes # interface: 192.0.2.154@5003 40238106Sdes # interface: 2001:DB8::5 41238106Sdes 42238106Sdes # enable this feature to copy the source address of queries to reply. 43292206Sdes # Socket options are not supported on all platforms. experimental. 44238106Sdes # interface-automatic: no 45238106Sdes 46238106Sdes # port to answer queries from 47238106Sdes # port: 53 48238106Sdes 49238106Sdes # specify the interfaces to send outgoing queries to authoritative 50238106Sdes # server from by ip-address. If none, the default (all) interface 51238106Sdes # is used. Specify every interface on a 'outgoing-interface:' line. 52238106Sdes # outgoing-interface: 192.0.2.153 53238106Sdes # outgoing-interface: 2001:DB8::5 54238106Sdes # outgoing-interface: 2001:DB8::6 55238106Sdes 56238106Sdes # number of ports to allocate per thread, determines the size of the 57238106Sdes # port range that can be open simultaneously. About double the 58238106Sdes # num-queries-per-thread, or, use as many as the OS will allow you. 59238106Sdes # outgoing-range: 4096 60238106Sdes 61238106Sdes # permit unbound to use this port number or port range for 62238106Sdes # making outgoing queries, using an outgoing interface. 63238106Sdes # outgoing-port-permit: 32768 64238106Sdes 65238106Sdes # deny unbound the use this of port number or port range for 66238106Sdes # making outgoing queries, using an outgoing interface. 67238106Sdes # Use this to make sure unbound does not grab a UDP port that some 68238106Sdes # other server on this computer needs. The default is to avoid 69238106Sdes # IANA-assigned port numbers. 70249141Sdes # If multiple outgoing-port-permit and outgoing-port-avoid options 71249141Sdes # are present, they are processed in order. 72238106Sdes # outgoing-port-avoid: "3200-3208" 73238106Sdes 74238106Sdes # number of outgoing simultaneous tcp buffers to hold per thread. 75238106Sdes # outgoing-num-tcp: 10 76238106Sdes 77238106Sdes # number of incoming simultaneous tcp buffers to hold per thread. 78238106Sdes # incoming-num-tcp: 10 79238106Sdes 80238106Sdes # buffer size for UDP port 53 incoming (SO_RCVBUF socket option). 81238106Sdes # 0 is system default. Use 4m to catch query spikes for busy servers. 82238106Sdes # so-rcvbuf: 0 83238106Sdes 84238106Sdes # buffer size for UDP port 53 outgoing (SO_SNDBUF socket option). 85238106Sdes # 0 is system default. Use 4m to handle spikes on very busy servers. 86238106Sdes # so-sndbuf: 0 87292206Sdes 88276605Sdes # use SO_REUSEPORT to distribute queries over threads. 89266114Sdes # so-reuseport: no 90292206Sdes 91287917Sdes # use IP_TRANSPARENT so the interface: addresses can be non-local 92287917Sdes # and you can config non-existing IPs that are going to work later on 93296415Sdes # (uses IP_BINDANY on FreeBSD). 94287917Sdes # ip-transparent: no 95238106Sdes 96238106Sdes # EDNS reassembly buffer to advertise to UDP peers (the actual buffer 97238106Sdes # is set with msg-buffer-size). 1480 can solve fragmentation (timeouts). 98238106Sdes # edns-buffer-size: 4096 99238106Sdes 100266114Sdes # Maximum UDP response size (not applied to TCP response). 101266114Sdes # Suggested values are 512 to 4096. Default is 4096. 65536 disables it. 102266114Sdes # max-udp-size: 4096 103266114Sdes 104238106Sdes # buffer size for handling DNS data. No messages larger than this 105238106Sdes # size can be sent or received, by UDP or TCP. In bytes. 106238106Sdes # msg-buffer-size: 65552 107238106Sdes 108238106Sdes # the amount of memory to use for the message cache. 109292206Sdes # plain value in bytes or you can append k, m or G. default is "4Mb". 110238106Sdes # msg-cache-size: 4m 111238106Sdes 112238106Sdes # the number of slabs to use for the message cache. 113238106Sdes # the number of slabs must be a power of 2. 114238106Sdes # more slabs reduce lock contention, but fragment memory usage. 115238106Sdes # msg-cache-slabs: 4 116238106Sdes 117238106Sdes # the number of queries that a thread gets to service. 118238106Sdes # num-queries-per-thread: 1024 119238106Sdes 120238106Sdes # if very busy, 50% queries run to completion, 50% get timeout in msec 121238106Sdes # jostle-timeout: 200 122292206Sdes 123266114Sdes # msec to wait before close of port on timeout UDP. 0 disables. 124266114Sdes # delay-close: 0 125238106Sdes 126238106Sdes # the amount of memory to use for the RRset cache. 127292206Sdes # plain value in bytes or you can append k, m or G. default is "4Mb". 128238106Sdes # rrset-cache-size: 4m 129238106Sdes 130238106Sdes # the number of slabs to use for the RRset cache. 131238106Sdes # the number of slabs must be a power of 2. 132238106Sdes # more slabs reduce lock contention, but fragment memory usage. 133238106Sdes # rrset-cache-slabs: 4 134238106Sdes 135238106Sdes # the time to live (TTL) value lower bound, in seconds. Default 0. 136238106Sdes # If more than an hour could easily give trouble due to stale data. 137238106Sdes # cache-min-ttl: 0 138238106Sdes 139238106Sdes # the time to live (TTL) value cap for RRsets and messages in the 140238106Sdes # cache. Items are not cached for longer. In seconds. 141238106Sdes # cache-max-ttl: 86400 142238106Sdes 143287917Sdes # the time to live (TTL) value cap for negative responses in the cache 144287917Sdes # cache-max-negative-ttl: 3600 145287917Sdes 146238106Sdes # the time to live (TTL) value for cached roundtrip times, lameness and 147238106Sdes # EDNS version information for hosts. In seconds. 148238106Sdes # infra-host-ttl: 900 149292206Sdes 150282089Sdes # minimum wait time for responses, increase if uplink is long. In msec. 151282089Sdes # infra-cache-min-rtt: 50 152238106Sdes 153238106Sdes # the number of slabs to use for the Infrastructure cache. 154238106Sdes # the number of slabs must be a power of 2. 155238106Sdes # more slabs reduce lock contention, but fragment memory usage. 156238106Sdes # infra-cache-slabs: 4 157238106Sdes 158238106Sdes # the maximum number of hosts that are cached (roundtrip, EDNS, lame). 159238106Sdes # infra-cache-numhosts: 10000 160238106Sdes 161238106Sdes # Enable IPv4, "yes" or "no". 162238106Sdes # do-ip4: yes 163238106Sdes 164238106Sdes # Enable IPv6, "yes" or "no". 165238106Sdes # do-ip6: yes 166238106Sdes 167238106Sdes # Enable UDP, "yes" or "no". 168238106Sdes # do-udp: yes 169238106Sdes 170238106Sdes # Enable TCP, "yes" or "no". 171238106Sdes # do-tcp: yes 172238106Sdes 173238106Sdes # upstream connections use TCP only (and no UDP), "yes" or "no" 174238106Sdes # useful for tunneling scenarios, default no. 175238106Sdes # tcp-upstream: no 176238106Sdes 177296415Sdes # Maximum segment size (MSS) of TCP socket on which the server 178296415Sdes # responds to queries. Default is 0, system default MSS. 179296415Sdes # tcp-mss: 0 180296415Sdes 181296415Sdes # Maximum segment size (MSS) of TCP socket for outgoing queries. 182296415Sdes # Default is 0, system default MSS. 183296415Sdes # outgoing-tcp-mss: 0 184296415Sdes 185238106Sdes # Detach from the terminal, run in background, "yes" or "no". 186238106Sdes # do-daemonize: yes 187238106Sdes 188238106Sdes # control which clients are allowed to make (recursive) queries 189238106Sdes # to this server. Specify classless netblocks with /size and action. 190238106Sdes # By default everything is refused, except for localhost. 191238106Sdes # Choose deny (drop message), refuse (polite error reply), 192238106Sdes # allow (recursive ok), allow_snoop (recursive and nonrecursive ok) 193266114Sdes # deny_non_local (drop queries unless can be answered from local-data) 194266114Sdes # refuse_non_local (like deny_non_local but polite error reply). 195238106Sdes # access-control: 0.0.0.0/0 refuse 196238106Sdes # access-control: 127.0.0.0/8 allow 197238106Sdes # access-control: ::0/0 refuse 198238106Sdes # access-control: ::1 allow 199238106Sdes # access-control: ::ffff:127.0.0.1 allow 200238106Sdes 201238106Sdes # if given, a chroot(2) is done to the given directory. 202238106Sdes # i.e. you can chroot to the working directory, for example, 203238106Sdes # for extra security, but make sure all files are in that directory. 204238106Sdes # 205238106Sdes # If chroot is enabled, you should pass the configfile (from the 206238106Sdes # commandline) as a full path from the original root. After the 207292206Sdes # chroot has been performed the now defunct portion of the config 208292206Sdes # file path is removed to be able to reread the config after a reload. 209238106Sdes # 210238106Sdes # All other file paths (working dir, logfile, roothints, and 211238106Sdes # key files) can be specified in several ways: 212238106Sdes # o as an absolute path relative to the new root. 213238106Sdes # o as a relative path to the working directory. 214238106Sdes # o as an absolute path relative to the original root. 215238106Sdes # In the last case the path is adjusted to remove the unused portion. 216238106Sdes # 217292206Sdes # The pid file can be absolute and outside of the chroot, it is 218238106Sdes # written just prior to performing the chroot and dropping permissions. 219238106Sdes # 220238106Sdes # Additionally, unbound may need to access /dev/random (for entropy). 221238106Sdes # How to do this is specific to your OS. 222238106Sdes # 223238106Sdes # If you give "" no chroot is performed. The path must not end in a /. 224238106Sdes # chroot: "@UNBOUND_CHROOT_DIR@" 225238106Sdes 226238106Sdes # if given, user privileges are dropped (after binding port), 227238106Sdes # and the given username is assumed. Default is user "unbound". 228238106Sdes # If you give "" no privileges are dropped. 229238106Sdes # username: "@UNBOUND_USERNAME@" 230238106Sdes 231292206Sdes # the working directory. The relative files in this config are 232238106Sdes # relative to this directory. If you give "" the working directory 233238106Sdes # is not changed. 234238106Sdes # directory: "@UNBOUND_RUN_DIR@" 235238106Sdes 236292206Sdes # the log file, "" means log to stderr. 237238106Sdes # Use of this option sets use-syslog to "no". 238238106Sdes # logfile: "" 239238106Sdes 240292206Sdes # Log to syslog(3) if yes. The log facility LOG_DAEMON is used to 241238106Sdes # log to, with identity "unbound". If yes, it overrides the logfile. 242292206Sdes # use-syslog: yes 243238106Sdes 244238106Sdes # print UTC timestamp in ascii to logfile, default is epoch in seconds. 245238106Sdes # log-time-ascii: no 246292206Sdes 247238106Sdes # print one line with time, IP, name, type, class for every query. 248238106Sdes # log-queries: no 249238106Sdes 250238106Sdes # the pid file. Can be an absolute path outside of chroot/work dir. 251238106Sdes # pidfile: "@UNBOUND_PIDFILE@" 252238106Sdes 253238106Sdes # file to read root hints from. 254292206Sdes # get one from https://www.internic.net/domain/named.cache 255238106Sdes # root-hints: "" 256238106Sdes 257238106Sdes # enable to not answer id.server and hostname.bind queries. 258238106Sdes # hide-identity: no 259238106Sdes 260238106Sdes # enable to not answer version.server and version.bind queries. 261238106Sdes # hide-version: no 262238106Sdes 263238106Sdes # the identity to report. Leave "" or default to return hostname. 264238106Sdes # identity: "" 265238106Sdes 266238106Sdes # the version to report. Leave "" or default to return package version. 267238106Sdes # version: "" 268238106Sdes 269238106Sdes # the target fetch policy. 270292206Sdes # series of integers describing the policy per dependency depth. 271292206Sdes # The number of values in the list determines the maximum dependency 272238106Sdes # depth the recursor will pursue before giving up. Each integer means: 273238106Sdes # -1 : fetch all targets opportunistically, 274238106Sdes # 0: fetch on demand, 275238106Sdes # positive value: fetch that many targets opportunistically. 276238106Sdes # Enclose the list of numbers between quotes (""). 277238106Sdes # target-fetch-policy: "3 2 1 0 0" 278238106Sdes 279292206Sdes # Harden against very small EDNS buffer sizes. 280238106Sdes # harden-short-bufsize: no 281238106Sdes 282238106Sdes # Harden against unseemly large queries. 283238106Sdes # harden-large-queries: no 284238106Sdes 285292206Sdes # Harden against out of zone rrsets, to avoid spoofing attempts. 286238106Sdes # harden-glue: yes 287238106Sdes 288238106Sdes # Harden against receiving dnssec-stripped data. If you turn it 289292206Sdes # off, failing to validate dnskey data for a trustanchor will 290238106Sdes # trigger insecure mode for that zone (like without a trustanchor). 291238106Sdes # Default on, which insists on dnssec data for trust-anchored zones. 292238106Sdes # harden-dnssec-stripped: yes 293238106Sdes 294238106Sdes # Harden against queries that fall under dnssec-signed nxdomain names. 295238106Sdes # harden-below-nxdomain: no 296238106Sdes 297238106Sdes # Harden the referral path by performing additional queries for 298238106Sdes # infrastructure data. Validates the replies (if possible). 299292206Sdes # Default off, because the lookups burden the server. Experimental 300238106Sdes # implementation of draft-wijngaards-dnsext-resolver-side-mitigation. 301238106Sdes # harden-referral-path: no 302238106Sdes 303287917Sdes # Harden against algorithm downgrade when multiple algorithms are 304287917Sdes # advertised in the DS record. If no, allows the weakest algorithm 305287917Sdes # to validate the zone. 306289063Sdes # harden-algo-downgrade: no 307287917Sdes 308292206Sdes # Sent minimum amount of information to upstream servers to enhance 309292206Sdes # privacy. Only sent minimum required labels of the QNAME and set QTYPE 310292206Sdes # to NS when possible. 311292206Sdes # qname-minimisation: no 312292206Sdes 313238106Sdes # Use 0x20-encoded random bits in the query to foil spoof attempts. 314238106Sdes # This feature is an experimental implementation of draft dns-0x20. 315238106Sdes # use-caps-for-id: no 316292206Sdes 317287917Sdes # Domains (and domains in them) without support for dns-0x20 and 318287917Sdes # the fallback fails because they keep sending different answers. 319287917Sdes # caps-whitelist: "licdn.com" 320238106Sdes 321292206Sdes # Enforce privacy of these addresses. Strips them away from answers. 322292206Sdes # It may cause DNSSEC validation to additionally mark it as bogus. 323292206Sdes # Protects against 'DNS Rebinding' (uses browser as network proxy). 324292206Sdes # Only 'private-domain' and 'local-data' names are allowed to have 325238106Sdes # these private addresses. No default. 326238106Sdes # private-address: 10.0.0.0/8 327238106Sdes # private-address: 172.16.0.0/12 328238106Sdes # private-address: 192.168.0.0/16 329238106Sdes # private-address: 169.254.0.0/16 330238106Sdes # private-address: fd00::/8 331238106Sdes # private-address: fe80::/10 332292206Sdes # private-address: ::ffff:0:0/96 333238106Sdes 334238106Sdes # Allow the domain (and its subdomains) to contain private addresses. 335238106Sdes # local-data statements are allowed to contain private addresses too. 336238106Sdes # private-domain: "example.com" 337238106Sdes 338238106Sdes # If nonzero, unwanted replies are not only reported in statistics, 339238106Sdes # but also a running total is kept per thread. If it reaches the 340238106Sdes # threshold, a warning is printed and a defensive action is taken, 341238106Sdes # the cache is cleared to flush potential poison out of it. 342238106Sdes # A suggested value is 10000000, the default is 0 (turned off). 343238106Sdes # unwanted-reply-threshold: 0 344238106Sdes 345238106Sdes # Do not query the following addresses. No DNS queries are sent there. 346238106Sdes # List one address per entry. List classless netblocks with /size, 347238106Sdes # do-not-query-address: 127.0.0.1/8 348238106Sdes # do-not-query-address: ::1 349238106Sdes 350238106Sdes # if yes, the above default do-not-query-address entries are present. 351238106Sdes # if no, localhost can be queried (for testing and debugging). 352238106Sdes # do-not-query-localhost: yes 353238106Sdes 354238106Sdes # if yes, perform prefetching of almost expired message cache entries. 355238106Sdes # prefetch: no 356238106Sdes 357238106Sdes # if yes, perform key lookups adjacent to normal lookups. 358238106Sdes # prefetch-key: no 359238106Sdes 360238106Sdes # if yes, Unbound rotates RRSet order in response. 361238106Sdes # rrset-roundrobin: no 362238106Sdes 363238106Sdes # if yes, Unbound doesn't insert authority/additional sections 364238106Sdes # into response messages when those sections are not required. 365238106Sdes # minimal-responses: no 366238106Sdes 367238106Sdes # module configuration of the server. A string with identifiers 368276605Sdes # separated by spaces. Syntax: "[dns64] [validator] iterator" 369238106Sdes # module-config: "validator iterator" 370238106Sdes 371238106Sdes # File with trusted keys, kept uptodate using RFC5011 probes, 372238106Sdes # initial file like trust-anchor-file, then it stores metadata. 373238106Sdes # Use several entries, one per domain name, to track multiple zones. 374238106Sdes # 375238106Sdes # If you want to perform DNSSEC validation, run unbound-anchor before 376238106Sdes # you start unbound (i.e. in the system boot scripts). And enable: 377238106Sdes # Please note usage of unbound-anchor root anchor is at your own risk 378238106Sdes # and under the terms of our LICENSE (see that file in the source). 379238106Sdes # auto-trust-anchor-file: "@UNBOUND_ROOTKEY_FILE@" 380238106Sdes 381238106Sdes # File with DLV trusted keys. Same format as trust-anchor-file. 382238106Sdes # There can be only one DLV configured, it is trusted from root down. 383287917Sdes # DLV is going to be decommissioned. Please do not use it any more. 384238106Sdes # dlv-anchor-file: "dlv.isc.org.key" 385238106Sdes 386238106Sdes # File with trusted keys for validation. Specify more than one file 387238106Sdes # with several entries, one file per entry. 388238106Sdes # Zone file format, with DS and DNSKEY entries. 389238106Sdes # Note this gets out of date, use auto-trust-anchor-file please. 390238106Sdes # trust-anchor-file: "" 391292206Sdes 392238106Sdes # Trusted key for validation. DS or DNSKEY. specify the RR on a 393238106Sdes # single line, surrounded by "". TTL is ignored. class is IN default. 394238106Sdes # Note this gets out of date, use auto-trust-anchor-file please. 395238106Sdes # (These examples are from August 2007 and may not be valid anymore). 396238106Sdes # trust-anchor: "nlnetlabs.nl. DNSKEY 257 3 5 AQPzzTWMz8qSWIQlfRnPckx2BiVmkVN6LPupO3mbz7FhLSnm26n6iG9N Lby97Ji453aWZY3M5/xJBSOS2vWtco2t8C0+xeO1bc/d6ZTy32DHchpW 6rDH1vp86Ll+ha0tmwyy9QP7y2bVw5zSbFCrefk8qCUBgfHm9bHzMG1U BYtEIQ==" 397238106Sdes # trust-anchor: "jelte.nlnetlabs.nl. DS 42860 5 1 14D739EB566D2B1A5E216A0BA4D17FA9B038BE4A" 398238106Sdes 399238106Sdes # File with trusted keys for validation. Specify more than one file 400238106Sdes # with several entries, one file per entry. Like trust-anchor-file 401292206Sdes # but has a different file format. Format is BIND-9 style format, 402238106Sdes # the trusted-keys { name flag proto algo "key"; }; clauses are read. 403238106Sdes # you need external update procedures to track changes in keys. 404238106Sdes # trusted-keys-file: "" 405238106Sdes 406238106Sdes # Ignore chain of trust. Domain is treated as insecure. 407238106Sdes # domain-insecure: "example.com" 408238106Sdes 409238106Sdes # Override the date for validation with a specific fixed date. 410238106Sdes # Do not set this unless you are debugging signature inception 411238106Sdes # and expiration. "" or "0" turns the feature off. -1 ignores date. 412238106Sdes # val-override-date: "" 413238106Sdes 414238106Sdes # The time to live for bogus data, rrsets and messages. This avoids 415238106Sdes # some of the revalidation, until the time interval expires. in secs. 416238106Sdes # val-bogus-ttl: 60 417238106Sdes 418238106Sdes # The signature inception and expiration dates are allowed to be off 419238106Sdes # by 10% of the signature lifetime (expir-incep) from our local clock. 420238106Sdes # This leeway is capped with a minimum and a maximum. In seconds. 421238106Sdes # val-sig-skew-min: 3600 422238106Sdes # val-sig-skew-max: 86400 423238106Sdes 424238106Sdes # Should additional section of secure message also be kept clean of 425238106Sdes # unsecure data. Useful to shield the users of this validator from 426292206Sdes # potential bogus data in the additional section. All unsigned data 427238106Sdes # in the additional section is removed from secure messages. 428238106Sdes # val-clean-additional: yes 429238106Sdes 430238106Sdes # Turn permissive mode on to permit bogus messages. Thus, messages 431238106Sdes # for which security checks failed will be returned to clients, 432238106Sdes # instead of SERVFAIL. It still performs the security checks, which 433238106Sdes # result in interesting log files and possibly the AD bit in 434238106Sdes # replies if the message is found secure. The default is off. 435238106Sdes # val-permissive-mode: no 436238106Sdes 437238106Sdes # Ignore the CD flag in incoming queries and refuse them bogus data. 438238106Sdes # Enable it if the only clients of unbound are legacy servers (w2008) 439238106Sdes # that set CD but cannot validate themselves. 440238106Sdes # ignore-cd-flag: no 441238106Sdes 442238106Sdes # Have the validator log failed validations for your diagnosis. 443238106Sdes # 0: off. 1: A line per failed user query. 2: With reason and bad IP. 444238106Sdes # val-log-level: 0 445238106Sdes 446238106Sdes # It is possible to configure NSEC3 maximum iteration counts per 447238106Sdes # keysize. Keep this table very short, as linear search is done. 448238106Sdes # A message with an NSEC3 with larger count is marked insecure. 449238106Sdes # List in ascending order the keysize and count values. 450238106Sdes # val-nsec3-keysize-iterations: "1024 150 2048 500 4096 2500" 451292206Sdes 452238106Sdes # instruct the auto-trust-anchor-file probing to add anchors after ttl. 453238106Sdes # add-holddown: 2592000 # 30 days 454238106Sdes 455238106Sdes # instruct the auto-trust-anchor-file probing to del anchors after ttl. 456238106Sdes # del-holddown: 2592000 # 30 days 457238106Sdes 458238106Sdes # auto-trust-anchor-file probing removes missing anchors after ttl. 459238106Sdes # If the value 0 is given, missing anchors are not removed. 460238106Sdes # keep-missing: 31622400 # 366 days 461238106Sdes 462289063Sdes # debug option that allows very small holddown times for key rollover 463289063Sdes # permit-small-holddown: no 464289063Sdes 465238106Sdes # the amount of memory to use for the key cache. 466292206Sdes # plain value in bytes or you can append k, m or G. default is "4Mb". 467238106Sdes # key-cache-size: 4m 468238106Sdes 469238106Sdes # the number of slabs to use for the key cache. 470238106Sdes # the number of slabs must be a power of 2. 471238106Sdes # more slabs reduce lock contention, but fragment memory usage. 472238106Sdes # key-cache-slabs: 4 473238106Sdes 474238106Sdes # the amount of memory to use for the negative cache (used for DLV). 475292206Sdes # plain value in bytes or you can append k, m or G. default is "1Mb". 476238106Sdes # neg-cache-size: 1m 477282089Sdes 478266114Sdes # By default, for a number of zones a small default 'nothing here' 479266114Sdes # reply is built-in. Query traffic is thus blocked. If you 480266114Sdes # wish to serve such zone you can unblock them by uncommenting one 481266114Sdes # of the nodefault statements below. 482266114Sdes # You may also have to use domain-insecure: zone to make DNSSEC work, 483266114Sdes # unless you have your own trust anchors for this zone. 484266114Sdes # local-zone: "localhost." nodefault 485266114Sdes # local-zone: "127.in-addr.arpa." nodefault 486266114Sdes # 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 487296415Sdes # local-zone: "onion." nodefault 488266114Sdes # local-zone: "10.in-addr.arpa." nodefault 489266114Sdes # local-zone: "16.172.in-addr.arpa." nodefault 490266114Sdes # local-zone: "17.172.in-addr.arpa." nodefault 491266114Sdes # local-zone: "18.172.in-addr.arpa." nodefault 492266114Sdes # local-zone: "19.172.in-addr.arpa." nodefault 493266114Sdes # local-zone: "20.172.in-addr.arpa." nodefault 494266114Sdes # local-zone: "21.172.in-addr.arpa." nodefault 495266114Sdes # local-zone: "22.172.in-addr.arpa." nodefault 496266114Sdes # local-zone: "23.172.in-addr.arpa." nodefault 497266114Sdes # local-zone: "24.172.in-addr.arpa." nodefault 498266114Sdes # local-zone: "25.172.in-addr.arpa." nodefault 499266114Sdes # local-zone: "26.172.in-addr.arpa." nodefault 500266114Sdes # local-zone: "27.172.in-addr.arpa." nodefault 501266114Sdes # local-zone: "28.172.in-addr.arpa." nodefault 502266114Sdes # local-zone: "29.172.in-addr.arpa." nodefault 503266114Sdes # local-zone: "30.172.in-addr.arpa." nodefault 504266114Sdes # local-zone: "31.172.in-addr.arpa." nodefault 505266114Sdes # local-zone: "168.192.in-addr.arpa." nodefault 506266114Sdes # local-zone: "0.in-addr.arpa." nodefault 507266114Sdes # local-zone: "254.169.in-addr.arpa." nodefault 508266114Sdes # local-zone: "2.0.192.in-addr.arpa." nodefault 509266114Sdes # local-zone: "100.51.198.in-addr.arpa." nodefault 510266114Sdes # local-zone: "113.0.203.in-addr.arpa." nodefault 511266114Sdes # local-zone: "255.255.255.255.in-addr.arpa." nodefault 512266114Sdes # 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 513266114Sdes # local-zone: "d.f.ip6.arpa." nodefault 514266114Sdes # local-zone: "8.e.f.ip6.arpa." nodefault 515266114Sdes # local-zone: "9.e.f.ip6.arpa." nodefault 516266114Sdes # local-zone: "a.e.f.ip6.arpa." nodefault 517266114Sdes # local-zone: "b.e.f.ip6.arpa." nodefault 518266114Sdes # local-zone: "8.b.d.0.1.0.0.2.ip6.arpa." nodefault 519276605Sdes # And for 64.100.in-addr.arpa. to 127.100.in-addr.arpa. 520292206Sdes 521295535Sdes # If unbound is running service for the local host then it is useful 522276605Sdes # to perform lan-wide lookups to the upstream, and unblock the 523276605Sdes # long list of local-zones above. If this unbound is a dns server 524276605Sdes # for a network of computers, disabled is better and stops information 525276605Sdes # leakage of local lan information. 526276605Sdes # unblock-lan-zones: no 527266114Sdes 528295535Sdes # The insecure-lan-zones option disables validation for 529295535Sdes # these zones, as if they were all listed as domain-insecure. 530295535Sdes # insecure-lan-zones: no 531295535Sdes 532238106Sdes # a number of locally served zones can be configured. 533238106Sdes # local-zone: <zone> <type> 534238106Sdes # local-data: "<resource record string>" 535292206Sdes # o deny serves local data (if any), else, drops queries. 536238106Sdes # o refuse serves local data (if any), else, replies with error. 537238106Sdes # o static serves local data, else, nxdomain or nodata answer. 538238106Sdes # o transparent gives local data, but resolves normally for other names 539238106Sdes # o redirect serves the zone data for any subdomain in the zone. 540238106Sdes # o nodefault can be used to normally resolve AS112 zones. 541238106Sdes # o typetransparent resolves normally for other types and other names 542282089Sdes # o inform resolves normally, but logs client IP address 543287917Sdes # o inform_deny drops queries and logs client IP address 544238106Sdes # 545238106Sdes # defaults are localhost address, reverse for 127.0.0.1 and ::1 546238106Sdes # and nxdomain for AS112 zones. If you configure one of these zones 547238106Sdes # the default content is omitted, or you can omit it with 'nodefault'. 548292206Sdes # 549238106Sdes # If you configure local-data without specifying local-zone, by 550238106Sdes # default a transparent local-zone is created for the data. 551238106Sdes # 552238106Sdes # You can add locally served data with 553238106Sdes # local-zone: "local." static 554238106Sdes # local-data: "mycomputer.local. IN A 192.0.2.51" 555238106Sdes # local-data: 'mytext.local TXT "content of text record"' 556238106Sdes # 557238106Sdes # You can override certain queries with 558238106Sdes # local-data: "adserver.example.com A 127.0.0.1" 559238106Sdes # 560238106Sdes # You can redirect a domain to a fixed address with 561238106Sdes # (this makes example.com, www.example.com, etc, all go to 192.0.2.3) 562238106Sdes # local-zone: "example.com" redirect 563238106Sdes # local-data: "example.com A 192.0.2.3" 564238106Sdes # 565238106Sdes # Shorthand to make PTR records, "IPv4 name" or "IPv6 name". 566238106Sdes # You can also add PTR records using local-data directly, but then 567238106Sdes # you need to do the reverse notation yourself. 568238106Sdes # local-data-ptr: "192.0.2.3 www.example.com" 569238106Sdes 570238106Sdes # service clients over SSL (on the TCP sockets), with plain DNS inside 571238106Sdes # the SSL stream. Give the certificate to use and private key. 572238106Sdes # default is "" (disabled). requires restart to take effect. 573238106Sdes # ssl-service-key: "path/to/privatekeyfile.key" 574238106Sdes # ssl-service-pem: "path/to/publiccertfile.pem" 575292206Sdes # ssl-port: 853 576238106Sdes 577238106Sdes # request upstream over SSL (with plain DNS inside the SSL stream). 578238106Sdes # Default is no. Can be turned on and off with unbound-control. 579238106Sdes # ssl-upstream: no 580238106Sdes 581276605Sdes # DNS64 prefix. Must be specified when DNS64 is use. 582276605Sdes # Enable dns64 in module-config. Used to synthesize IPv6 from IPv4. 583276605Sdes # dns64-prefix: 64:ff9b::0/96 584276605Sdes 585287917Sdes # ratelimit for uncached, new queries, this limits recursion effort. 586287917Sdes # ratelimiting is experimental, and may help against randomqueryflood. 587287917Sdes # if 0(default) it is disabled, otherwise state qps allowed per zone. 588287917Sdes # ratelimit: 0 589287917Sdes 590287917Sdes # ratelimits are tracked in a cache, size in bytes of cache (or k,m). 591287917Sdes # ratelimit-size: 4m 592287917Sdes # ratelimit cache slabs, reduces lock contention if equal to cpucount. 593287917Sdes # ratelimit-slabs: 4 594292206Sdes 595287917Sdes # 0 blocks when ratelimited, otherwise let 1/xth traffic through 596287917Sdes # ratelimit-factor: 10 597287917Sdes 598287917Sdes # override the ratelimit for a specific domain name. 599287917Sdes # give this setting multiple times to have multiple overrides. 600287917Sdes # ratelimit-for-domain: example.com 1000 601287917Sdes # override the ratelimits for all domains below a domain name 602287917Sdes # can give this multiple times, the name closest to the zone is used. 603287917Sdes # ratelimit-below-domain: example 1000 604287917Sdes 605238106Sdes# Python config section. To enable: 606238106Sdes# o use --with-pythonmodule to configure before compiling. 607238106Sdes# o list python in the module-config string (above) to enable. 608238106Sdes# o and give a python-script to run. 609238106Sdespython: 610238106Sdes # Script file to load 611238106Sdes # python-script: "@UNBOUND_SHARE_DIR@/ubmodule-tst.py" 612238106Sdes 613292206Sdes# Remote control config section. 614238106Sdesremote-control: 615238106Sdes # Enable remote control with unbound-control(8) here. 616238106Sdes # set up the keys and certificates with unbound-control-setup. 617238106Sdes # control-enable: no 618238106Sdes 619282089Sdes # Set to no and use an absolute path as control-interface to use 620282089Sdes # a unix local named pipe for unbound-control. 621282089Sdes # control-use-cert: yes 622282089Sdes 623238106Sdes # what interfaces are listened to for remote control. 624238106Sdes # give 0.0.0.0 and ::0 to listen to all interfaces. 625238106Sdes # control-interface: 127.0.0.1 626238106Sdes # control-interface: ::1 627238106Sdes 628238106Sdes # port number for remote control operations. 629238106Sdes # control-port: 8953 630238106Sdes 631238106Sdes # unbound server key file. 632238106Sdes # server-key-file: "@UNBOUND_RUN_DIR@/unbound_server.key" 633238106Sdes 634238106Sdes # unbound server certificate file. 635238106Sdes # server-cert-file: "@UNBOUND_RUN_DIR@/unbound_server.pem" 636238106Sdes 637238106Sdes # unbound-control key file. 638238106Sdes # control-key-file: "@UNBOUND_RUN_DIR@/unbound_control.key" 639238106Sdes 640238106Sdes # unbound-control certificate file. 641238106Sdes # control-cert-file: "@UNBOUND_RUN_DIR@/unbound_control.pem" 642238106Sdes 643238106Sdes# Stub zones. 644292206Sdes# Create entries like below, to make all queries for 'example.com' and 645292206Sdes# 'example.org' go to the given list of nameservers. list zero or more 646292206Sdes# nameservers by hostname or by ipaddress. If you set stub-prime to yes, 647238106Sdes# the list is treated as priming hints (default is no). 648238106Sdes# With stub-first yes, it attempts without the stub if it fails. 649289063Sdes# Consider adding domain-insecure: name and local-zone: name nodefault 650289063Sdes# to the server: section if the stub is a locally served zone. 651238106Sdes# stub-zone: 652238106Sdes# name: "example.com" 653238106Sdes# stub-addr: 192.0.2.68 654238106Sdes# stub-prime: no 655238106Sdes# stub-first: no 656238106Sdes# stub-zone: 657238106Sdes# name: "example.org" 658238106Sdes# stub-host: ns.example.com. 659238106Sdes 660238106Sdes# Forward zones 661238106Sdes# Create entries like below, to make all queries for 'example.com' and 662238106Sdes# 'example.org' go to the given list of servers. These servers have to handle 663238106Sdes# recursion to other nameservers. List zero or more nameservers by hostname 664238106Sdes# or by ipaddress. Use an entry with name "." to forward all queries. 665238106Sdes# If you enable forward-first, it attempts without the forward if it fails. 666238106Sdes# forward-zone: 667238106Sdes# name: "example.com" 668238106Sdes# forward-addr: 192.0.2.68 669238106Sdes# forward-addr: 192.0.2.73@5355 # forward to port 5355. 670238106Sdes# forward-first: no 671238106Sdes# forward-zone: 672238106Sdes# name: "example.org" 673238106Sdes# forward-host: fwd.example.com 674