example.conf.in revision 291767
1237263Snp# 2237263Snp# Example configuration file. 3237263Snp# 4237263Snp# See unbound.conf(5) man page, version 1.5.5. 5237263Snp# 6237263Snp# this is a comment. 7237263Snp 8237263Snp#Use this to include other text into the file. 9237263Snp#include: "otherfile.conf" 10237263Snp 11237263Snp# The server clause sets the main parameters. 12237263Snpserver: 13237263Snp # whitespace is not necessary, but looks cleaner. 14237263Snp 15237263Snp # verbosity number, 0 is least verbose. 1 is default. 16237263Snp verbosity: 1 17237263Snp 18237263Snp # print statistics to the log (for every thread) every N seconds. 19237263Snp # Set to "" or 0 to disable. Default is disabled. 20237263Snp # statistics-interval: 0 21237263Snp 22237263Snp # enable cumulative statistics, without clearing them after printing. 23237263Snp # statistics-cumulative: no 24237263Snp 25237263Snp # enable extended statistics (query types, answer codes, status) 26237263Snp # printed from unbound-control. default off, because of speed. 27237263Snp # extended-statistics: no 28237263Snp 29237263Snp # number of threads to create. 1 disables threading. 30237263Snp # num-threads: 1 31237263Snp 32237263Snp # specify the interfaces to answer queries from by ip-address. 33237263Snp # The default is to listen to localhost (127.0.0.1 and ::1). 34237263Snp # specify 0.0.0.0 and ::0 to bind to all available interfaces. 35237263Snp # specify every interface[@port] on a new 'interface:' labelled line. 36237263Snp # The listen interfaces are not changed on reload, only on restart. 37237263Snp # interface: 192.0.2.153 38237263Snp # interface: 192.0.2.154 39237263Snp # interface: 192.0.2.154@5003 40237263Snp # interface: 2001:DB8::5 41237263Snp 42237263Snp # enable this feature to copy the source address of queries to reply. 43237263Snp # Socket options are not supported on all platforms. experimental. 44237263Snp # interface-automatic: no 45237263Snp 46237263Snp # port to answer queries from 47237263Snp # port: 53 48237263Snp 49237263Snp # specify the interfaces to send outgoing queries to authoritative 50237263Snp # server from by ip-address. If none, the default (all) interface 51237263Snp # is used. Specify every interface on a 'outgoing-interface:' line. 52237263Snp # outgoing-interface: 192.0.2.153 53237263Snp # outgoing-interface: 2001:DB8::5 54237263Snp # outgoing-interface: 2001:DB8::6 55237263Snp 56239344Snp # number of ports to allocate per thread, determines the size of the 57237263Snp # port range that can be open simultaneously. About double the 58237263Snp # num-queries-per-thread, or, use as many as the OS will allow you. 59237263Snp # outgoing-range: 4096 60237263Snp 61237263Snp # permit unbound to use this port number or port range for 62237263Snp # making outgoing queries, using an outgoing interface. 63237263Snp # outgoing-port-permit: 32768 64237263Snp 65237263Snp # deny unbound the use this of port number or port range for 66237263Snp # making outgoing queries, using an outgoing interface. 67237263Snp # Use this to make sure unbound does not grab a UDP port that some 68237263Snp # other server on this computer needs. The default is to avoid 69237263Snp # IANA-assigned port numbers. 70237263Snp # If multiple outgoing-port-permit and outgoing-port-avoid options 71237263Snp # are present, they are processed in order. 72237263Snp # outgoing-port-avoid: "3200-3208" 73237263Snp 74237263Snp # number of outgoing simultaneous tcp buffers to hold per thread. 75237263Snp # outgoing-num-tcp: 10 76241626Snp 77241626Snp # number of incoming simultaneous tcp buffers to hold per thread. 78241642Snp # incoming-num-tcp: 10 79237263Snp 80237263Snp # buffer size for UDP port 53 incoming (SO_RCVBUF socket option). 81237263Snp # 0 is system default. Use 4m to catch query spikes for busy servers. 82237263Snp # so-rcvbuf: 0 83237263Snp 84239514Snp # buffer size for UDP port 53 outgoing (SO_SNDBUF socket option). 85237263Snp # 0 is system default. Use 4m to handle spikes on very busy servers. 86237263Snp # so-sndbuf: 0 87237263Snp 88237263Snp # use SO_REUSEPORT to distribute queries over threads. 89237263Snp # so-reuseport: no 90237263Snp 91248925Snp # use IP_TRANSPARENT so the interface: addresses can be non-local 92237263Snp # and you can config non-existing IPs that are going to work later on 93237263Snp # ip-transparent: no 94237263Snp 95237263Snp # EDNS reassembly buffer to advertise to UDP peers (the actual buffer 96237263Snp # is set with msg-buffer-size). 1480 can solve fragmentation (timeouts). 97237263Snp # edns-buffer-size: 4096 98237263Snp 99237263Snp # Maximum UDP response size (not applied to TCP response). 100237263Snp # Suggested values are 512 to 4096. Default is 4096. 65536 disables it. 101237263Snp # max-udp-size: 4096 102237263Snp 103237263Snp # buffer size for handling DNS data. No messages larger than this 104237263Snp # size can be sent or received, by UDP or TCP. In bytes. 105241626Snp # msg-buffer-size: 65552 106241626Snp 107241626Snp # the amount of memory to use for the message cache. 108241626Snp # plain value in bytes or you can append k, m or G. default is "4Mb". 109241626Snp # msg-cache-size: 4m 110241626Snp 111241626Snp # the number of slabs to use for the message cache. 112237263Snp # the number of slabs must be a power of 2. 113237263Snp # more slabs reduce lock contention, but fragment memory usage. 114237263Snp # msg-cache-slabs: 4 115237263Snp 116237263Snp # the number of queries that a thread gets to service. 117237263Snp # num-queries-per-thread: 1024 118237263Snp 119237263Snp # if very busy, 50% queries run to completion, 50% get timeout in msec 120237263Snp # jostle-timeout: 200 121237263Snp 122237263Snp # msec to wait before close of port on timeout UDP. 0 disables. 123241642Snp # delay-close: 0 124241642Snp 125241642Snp # the amount of memory to use for the RRset cache. 126241642Snp # plain value in bytes or you can append k, m or G. default is "4Mb". 127241642Snp # rrset-cache-size: 4m 128237263Snp 129237263Snp # the number of slabs to use for the RRset cache. 130237263Snp # the number of slabs must be a power of 2. 131237263Snp # more slabs reduce lock contention, but fragment memory usage. 132237263Snp # rrset-cache-slabs: 4 133237263Snp 134237263Snp # the time to live (TTL) value lower bound, in seconds. Default 0. 135237263Snp # If more than an hour could easily give trouble due to stale data. 136237263Snp # cache-min-ttl: 0 137237263Snp 138237263Snp # the time to live (TTL) value cap for RRsets and messages in the 139239514Snp # cache. Items are not cached for longer. In seconds. 140237263Snp # cache-max-ttl: 86400 141237263Snp 142237263Snp # the time to live (TTL) value cap for negative responses in the cache 143237263Snp # cache-max-negative-ttl: 3600 144237263Snp 145237263Snp # the time to live (TTL) value for cached roundtrip times, lameness and 146237263Snp # EDNS version information for hosts. In seconds. 147237263Snp # infra-host-ttl: 900 148237263Snp 149237263Snp # minimum wait time for responses, increase if uplink is long. In msec. 150237263Snp # infra-cache-min-rtt: 50 151237263Snp 152237263Snp # the number of slabs to use for the Infrastructure cache. 153237263Snp # the number of slabs must be a power of 2. 154237263Snp # more slabs reduce lock contention, but fragment memory usage. 155237263Snp # infra-cache-slabs: 4 156237263Snp 157237263Snp # the maximum number of hosts that are cached (roundtrip, EDNS, lame). 158237263Snp # infra-cache-numhosts: 10000 159239514Snp 160237263Snp # Enable IPv4, "yes" or "no". 161237263Snp # do-ip4: yes 162239514Snp 163237263Snp # Enable IPv6, "yes" or "no". 164237263Snp # do-ip6: yes 165239514Snp 166237263Snp # Enable UDP, "yes" or "no". 167239514Snp # do-udp: yes 168237263Snp 169237263Snp # Enable TCP, "yes" or "no". 170237263Snp # do-tcp: yes 171237263Snp 172237263Snp # upstream connections use TCP only (and no UDP), "yes" or "no" 173237263Snp # useful for tunneling scenarios, default no. 174237263Snp # tcp-upstream: no 175237263Snp 176237263Snp # Detach from the terminal, run in background, "yes" or "no". 177237263Snp # do-daemonize: yes 178237263Snp 179237263Snp # control which clients are allowed to make (recursive) queries 180237263Snp # to this server. Specify classless netblocks with /size and action. 181237263Snp # By default everything is refused, except for localhost. 182239514Snp # Choose deny (drop message), refuse (polite error reply), 183237263Snp # allow (recursive ok), allow_snoop (recursive and nonrecursive ok) 184237263Snp # deny_non_local (drop queries unless can be answered from local-data) 185237263Snp # refuse_non_local (like deny_non_local but polite error reply). 186237263Snp # access-control: 0.0.0.0/0 refuse 187237263Snp # access-control: 127.0.0.0/8 allow 188237263Snp # access-control: ::0/0 refuse 189237263Snp # access-control: ::1 allow 190237263Snp # access-control: ::ffff:127.0.0.1 allow 191237263Snp 192237263Snp # if given, a chroot(2) is done to the given directory. 193237263Snp # i.e. you can chroot to the working directory, for example, 194237263Snp # for extra security, but make sure all files are in that directory. 195237263Snp # 196237263Snp # If chroot is enabled, you should pass the configfile (from the 197237263Snp # commandline) as a full path from the original root. After the 198237263Snp # chroot has been performed the now defunct portion of the config 199237263Snp # file path is removed to be able to reread the config after a reload. 200237263Snp # 201237263Snp # All other file paths (working dir, logfile, roothints, and 202237263Snp # key files) can be specified in several ways: 203237263Snp # o as an absolute path relative to the new root. 204237263Snp # o as a relative path to the working directory. 205237263Snp # o as an absolute path relative to the original root. 206237263Snp # In the last case the path is adjusted to remove the unused portion. 207237263Snp # 208237263Snp # The pid file can be absolute and outside of the chroot, it is 209237263Snp # written just prior to performing the chroot and dropping permissions. 210237263Snp # 211237263Snp # Additionally, unbound may need to access /dev/random (for entropy). 212237263Snp # How to do this is specific to your OS. 213237263Snp # 214237263Snp # If you give "" no chroot is performed. The path must not end in a /. 215237263Snp # chroot: "@UNBOUND_CHROOT_DIR@" 216237263Snp 217237263Snp # if given, user privileges are dropped (after binding port), 218237263Snp # and the given username is assumed. Default is user "unbound". 219237263Snp # If you give "" no privileges are dropped. 220237263Snp # username: "@UNBOUND_USERNAME@" 221237263Snp 222237263Snp # the working directory. The relative files in this config are 223237263Snp # relative to this directory. If you give "" the working directory 224237263Snp # is not changed. 225237263Snp # directory: "@UNBOUND_RUN_DIR@" 226237263Snp 227237263Snp # the log file, "" means log to stderr. 228237263Snp # Use of this option sets use-syslog to "no". 229237263Snp # logfile: "" 230237263Snp 231237263Snp # Log to syslog(3) if yes. The log facility LOG_DAEMON is used to 232237263Snp # log to, with identity "unbound". If yes, it overrides the logfile. 233237263Snp # use-syslog: yes 234237263Snp 235237263Snp # print UTC timestamp in ascii to logfile, default is epoch in seconds. 236237263Snp # log-time-ascii: no 237237263Snp 238237263Snp # print one line with time, IP, name, type, class for every query. 239237263Snp # log-queries: no 240237263Snp 241237263Snp # the pid file. Can be an absolute path outside of chroot/work dir. 242237263Snp # pidfile: "@UNBOUND_PIDFILE@" 243237263Snp 244237263Snp # file to read root hints from. 245237263Snp # get one from ftp://FTP.INTERNIC.NET/domain/named.cache 246237263Snp # root-hints: "" 247237263Snp 248237263Snp # enable to not answer id.server and hostname.bind queries. 249237263Snp # hide-identity: no 250237263Snp 251237263Snp # enable to not answer version.server and version.bind queries. 252237263Snp # hide-version: no 253237263Snp 254237263Snp # the identity to report. Leave "" or default to return hostname. 255237263Snp # identity: "" 256237263Snp 257237263Snp # the version to report. Leave "" or default to return package version. 258237263Snp # version: "" 259237263Snp 260237263Snp # the target fetch policy. 261237263Snp # series of integers describing the policy per dependency depth. 262237263Snp # The number of values in the list determines the maximum dependency 263237263Snp # depth the recursor will pursue before giving up. Each integer means: 264237263Snp # -1 : fetch all targets opportunistically, 265237263Snp # 0: fetch on demand, 266237263Snp # positive value: fetch that many targets opportunistically. 267237263Snp # Enclose the list of numbers between quotes (""). 268237263Snp # target-fetch-policy: "3 2 1 0 0" 269237263Snp 270237263Snp # Harden against very small EDNS buffer sizes. 271237263Snp # harden-short-bufsize: no 272237263Snp 273237263Snp # Harden against unseemly large queries. 274237263Snp # harden-large-queries: no 275237263Snp 276237263Snp # Harden against out of zone rrsets, to avoid spoofing attempts. 277237263Snp # harden-glue: yes 278237263Snp 279237263Snp # Harden against receiving dnssec-stripped data. If you turn it 280237263Snp # off, failing to validate dnskey data for a trustanchor will 281237263Snp # trigger insecure mode for that zone (like without a trustanchor). 282237263Snp # Default on, which insists on dnssec data for trust-anchored zones. 283237263Snp # harden-dnssec-stripped: yes 284237263Snp 285237263Snp # Harden against queries that fall under dnssec-signed nxdomain names. 286237263Snp # harden-below-nxdomain: no 287237263Snp 288237263Snp # Harden the referral path by performing additional queries for 289237263Snp # infrastructure data. Validates the replies (if possible). 290237263Snp # Default off, because the lookups burden the server. Experimental 291237263Snp # implementation of draft-wijngaards-dnsext-resolver-side-mitigation. 292237263Snp # harden-referral-path: no 293237263Snp 294237263Snp # Harden against algorithm downgrade when multiple algorithms are 295237263Snp # advertised in the DS record. If no, allows the weakest algorithm 296237263Snp # to validate the zone. 297237263Snp # harden-algo-downgrade: no 298237263Snp 299237263Snp # Use 0x20-encoded random bits in the query to foil spoof attempts. 300237263Snp # This feature is an experimental implementation of draft dns-0x20. 301237263Snp # use-caps-for-id: no 302237263Snp 303237263Snp # Domains (and domains in them) without support for dns-0x20 and 304237263Snp # the fallback fails because they keep sending different answers. 305237263Snp # caps-whitelist: "licdn.com" 306237263Snp 307237263Snp # Enforce privacy of these addresses. Strips them away from answers. 308239344Snp # It may cause DNSSEC validation to additionally mark it as bogus. 309237263Snp # Protects against 'DNS Rebinding' (uses browser as network proxy). 310237263Snp # Only 'private-domain' and 'local-data' names are allowed to have 311237263Snp # these private addresses. No default. 312237263Snp # private-address: 10.0.0.0/8 313237263Snp # private-address: 172.16.0.0/12 314239344Snp # private-address: 192.168.0.0/16 315239344Snp # private-address: 169.254.0.0/16 316237263Snp # private-address: fd00::/8 317237263Snp # private-address: fe80::/10 318237263Snp 319237263Snp # Allow the domain (and its subdomains) to contain private addresses. 320237263Snp # local-data statements are allowed to contain private addresses too. 321237263Snp # private-domain: "example.com" 322237263Snp 323237263Snp # If nonzero, unwanted replies are not only reported in statistics, 324237263Snp # but also a running total is kept per thread. If it reaches the 325237263Snp # threshold, a warning is printed and a defensive action is taken, 326237263Snp # the cache is cleared to flush potential poison out of it. 327237263Snp # A suggested value is 10000000, the default is 0 (turned off). 328237263Snp # unwanted-reply-threshold: 0 329237263Snp 330237263Snp # Do not query the following addresses. No DNS queries are sent there. 331237263Snp # List one address per entry. List classless netblocks with /size, 332237263Snp # do-not-query-address: 127.0.0.1/8 333237263Snp # do-not-query-address: ::1 334239344Snp 335237263Snp # if yes, the above default do-not-query-address entries are present. 336239344Snp # if no, localhost can be queried (for testing and debugging). 337237263Snp # do-not-query-localhost: yes 338237263Snp 339237263Snp # if yes, perform prefetching of almost expired message cache entries. 340239344Snp # prefetch: no 341239344Snp 342239344Snp # if yes, perform key lookups adjacent to normal lookups. 343239344Snp # prefetch-key: no 344239344Snp 345239344Snp # if yes, Unbound rotates RRSet order in response. 346239344Snp # rrset-roundrobin: no 347239344Snp 348237263Snp # if yes, Unbound doesn't insert authority/additional sections 349239344Snp # into response messages when those sections are not required. 350239344Snp # minimal-responses: no 351237263Snp 352239344Snp # module configuration of the server. A string with identifiers 353239344Snp # separated by spaces. Syntax: "[dns64] [validator] iterator" 354237263Snp # module-config: "validator iterator" 355239344Snp 356237263Snp # File with trusted keys, kept uptodate using RFC5011 probes, 357237263Snp # initial file like trust-anchor-file, then it stores metadata. 358237263Snp # Use several entries, one per domain name, to track multiple zones. 359237263Snp # 360237263Snp # If you want to perform DNSSEC validation, run unbound-anchor before 361237263Snp # you start unbound (i.e. in the system boot scripts). And enable: 362237263Snp # Please note usage of unbound-anchor root anchor is at your own risk 363237263Snp # and under the terms of our LICENSE (see that file in the source). 364237263Snp # auto-trust-anchor-file: "@UNBOUND_ROOTKEY_FILE@" 365237263Snp 366237263Snp # File with DLV trusted keys. Same format as trust-anchor-file. 367237263Snp # There can be only one DLV configured, it is trusted from root down. 368237263Snp # DLV is going to be decommissioned. Please do not use it any more. 369237263Snp # dlv-anchor-file: "dlv.isc.org.key" 370237263Snp 371237263Snp # File with trusted keys for validation. Specify more than one file 372239514Snp # with several entries, one file per entry. 373237263Snp # Zone file format, with DS and DNSKEY entries. 374239514Snp # Note this gets out of date, use auto-trust-anchor-file please. 375237263Snp # trust-anchor-file: "" 376237263Snp 377239514Snp # Trusted key for validation. DS or DNSKEY. specify the RR on a 378237263Snp # single line, surrounded by "". TTL is ignored. class is IN default. 379237263Snp # Note this gets out of date, use auto-trust-anchor-file please. 380237263Snp # (These examples are from August 2007 and may not be valid anymore). 381237263Snp # trust-anchor: "nlnetlabs.nl. DNSKEY 257 3 5 AQPzzTWMz8qSWIQlfRnPckx2BiVmkVN6LPupO3mbz7FhLSnm26n6iG9N Lby97Ji453aWZY3M5/xJBSOS2vWtco2t8C0+xeO1bc/d6ZTy32DHchpW 6rDH1vp86Ll+ha0tmwyy9QP7y2bVw5zSbFCrefk8qCUBgfHm9bHzMG1U BYtEIQ==" 382237263Snp # trust-anchor: "jelte.nlnetlabs.nl. DS 42860 5 1 14D739EB566D2B1A5E216A0BA4D17FA9B038BE4A" 383237263Snp 384237263Snp # File with trusted keys for validation. Specify more than one file 385237263Snp # with several entries, one file per entry. Like trust-anchor-file 386237263Snp # but has a different file format. Format is BIND-9 style format, 387237263Snp # the trusted-keys { name flag proto algo "key"; }; clauses are read. 388237263Snp # you need external update procedures to track changes in keys. 389237263Snp # trusted-keys-file: "" 390237263Snp 391237263Snp # Ignore chain of trust. Domain is treated as insecure. 392237263Snp # domain-insecure: "example.com" 393237263Snp 394237263Snp # Override the date for validation with a specific fixed date. 395239514Snp # Do not set this unless you are debugging signature inception 396239514Snp # and expiration. "" or "0" turns the feature off. -1 ignores date. 397237263Snp # val-override-date: "" 398237263Snp 399237263Snp # The time to live for bogus data, rrsets and messages. This avoids 400237263Snp # some of the revalidation, until the time interval expires. in secs. 401237263Snp # val-bogus-ttl: 60 402237263Snp 403237263Snp # The signature inception and expiration dates are allowed to be off 404237263Snp # by 10% of the signature lifetime (expir-incep) from our local clock. 405237263Snp # This leeway is capped with a minimum and a maximum. In seconds. 406237263Snp # val-sig-skew-min: 3600 407237263Snp # val-sig-skew-max: 86400 408237263Snp 409237263Snp # Should additional section of secure message also be kept clean of 410237263Snp # unsecure data. Useful to shield the users of this validator from 411237263Snp # potential bogus data in the additional section. All unsigned data 412237263Snp # in the additional section is removed from secure messages. 413237263Snp # val-clean-additional: yes 414237263Snp 415237263Snp # Turn permissive mode on to permit bogus messages. Thus, messages 416237263Snp # for which security checks failed will be returned to clients, 417237263Snp # instead of SERVFAIL. It still performs the security checks, which 418237263Snp # result in interesting log files and possibly the AD bit in 419237263Snp # replies if the message is found secure. The default is off. 420237263Snp # val-permissive-mode: no 421237263Snp 422237263Snp # Ignore the CD flag in incoming queries and refuse them bogus data. 423237263Snp # Enable it if the only clients of unbound are legacy servers (w2008) 424237263Snp # that set CD but cannot validate themselves. 425237263Snp # ignore-cd-flag: no 426237263Snp 427237263Snp # Have the validator log failed validations for your diagnosis. 428237263Snp # 0: off. 1: A line per failed user query. 2: With reason and bad IP. 429237263Snp # val-log-level: 0 430237263Snp 431237263Snp # It is possible to configure NSEC3 maximum iteration counts per 432237263Snp # keysize. Keep this table very short, as linear search is done. 433237263Snp # A message with an NSEC3 with larger count is marked insecure. 434237263Snp # List in ascending order the keysize and count values. 435237263Snp # val-nsec3-keysize-iterations: "1024 150 2048 500 4096 2500" 436237263Snp 437237263Snp # instruct the auto-trust-anchor-file probing to add anchors after ttl. 438237263Snp # add-holddown: 2592000 # 30 days 439237263Snp 440237263Snp # instruct the auto-trust-anchor-file probing to del anchors after ttl. 441237263Snp # del-holddown: 2592000 # 30 days 442237263Snp 443237263Snp # auto-trust-anchor-file probing removes missing anchors after ttl. 444237263Snp # If the value 0 is given, missing anchors are not removed. 445237263Snp # keep-missing: 31622400 # 366 days 446237263Snp 447255411Snp # debug option that allows very small holddown times for key rollover 448237263Snp # permit-small-holddown: no 449237263Snp 450237263Snp # the amount of memory to use for the key cache. 451237263Snp # plain value in bytes or you can append k, m or G. default is "4Mb". 452255411Snp # key-cache-size: 4m 453237263Snp 454237263Snp # the number of slabs to use for the key cache. 455256459Snp # the number of slabs must be a power of 2. 456237263Snp # more slabs reduce lock contention, but fragment memory usage. 457237263Snp # key-cache-slabs: 4 458237263Snp 459237263Snp # the amount of memory to use for the negative cache (used for DLV). 460237263Snp # plain value in bytes or you can append k, m or G. default is "1Mb". 461237263Snp # neg-cache-size: 1m 462237263Snp 463237263Snp # By default, for a number of zones a small default 'nothing here' 464237263Snp # reply is built-in. Query traffic is thus blocked. If you 465237263Snp # wish to serve such zone you can unblock them by uncommenting one 466237263Snp # of the nodefault statements below. 467237263Snp # You may also have to use domain-insecure: zone to make DNSSEC work, 468237263Snp # unless you have your own trust anchors for this zone. 469237263Snp # local-zone: "localhost." nodefault 470237263Snp # local-zone: "127.in-addr.arpa." nodefault 471237263Snp # 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 472237263Snp # local-zone: "10.in-addr.arpa." nodefault 473237263Snp # local-zone: "16.172.in-addr.arpa." nodefault 474237263Snp # local-zone: "17.172.in-addr.arpa." nodefault 475237263Snp # local-zone: "18.172.in-addr.arpa." nodefault 476237263Snp # local-zone: "19.172.in-addr.arpa." nodefault 477237263Snp # local-zone: "20.172.in-addr.arpa." nodefault 478237263Snp # local-zone: "21.172.in-addr.arpa." nodefault 479237263Snp # local-zone: "22.172.in-addr.arpa." nodefault 480237263Snp # local-zone: "23.172.in-addr.arpa." nodefault 481237263Snp # local-zone: "24.172.in-addr.arpa." nodefault 482237263Snp # local-zone: "25.172.in-addr.arpa." nodefault 483237263Snp # local-zone: "26.172.in-addr.arpa." nodefault 484237263Snp # local-zone: "27.172.in-addr.arpa." nodefault 485237263Snp # local-zone: "28.172.in-addr.arpa." nodefault 486237263Snp # local-zone: "29.172.in-addr.arpa." nodefault 487237263Snp # local-zone: "30.172.in-addr.arpa." nodefault 488237263Snp # local-zone: "31.172.in-addr.arpa." nodefault 489237263Snp # local-zone: "168.192.in-addr.arpa." nodefault 490237263Snp # local-zone: "0.in-addr.arpa." nodefault 491237263Snp # local-zone: "254.169.in-addr.arpa." nodefault 492237263Snp # local-zone: "2.0.192.in-addr.arpa." nodefault 493237263Snp # local-zone: "100.51.198.in-addr.arpa." nodefault 494237263Snp # local-zone: "113.0.203.in-addr.arpa." nodefault 495237263Snp # local-zone: "255.255.255.255.in-addr.arpa." nodefault 496237263Snp # 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 497237263Snp # local-zone: "d.f.ip6.arpa." nodefault 498237263Snp # local-zone: "8.e.f.ip6.arpa." nodefault 499237263Snp # local-zone: "9.e.f.ip6.arpa." nodefault 500237263Snp # local-zone: "a.e.f.ip6.arpa." nodefault 501237263Snp # local-zone: "b.e.f.ip6.arpa." nodefault 502237263Snp # local-zone: "8.b.d.0.1.0.0.2.ip6.arpa." nodefault 503237263Snp # And for 64.100.in-addr.arpa. to 127.100.in-addr.arpa. 504237263Snp 505237263Snp # if unbound is running service for the local host then it is useful 506237263Snp # to perform lan-wide lookups to the upstream, and unblock the 507237263Snp # long list of local-zones above. If this unbound is a dns server 508237263Snp # for a network of computers, disabled is better and stops information 509237263Snp # leakage of local lan information. 510237263Snp # unblock-lan-zones: no 511237263Snp 512237263Snp # a number of locally served zones can be configured. 513237263Snp # local-zone: <zone> <type> 514237263Snp # local-data: "<resource record string>" 515237263Snp # o deny serves local data (if any), else, drops queries. 516237263Snp # o refuse serves local data (if any), else, replies with error. 517237263Snp # o static serves local data, else, nxdomain or nodata answer. 518237263Snp # o transparent gives local data, but resolves normally for other names 519237263Snp # o redirect serves the zone data for any subdomain in the zone. 520237263Snp # o nodefault can be used to normally resolve AS112 zones. 521237263Snp # o typetransparent resolves normally for other types and other names 522255411Snp # o inform resolves normally, but logs client IP address 523255411Snp # o inform_deny drops queries and logs client IP address 524255411Snp # 525255411Snp # defaults are localhost address, reverse for 127.0.0.1 and ::1 526255411Snp # and nxdomain for AS112 zones. If you configure one of these zones 527255411Snp # the default content is omitted, or you can omit it with 'nodefault'. 528255411Snp # 529237263Snp # If you configure local-data without specifying local-zone, by 530237263Snp # default a transparent local-zone is created for the data. 531255411Snp # 532237263Snp # You can add locally served data with 533237263Snp # local-zone: "local." static 534237263Snp # local-data: "mycomputer.local. IN A 192.0.2.51" 535237263Snp # local-data: 'mytext.local TXT "content of text record"' 536255411Snp # 537237263Snp # You can override certain queries with 538237263Snp # local-data: "adserver.example.com A 127.0.0.1" 539237263Snp # 540237263Snp # You can redirect a domain to a fixed address with 541255411Snp # (this makes example.com, www.example.com, etc, all go to 192.0.2.3) 542237263Snp # local-zone: "example.com" redirect 543237263Snp # local-data: "example.com A 192.0.2.3" 544237263Snp # 545239514Snp # Shorthand to make PTR records, "IPv4 name" or "IPv6 name". 546237263Snp # You can also add PTR records using local-data directly, but then 547237263Snp # you need to do the reverse notation yourself. 548255005Snp # local-data-ptr: "192.0.2.3 www.example.com" 549255005Snp 550255005Snp # service clients over SSL (on the TCP sockets), with plain DNS inside 551255005Snp # the SSL stream. Give the certificate to use and private key. 552237263Snp # default is "" (disabled). requires restart to take effect. 553237263Snp # ssl-service-key: "path/to/privatekeyfile.key" 554237263Snp # ssl-service-pem: "path/to/publiccertfile.pem" 555237263Snp # ssl-port: 443 556237263Snp 557255411Snp # request upstream over SSL (with plain DNS inside the SSL stream). 558255411Snp # Default is no. Can be turned on and off with unbound-control. 559255411Snp # ssl-upstream: no 560237263Snp 561255411Snp # DNS64 prefix. Must be specified when DNS64 is use. 562237263Snp # Enable dns64 in module-config. Used to synthesize IPv6 from IPv4. 563237263Snp # dns64-prefix: 64:ff9b::0/96 564237263Snp 565237263Snp # ratelimit for uncached, new queries, this limits recursion effort. 566237263Snp # ratelimiting is experimental, and may help against randomqueryflood. 567237263Snp # if 0(default) it is disabled, otherwise state qps allowed per zone. 568237263Snp # ratelimit: 0 569255411Snp 570255411Snp # ratelimits are tracked in a cache, size in bytes of cache (or k,m). 571255411Snp # ratelimit-size: 4m 572255411Snp # ratelimit cache slabs, reduces lock contention if equal to cpucount. 573255411Snp # ratelimit-slabs: 4 574237263Snp 575237263Snp # 0 blocks when ratelimited, otherwise let 1/xth traffic through 576237263Snp # ratelimit-factor: 10 577237263Snp 578237263Snp # override the ratelimit for a specific domain name. 579237263Snp # give this setting multiple times to have multiple overrides. 580237263Snp # ratelimit-for-domain: example.com 1000 581237263Snp # override the ratelimits for all domains below a domain name 582237263Snp # can give this multiple times, the name closest to the zone is used. 583237263Snp # ratelimit-below-domain: example 1000 584237263Snp 585237263Snp# Python config section. To enable: 586237263Snp# o use --with-pythonmodule to configure before compiling. 587237263Snp# o list python in the module-config string (above) to enable. 588237263Snp# o and give a python-script to run. 589237263Snppython: 590237263Snp # Script file to load 591239514Snp # python-script: "@UNBOUND_SHARE_DIR@/ubmodule-tst.py" 592255411Snp 593255411Snp# Remote control config section. 594255411Snpremote-control: 595255411Snp # Enable remote control with unbound-control(8) here. 596255411Snp # set up the keys and certificates with unbound-control-setup. 597237263Snp # control-enable: no 598237263Snp 599237263Snp # Set to no and use an absolute path as control-interface to use 600237263Snp # a unix local named pipe for unbound-control. 601237263Snp # control-use-cert: yes 602237263Snp 603237263Snp # what interfaces are listened to for remote control. 604237263Snp # give 0.0.0.0 and ::0 to listen to all interfaces. 605237263Snp # control-interface: 127.0.0.1 606237263Snp # control-interface: ::1 607237263Snp 608237263Snp # port number for remote control operations. 609237263Snp # control-port: 8953 610237263Snp 611237263Snp # unbound server key file. 612237263Snp # server-key-file: "@UNBOUND_RUN_DIR@/unbound_server.key" 613255411Snp 614255411Snp # unbound server certificate file. 615255411Snp # server-cert-file: "@UNBOUND_RUN_DIR@/unbound_server.pem" 616255411Snp 617255411Snp # unbound-control key file. 618255411Snp # control-key-file: "@UNBOUND_RUN_DIR@/unbound_control.key" 619255411Snp 620255411Snp # unbound-control certificate file. 621255411Snp # control-cert-file: "@UNBOUND_RUN_DIR@/unbound_control.pem" 622237263Snp 623237263Snp# Stub zones. 624237263Snp# Create entries like below, to make all queries for 'example.com' and 625255411Snp# 'example.org' go to the given list of nameservers. list zero or more 626237263Snp# nameservers by hostname or by ipaddress. If you set stub-prime to yes, 627237263Snp# the list is treated as priming hints (default is no). 628237263Snp# With stub-first yes, it attempts without the stub if it fails. 629237263Snp# Consider adding domain-insecure: name and local-zone: name nodefault 630237263Snp# to the server: section if the stub is a locally served zone. 631255411Snp# stub-zone: 632255411Snp# name: "example.com" 633237263Snp# stub-addr: 192.0.2.68 634255411Snp# stub-prime: no 635255411Snp# stub-first: no 636255411Snp# stub-zone: 637255411Snp# name: "example.org" 638255411Snp# stub-host: ns.example.com. 639237263Snp 640237263Snp# Forward zones 641237263Snp# Create entries like below, to make all queries for 'example.com' and 642237263Snp# 'example.org' go to the given list of servers. These servers have to handle 643237263Snp# recursion to other nameservers. List zero or more nameservers by hostname 644237263Snp# or by ipaddress. Use an entry with name "." to forward all queries. 645237263Snp# If you enable forward-first, it attempts without the forward if it fails. 646237263Snp# forward-zone: 647239514Snp# name: "example.com" 648237263Snp# forward-addr: 192.0.2.68 649237263Snp# forward-addr: 192.0.2.73@5355 # forward to port 5355. 650237263Snp# forward-first: no 651237263Snp# forward-zone: 652237263Snp# name: "example.org" 653237263Snp# forward-host: fwd.example.com 654248925Snp