example.conf revision 295535
1276612Sdes# 2276612Sdes# Example configuration file. 3276612Sdes# 4292206Sdes# See unbound.conf(5) man page, version 1.5.7. 5276612Sdes# 6276612Sdes# this is a comment. 7276612Sdes 8276612Sdes#Use this to include other text into the file. 9276612Sdes#include: "otherfile.conf" 10276612Sdes 11292206Sdes# The server clause sets the main parameters. 12276612Sdesserver: 13276612Sdes # whitespace is not necessary, but looks cleaner. 14276612Sdes 15276612Sdes # verbosity number, 0 is least verbose. 1 is default. 16276612Sdes verbosity: 1 17276612Sdes 18276612Sdes # print statistics to the log (for every thread) every N seconds. 19276612Sdes # Set to "" or 0 to disable. Default is disabled. 20276612Sdes # statistics-interval: 0 21276612Sdes 22276612Sdes # enable cumulative statistics, without clearing them after printing. 23276612Sdes # statistics-cumulative: no 24276612Sdes 25276612Sdes # enable extended statistics (query types, answer codes, status) 26276612Sdes # printed from unbound-control. default off, because of speed. 27276612Sdes # extended-statistics: no 28276612Sdes 29276612Sdes # number of threads to create. 1 disables threading. 30276612Sdes # num-threads: 1 31276612Sdes 32276612Sdes # specify the interfaces to answer queries from by ip-address. 33276612Sdes # The default is to listen to localhost (127.0.0.1 and ::1). 34276612Sdes # specify 0.0.0.0 and ::0 to bind to all available interfaces. 35276612Sdes # specify every interface[@port] on a new 'interface:' labelled line. 36276612Sdes # The listen interfaces are not changed on reload, only on restart. 37276612Sdes # interface: 192.0.2.153 38276612Sdes # interface: 192.0.2.154 39276612Sdes # interface: 192.0.2.154@5003 40276612Sdes # interface: 2001:DB8::5 41276612Sdes 42276612Sdes # enable this feature to copy the source address of queries to reply. 43292206Sdes # Socket options are not supported on all platforms. experimental. 44276612Sdes # interface-automatic: no 45276612Sdes 46276612Sdes # port to answer queries from 47276612Sdes # port: 53 48276612Sdes 49276612Sdes # specify the interfaces to send outgoing queries to authoritative 50276612Sdes # server from by ip-address. If none, the default (all) interface 51276612Sdes # is used. Specify every interface on a 'outgoing-interface:' line. 52276612Sdes # outgoing-interface: 192.0.2.153 53276612Sdes # outgoing-interface: 2001:DB8::5 54276612Sdes # outgoing-interface: 2001:DB8::6 55276612Sdes 56276612Sdes # number of ports to allocate per thread, determines the size of the 57276612Sdes # port range that can be open simultaneously. About double the 58276612Sdes # num-queries-per-thread, or, use as many as the OS will allow you. 59276612Sdes # outgoing-range: 4096 60276612Sdes 61276612Sdes # permit unbound to use this port number or port range for 62276612Sdes # making outgoing queries, using an outgoing interface. 63276612Sdes # outgoing-port-permit: 32768 64276612Sdes 65276612Sdes # deny unbound the use this of port number or port range for 66276612Sdes # making outgoing queries, using an outgoing interface. 67276612Sdes # Use this to make sure unbound does not grab a UDP port that some 68276612Sdes # other server on this computer needs. The default is to avoid 69276612Sdes # IANA-assigned port numbers. 70276612Sdes # If multiple outgoing-port-permit and outgoing-port-avoid options 71276612Sdes # are present, they are processed in order. 72276612Sdes # outgoing-port-avoid: "3200-3208" 73276612Sdes 74276612Sdes # number of outgoing simultaneous tcp buffers to hold per thread. 75276612Sdes # outgoing-num-tcp: 10 76276612Sdes 77276612Sdes # number of incoming simultaneous tcp buffers to hold per thread. 78276612Sdes # incoming-num-tcp: 10 79276612Sdes 80276612Sdes # buffer size for UDP port 53 incoming (SO_RCVBUF socket option). 81276612Sdes # 0 is system default. Use 4m to catch query spikes for busy servers. 82276612Sdes # so-rcvbuf: 0 83276612Sdes 84276612Sdes # buffer size for UDP port 53 outgoing (SO_SNDBUF socket option). 85276612Sdes # 0 is system default. Use 4m to handle spikes on very busy servers. 86276612Sdes # so-sndbuf: 0 87292206Sdes 88276612Sdes # use SO_REUSEPORT to distribute queries over threads. 89276612Sdes # 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 93287917Sdes # ip-transparent: no 94276612Sdes 95276612Sdes # EDNS reassembly buffer to advertise to UDP peers (the actual buffer 96276612Sdes # is set with msg-buffer-size). 1480 can solve fragmentation (timeouts). 97276612Sdes # edns-buffer-size: 4096 98276612Sdes 99276612Sdes # Maximum UDP response size (not applied to TCP response). 100276612Sdes # Suggested values are 512 to 4096. Default is 4096. 65536 disables it. 101276612Sdes # max-udp-size: 4096 102276612Sdes 103276612Sdes # buffer size for handling DNS data. No messages larger than this 104276612Sdes # size can be sent or received, by UDP or TCP. In bytes. 105276612Sdes # msg-buffer-size: 65552 106276612Sdes 107276612Sdes # the amount of memory to use for the message cache. 108292206Sdes # plain value in bytes or you can append k, m or G. default is "4Mb". 109276612Sdes # msg-cache-size: 4m 110276612Sdes 111276612Sdes # the number of slabs to use for the message cache. 112276612Sdes # the number of slabs must be a power of 2. 113276612Sdes # more slabs reduce lock contention, but fragment memory usage. 114276612Sdes # msg-cache-slabs: 4 115276612Sdes 116276612Sdes # the number of queries that a thread gets to service. 117276612Sdes # num-queries-per-thread: 1024 118276612Sdes 119276612Sdes # if very busy, 50% queries run to completion, 50% get timeout in msec 120276612Sdes # jostle-timeout: 200 121292206Sdes 122276612Sdes # msec to wait before close of port on timeout UDP. 0 disables. 123276612Sdes # delay-close: 0 124276612Sdes 125276612Sdes # the amount of memory to use for the RRset cache. 126292206Sdes # plain value in bytes or you can append k, m or G. default is "4Mb". 127276612Sdes # rrset-cache-size: 4m 128276612Sdes 129276612Sdes # the number of slabs to use for the RRset cache. 130276612Sdes # the number of slabs must be a power of 2. 131276612Sdes # more slabs reduce lock contention, but fragment memory usage. 132276612Sdes # rrset-cache-slabs: 4 133276612Sdes 134276612Sdes # the time to live (TTL) value lower bound, in seconds. Default 0. 135276612Sdes # If more than an hour could easily give trouble due to stale data. 136276612Sdes # cache-min-ttl: 0 137276612Sdes 138276612Sdes # the time to live (TTL) value cap for RRsets and messages in the 139276612Sdes # cache. Items are not cached for longer. In seconds. 140276612Sdes # cache-max-ttl: 86400 141276612Sdes 142287917Sdes # the time to live (TTL) value cap for negative responses in the cache 143287917Sdes # cache-max-negative-ttl: 3600 144287917Sdes 145276612Sdes # the time to live (TTL) value for cached roundtrip times, lameness and 146276612Sdes # EDNS version information for hosts. In seconds. 147276612Sdes # infra-host-ttl: 900 148292206Sdes 149282089Sdes # minimum wait time for responses, increase if uplink is long. In msec. 150282089Sdes # infra-cache-min-rtt: 50 151276612Sdes 152276612Sdes # the number of slabs to use for the Infrastructure cache. 153276612Sdes # the number of slabs must be a power of 2. 154276612Sdes # more slabs reduce lock contention, but fragment memory usage. 155276612Sdes # infra-cache-slabs: 4 156276612Sdes 157276612Sdes # the maximum number of hosts that are cached (roundtrip, EDNS, lame). 158276612Sdes # infra-cache-numhosts: 10000 159276612Sdes 160276612Sdes # Enable IPv4, "yes" or "no". 161276612Sdes # do-ip4: yes 162276612Sdes 163276612Sdes # Enable IPv6, "yes" or "no". 164276612Sdes # do-ip6: yes 165276612Sdes 166276612Sdes # Enable UDP, "yes" or "no". 167276612Sdes # do-udp: yes 168276612Sdes 169276612Sdes # Enable TCP, "yes" or "no". 170276612Sdes # do-tcp: yes 171276612Sdes 172276612Sdes # upstream connections use TCP only (and no UDP), "yes" or "no" 173276612Sdes # useful for tunneling scenarios, default no. 174276612Sdes # tcp-upstream: no 175276612Sdes 176276612Sdes # Detach from the terminal, run in background, "yes" or "no". 177276612Sdes # do-daemonize: yes 178276612Sdes 179276612Sdes # control which clients are allowed to make (recursive) queries 180276612Sdes # to this server. Specify classless netblocks with /size and action. 181276612Sdes # By default everything is refused, except for localhost. 182276612Sdes # Choose deny (drop message), refuse (polite error reply), 183276612Sdes # allow (recursive ok), allow_snoop (recursive and nonrecursive ok) 184276612Sdes # deny_non_local (drop queries unless can be answered from local-data) 185276612Sdes # refuse_non_local (like deny_non_local but polite error reply). 186276612Sdes # access-control: 0.0.0.0/0 refuse 187276612Sdes # access-control: 127.0.0.0/8 allow 188276612Sdes # access-control: ::0/0 refuse 189276612Sdes # access-control: ::1 allow 190276612Sdes # access-control: ::ffff:127.0.0.1 allow 191276612Sdes 192276612Sdes # if given, a chroot(2) is done to the given directory. 193276612Sdes # i.e. you can chroot to the working directory, for example, 194276612Sdes # for extra security, but make sure all files are in that directory. 195276612Sdes # 196276612Sdes # If chroot is enabled, you should pass the configfile (from the 197276612Sdes # commandline) as a full path from the original root. After the 198292206Sdes # chroot has been performed the now defunct portion of the config 199292206Sdes # file path is removed to be able to reread the config after a reload. 200276612Sdes # 201276612Sdes # All other file paths (working dir, logfile, roothints, and 202276612Sdes # key files) can be specified in several ways: 203276612Sdes # o as an absolute path relative to the new root. 204276612Sdes # o as a relative path to the working directory. 205276612Sdes # o as an absolute path relative to the original root. 206276612Sdes # In the last case the path is adjusted to remove the unused portion. 207276612Sdes # 208292206Sdes # The pid file can be absolute and outside of the chroot, it is 209276612Sdes # written just prior to performing the chroot and dropping permissions. 210276612Sdes # 211276612Sdes # Additionally, unbound may need to access /dev/random (for entropy). 212276612Sdes # How to do this is specific to your OS. 213276612Sdes # 214276612Sdes # If you give "" no chroot is performed. The path must not end in a /. 215276612Sdes # chroot: "/var/unbound" 216276612Sdes 217276612Sdes # if given, user privileges are dropped (after binding port), 218276612Sdes # and the given username is assumed. Default is user "unbound". 219276612Sdes # If you give "" no privileges are dropped. 220276612Sdes # username: "unbound" 221276612Sdes 222292206Sdes # the working directory. The relative files in this config are 223276612Sdes # relative to this directory. If you give "" the working directory 224276612Sdes # is not changed. 225276612Sdes # directory: "/var/unbound" 226276612Sdes 227292206Sdes # the log file, "" means log to stderr. 228276612Sdes # Use of this option sets use-syslog to "no". 229276612Sdes # logfile: "" 230276612Sdes 231292206Sdes # Log to syslog(3) if yes. The log facility LOG_DAEMON is used to 232276612Sdes # log to, with identity "unbound". If yes, it overrides the logfile. 233292206Sdes # use-syslog: yes 234276612Sdes 235276612Sdes # print UTC timestamp in ascii to logfile, default is epoch in seconds. 236276612Sdes # log-time-ascii: no 237292206Sdes 238276612Sdes # print one line with time, IP, name, type, class for every query. 239276612Sdes # log-queries: no 240276612Sdes 241276612Sdes # the pid file. Can be an absolute path outside of chroot/work dir. 242276612Sdes # pidfile: "/var/unbound/unbound.pid" 243276612Sdes 244276612Sdes # file to read root hints from. 245292206Sdes # get one from https://www.internic.net/domain/named.cache 246276612Sdes # root-hints: "" 247276612Sdes 248276612Sdes # enable to not answer id.server and hostname.bind queries. 249276612Sdes # hide-identity: no 250276612Sdes 251276612Sdes # enable to not answer version.server and version.bind queries. 252276612Sdes # hide-version: no 253276612Sdes 254276612Sdes # the identity to report. Leave "" or default to return hostname. 255276612Sdes # identity: "" 256276612Sdes 257276612Sdes # the version to report. Leave "" or default to return package version. 258276612Sdes # version: "" 259276612Sdes 260276612Sdes # the target fetch policy. 261292206Sdes # series of integers describing the policy per dependency depth. 262292206Sdes # The number of values in the list determines the maximum dependency 263276612Sdes # depth the recursor will pursue before giving up. Each integer means: 264276612Sdes # -1 : fetch all targets opportunistically, 265276612Sdes # 0: fetch on demand, 266276612Sdes # positive value: fetch that many targets opportunistically. 267276612Sdes # Enclose the list of numbers between quotes (""). 268276612Sdes # target-fetch-policy: "3 2 1 0 0" 269276612Sdes 270292206Sdes # Harden against very small EDNS buffer sizes. 271276612Sdes # harden-short-bufsize: no 272276612Sdes 273276612Sdes # Harden against unseemly large queries. 274276612Sdes # harden-large-queries: no 275276612Sdes 276292206Sdes # Harden against out of zone rrsets, to avoid spoofing attempts. 277276612Sdes # harden-glue: yes 278276612Sdes 279276612Sdes # Harden against receiving dnssec-stripped data. If you turn it 280292206Sdes # off, failing to validate dnskey data for a trustanchor will 281276612Sdes # trigger insecure mode for that zone (like without a trustanchor). 282276612Sdes # Default on, which insists on dnssec data for trust-anchored zones. 283276612Sdes # harden-dnssec-stripped: yes 284276612Sdes 285276612Sdes # Harden against queries that fall under dnssec-signed nxdomain names. 286276612Sdes # harden-below-nxdomain: no 287276612Sdes 288276612Sdes # Harden the referral path by performing additional queries for 289276612Sdes # infrastructure data. Validates the replies (if possible). 290292206Sdes # Default off, because the lookups burden the server. Experimental 291276612Sdes # implementation of draft-wijngaards-dnsext-resolver-side-mitigation. 292276612Sdes # harden-referral-path: no 293276612Sdes 294287917Sdes # Harden against algorithm downgrade when multiple algorithms are 295287917Sdes # advertised in the DS record. If no, allows the weakest algorithm 296287917Sdes # to validate the zone. 297289063Sdes # harden-algo-downgrade: no 298287917Sdes 299292206Sdes # Sent minimum amount of information to upstream servers to enhance 300292206Sdes # privacy. Only sent minimum required labels of the QNAME and set QTYPE 301292206Sdes # to NS when possible. 302292206Sdes # qname-minimisation: no 303292206Sdes 304276612Sdes # Use 0x20-encoded random bits in the query to foil spoof attempts. 305276612Sdes # This feature is an experimental implementation of draft dns-0x20. 306276612Sdes # use-caps-for-id: no 307292206Sdes 308287917Sdes # Domains (and domains in them) without support for dns-0x20 and 309287917Sdes # the fallback fails because they keep sending different answers. 310287917Sdes # caps-whitelist: "licdn.com" 311276612Sdes 312292206Sdes # Enforce privacy of these addresses. Strips them away from answers. 313292206Sdes # It may cause DNSSEC validation to additionally mark it as bogus. 314292206Sdes # Protects against 'DNS Rebinding' (uses browser as network proxy). 315292206Sdes # Only 'private-domain' and 'local-data' names are allowed to have 316276612Sdes # these private addresses. No default. 317276612Sdes # private-address: 10.0.0.0/8 318276612Sdes # private-address: 172.16.0.0/12 319276612Sdes # private-address: 192.168.0.0/16 320276612Sdes # private-address: 169.254.0.0/16 321276612Sdes # private-address: fd00::/8 322276612Sdes # private-address: fe80::/10 323292206Sdes # private-address: ::ffff:0:0/96 324276612Sdes 325276612Sdes # Allow the domain (and its subdomains) to contain private addresses. 326276612Sdes # local-data statements are allowed to contain private addresses too. 327276612Sdes # private-domain: "example.com" 328276612Sdes 329276612Sdes # If nonzero, unwanted replies are not only reported in statistics, 330276612Sdes # but also a running total is kept per thread. If it reaches the 331276612Sdes # threshold, a warning is printed and a defensive action is taken, 332276612Sdes # the cache is cleared to flush potential poison out of it. 333276612Sdes # A suggested value is 10000000, the default is 0 (turned off). 334276612Sdes # unwanted-reply-threshold: 0 335276612Sdes 336276612Sdes # Do not query the following addresses. No DNS queries are sent there. 337276612Sdes # List one address per entry. List classless netblocks with /size, 338276612Sdes # do-not-query-address: 127.0.0.1/8 339276612Sdes # do-not-query-address: ::1 340276612Sdes 341276612Sdes # if yes, the above default do-not-query-address entries are present. 342276612Sdes # if no, localhost can be queried (for testing and debugging). 343276612Sdes # do-not-query-localhost: yes 344276612Sdes 345276612Sdes # if yes, perform prefetching of almost expired message cache entries. 346276612Sdes # prefetch: no 347276612Sdes 348276612Sdes # if yes, perform key lookups adjacent to normal lookups. 349276612Sdes # prefetch-key: no 350276612Sdes 351276612Sdes # if yes, Unbound rotates RRSet order in response. 352276612Sdes # rrset-roundrobin: no 353276612Sdes 354276612Sdes # if yes, Unbound doesn't insert authority/additional sections 355276612Sdes # into response messages when those sections are not required. 356276612Sdes # minimal-responses: no 357276612Sdes 358276612Sdes # module configuration of the server. A string with identifiers 359276612Sdes # separated by spaces. Syntax: "[dns64] [validator] iterator" 360276612Sdes # module-config: "validator iterator" 361276612Sdes 362276612Sdes # File with trusted keys, kept uptodate using RFC5011 probes, 363276612Sdes # initial file like trust-anchor-file, then it stores metadata. 364276612Sdes # Use several entries, one per domain name, to track multiple zones. 365276612Sdes # 366276612Sdes # If you want to perform DNSSEC validation, run unbound-anchor before 367276612Sdes # you start unbound (i.e. in the system boot scripts). And enable: 368276612Sdes # Please note usage of unbound-anchor root anchor is at your own risk 369276612Sdes # and under the terms of our LICENSE (see that file in the source). 370276612Sdes # auto-trust-anchor-file: "/var/unbound/root.key" 371276612Sdes 372276612Sdes # File with DLV trusted keys. Same format as trust-anchor-file. 373276612Sdes # There can be only one DLV configured, it is trusted from root down. 374287917Sdes # DLV is going to be decommissioned. Please do not use it any more. 375276612Sdes # dlv-anchor-file: "dlv.isc.org.key" 376276612Sdes 377276612Sdes # File with trusted keys for validation. Specify more than one file 378276612Sdes # with several entries, one file per entry. 379276612Sdes # Zone file format, with DS and DNSKEY entries. 380276612Sdes # Note this gets out of date, use auto-trust-anchor-file please. 381276612Sdes # trust-anchor-file: "" 382292206Sdes 383276612Sdes # Trusted key for validation. DS or DNSKEY. specify the RR on a 384276612Sdes # single line, surrounded by "". TTL is ignored. class is IN default. 385276612Sdes # Note this gets out of date, use auto-trust-anchor-file please. 386276612Sdes # (These examples are from August 2007 and may not be valid anymore). 387276612Sdes # trust-anchor: "nlnetlabs.nl. DNSKEY 257 3 5 AQPzzTWMz8qSWIQlfRnPckx2BiVmkVN6LPupO3mbz7FhLSnm26n6iG9N Lby97Ji453aWZY3M5/xJBSOS2vWtco2t8C0+xeO1bc/d6ZTy32DHchpW 6rDH1vp86Ll+ha0tmwyy9QP7y2bVw5zSbFCrefk8qCUBgfHm9bHzMG1U BYtEIQ==" 388276612Sdes # trust-anchor: "jelte.nlnetlabs.nl. DS 42860 5 1 14D739EB566D2B1A5E216A0BA4D17FA9B038BE4A" 389276612Sdes 390276612Sdes # File with trusted keys for validation. Specify more than one file 391276612Sdes # with several entries, one file per entry. Like trust-anchor-file 392292206Sdes # but has a different file format. Format is BIND-9 style format, 393276612Sdes # the trusted-keys { name flag proto algo "key"; }; clauses are read. 394276612Sdes # you need external update procedures to track changes in keys. 395276612Sdes # trusted-keys-file: "" 396276612Sdes 397276612Sdes # Ignore chain of trust. Domain is treated as insecure. 398276612Sdes # domain-insecure: "example.com" 399276612Sdes 400276612Sdes # Override the date for validation with a specific fixed date. 401276612Sdes # Do not set this unless you are debugging signature inception 402276612Sdes # and expiration. "" or "0" turns the feature off. -1 ignores date. 403276612Sdes # val-override-date: "" 404276612Sdes 405276612Sdes # The time to live for bogus data, rrsets and messages. This avoids 406276612Sdes # some of the revalidation, until the time interval expires. in secs. 407276612Sdes # val-bogus-ttl: 60 408276612Sdes 409276612Sdes # The signature inception and expiration dates are allowed to be off 410276612Sdes # by 10% of the signature lifetime (expir-incep) from our local clock. 411276612Sdes # This leeway is capped with a minimum and a maximum. In seconds. 412276612Sdes # val-sig-skew-min: 3600 413276612Sdes # val-sig-skew-max: 86400 414276612Sdes 415276612Sdes # Should additional section of secure message also be kept clean of 416276612Sdes # unsecure data. Useful to shield the users of this validator from 417292206Sdes # potential bogus data in the additional section. All unsigned data 418276612Sdes # in the additional section is removed from secure messages. 419276612Sdes # val-clean-additional: yes 420276612Sdes 421276612Sdes # Turn permissive mode on to permit bogus messages. Thus, messages 422276612Sdes # for which security checks failed will be returned to clients, 423276612Sdes # instead of SERVFAIL. It still performs the security checks, which 424276612Sdes # result in interesting log files and possibly the AD bit in 425276612Sdes # replies if the message is found secure. The default is off. 426276612Sdes # val-permissive-mode: no 427276612Sdes 428276612Sdes # Ignore the CD flag in incoming queries and refuse them bogus data. 429276612Sdes # Enable it if the only clients of unbound are legacy servers (w2008) 430276612Sdes # that set CD but cannot validate themselves. 431276612Sdes # ignore-cd-flag: no 432276612Sdes 433276612Sdes # Have the validator log failed validations for your diagnosis. 434276612Sdes # 0: off. 1: A line per failed user query. 2: With reason and bad IP. 435276612Sdes # val-log-level: 0 436276612Sdes 437276612Sdes # It is possible to configure NSEC3 maximum iteration counts per 438276612Sdes # keysize. Keep this table very short, as linear search is done. 439276612Sdes # A message with an NSEC3 with larger count is marked insecure. 440276612Sdes # List in ascending order the keysize and count values. 441276612Sdes # val-nsec3-keysize-iterations: "1024 150 2048 500 4096 2500" 442292206Sdes 443276612Sdes # instruct the auto-trust-anchor-file probing to add anchors after ttl. 444276612Sdes # add-holddown: 2592000 # 30 days 445276612Sdes 446276612Sdes # instruct the auto-trust-anchor-file probing to del anchors after ttl. 447276612Sdes # del-holddown: 2592000 # 30 days 448276612Sdes 449276612Sdes # auto-trust-anchor-file probing removes missing anchors after ttl. 450276612Sdes # If the value 0 is given, missing anchors are not removed. 451276612Sdes # keep-missing: 31622400 # 366 days 452276612Sdes 453289063Sdes # debug option that allows very small holddown times for key rollover 454289063Sdes # permit-small-holddown: no 455289063Sdes 456276612Sdes # the amount of memory to use for the key cache. 457292206Sdes # plain value in bytes or you can append k, m or G. default is "4Mb". 458276612Sdes # key-cache-size: 4m 459276612Sdes 460276612Sdes # the number of slabs to use for the key cache. 461276612Sdes # the number of slabs must be a power of 2. 462276612Sdes # more slabs reduce lock contention, but fragment memory usage. 463276612Sdes # key-cache-slabs: 4 464276612Sdes 465276612Sdes # the amount of memory to use for the negative cache (used for DLV). 466292206Sdes # plain value in bytes or you can append k, m or G. default is "1Mb". 467276612Sdes # neg-cache-size: 1m 468282089Sdes 469276612Sdes # By default, for a number of zones a small default 'nothing here' 470276612Sdes # reply is built-in. Query traffic is thus blocked. If you 471276612Sdes # wish to serve such zone you can unblock them by uncommenting one 472276612Sdes # of the nodefault statements below. 473276612Sdes # You may also have to use domain-insecure: zone to make DNSSEC work, 474276612Sdes # unless you have your own trust anchors for this zone. 475276612Sdes # local-zone: "localhost." nodefault 476276612Sdes # local-zone: "127.in-addr.arpa." nodefault 477276612Sdes # 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 478276612Sdes # local-zone: "10.in-addr.arpa." nodefault 479276612Sdes # local-zone: "16.172.in-addr.arpa." nodefault 480276612Sdes # local-zone: "17.172.in-addr.arpa." nodefault 481276612Sdes # local-zone: "18.172.in-addr.arpa." nodefault 482276612Sdes # local-zone: "19.172.in-addr.arpa." nodefault 483276612Sdes # local-zone: "20.172.in-addr.arpa." nodefault 484276612Sdes # local-zone: "21.172.in-addr.arpa." nodefault 485276612Sdes # local-zone: "22.172.in-addr.arpa." nodefault 486276612Sdes # local-zone: "23.172.in-addr.arpa." nodefault 487276612Sdes # local-zone: "24.172.in-addr.arpa." nodefault 488276612Sdes # local-zone: "25.172.in-addr.arpa." nodefault 489276612Sdes # local-zone: "26.172.in-addr.arpa." nodefault 490276612Sdes # local-zone: "27.172.in-addr.arpa." nodefault 491276612Sdes # local-zone: "28.172.in-addr.arpa." nodefault 492276612Sdes # local-zone: "29.172.in-addr.arpa." nodefault 493276612Sdes # local-zone: "30.172.in-addr.arpa." nodefault 494276612Sdes # local-zone: "31.172.in-addr.arpa." nodefault 495276612Sdes # local-zone: "168.192.in-addr.arpa." nodefault 496276612Sdes # local-zone: "0.in-addr.arpa." nodefault 497276612Sdes # local-zone: "254.169.in-addr.arpa." nodefault 498276612Sdes # local-zone: "2.0.192.in-addr.arpa." nodefault 499276612Sdes # local-zone: "100.51.198.in-addr.arpa." nodefault 500276612Sdes # local-zone: "113.0.203.in-addr.arpa." nodefault 501276612Sdes # local-zone: "255.255.255.255.in-addr.arpa." nodefault 502276612Sdes # 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 503276612Sdes # local-zone: "d.f.ip6.arpa." nodefault 504276612Sdes # local-zone: "8.e.f.ip6.arpa." nodefault 505276612Sdes # local-zone: "9.e.f.ip6.arpa." nodefault 506276612Sdes # local-zone: "a.e.f.ip6.arpa." nodefault 507276612Sdes # local-zone: "b.e.f.ip6.arpa." nodefault 508276612Sdes # local-zone: "8.b.d.0.1.0.0.2.ip6.arpa." nodefault 509276612Sdes # And for 64.100.in-addr.arpa. to 127.100.in-addr.arpa. 510292206Sdes 511295535Sdes # If unbound is running service for the local host then it is useful 512276612Sdes # to perform lan-wide lookups to the upstream, and unblock the 513276612Sdes # long list of local-zones above. If this unbound is a dns server 514276612Sdes # for a network of computers, disabled is better and stops information 515276612Sdes # leakage of local lan information. 516276612Sdes # unblock-lan-zones: no 517276612Sdes 518295535Sdes # The insecure-lan-zones option disables validation for 519295535Sdes # these zones, as if they were all listed as domain-insecure. 520295535Sdes # insecure-lan-zones: no 521295535Sdes 522276612Sdes # a number of locally served zones can be configured. 523276612Sdes # local-zone: <zone> <type> 524276612Sdes # local-data: "<resource record string>" 525292206Sdes # o deny serves local data (if any), else, drops queries. 526276612Sdes # o refuse serves local data (if any), else, replies with error. 527276612Sdes # o static serves local data, else, nxdomain or nodata answer. 528276612Sdes # o transparent gives local data, but resolves normally for other names 529276612Sdes # o redirect serves the zone data for any subdomain in the zone. 530276612Sdes # o nodefault can be used to normally resolve AS112 zones. 531276612Sdes # o typetransparent resolves normally for other types and other names 532282089Sdes # o inform resolves normally, but logs client IP address 533287917Sdes # o inform_deny drops queries and logs client IP address 534276612Sdes # 535276612Sdes # defaults are localhost address, reverse for 127.0.0.1 and ::1 536276612Sdes # and nxdomain for AS112 zones. If you configure one of these zones 537276612Sdes # the default content is omitted, or you can omit it with 'nodefault'. 538292206Sdes # 539276612Sdes # If you configure local-data without specifying local-zone, by 540276612Sdes # default a transparent local-zone is created for the data. 541276612Sdes # 542276612Sdes # You can add locally served data with 543276612Sdes # local-zone: "local." static 544276612Sdes # local-data: "mycomputer.local. IN A 192.0.2.51" 545276612Sdes # local-data: 'mytext.local TXT "content of text record"' 546276612Sdes # 547276612Sdes # You can override certain queries with 548276612Sdes # local-data: "adserver.example.com A 127.0.0.1" 549276612Sdes # 550276612Sdes # You can redirect a domain to a fixed address with 551276612Sdes # (this makes example.com, www.example.com, etc, all go to 192.0.2.3) 552276612Sdes # local-zone: "example.com" redirect 553276612Sdes # local-data: "example.com A 192.0.2.3" 554276612Sdes # 555276612Sdes # Shorthand to make PTR records, "IPv4 name" or "IPv6 name". 556276612Sdes # You can also add PTR records using local-data directly, but then 557276612Sdes # you need to do the reverse notation yourself. 558276612Sdes # local-data-ptr: "192.0.2.3 www.example.com" 559276612Sdes 560276612Sdes # service clients over SSL (on the TCP sockets), with plain DNS inside 561276612Sdes # the SSL stream. Give the certificate to use and private key. 562276612Sdes # default is "" (disabled). requires restart to take effect. 563276612Sdes # ssl-service-key: "path/to/privatekeyfile.key" 564276612Sdes # ssl-service-pem: "path/to/publiccertfile.pem" 565292206Sdes # ssl-port: 853 566276612Sdes 567276612Sdes # request upstream over SSL (with plain DNS inside the SSL stream). 568276612Sdes # Default is no. Can be turned on and off with unbound-control. 569276612Sdes # ssl-upstream: no 570276612Sdes 571276612Sdes # DNS64 prefix. Must be specified when DNS64 is use. 572276612Sdes # Enable dns64 in module-config. Used to synthesize IPv6 from IPv4. 573276612Sdes # dns64-prefix: 64:ff9b::0/96 574276612Sdes 575287917Sdes # ratelimit for uncached, new queries, this limits recursion effort. 576287917Sdes # ratelimiting is experimental, and may help against randomqueryflood. 577287917Sdes # if 0(default) it is disabled, otherwise state qps allowed per zone. 578287917Sdes # ratelimit: 0 579287917Sdes 580287917Sdes # ratelimits are tracked in a cache, size in bytes of cache (or k,m). 581287917Sdes # ratelimit-size: 4m 582287917Sdes # ratelimit cache slabs, reduces lock contention if equal to cpucount. 583287917Sdes # ratelimit-slabs: 4 584292206Sdes 585287917Sdes # 0 blocks when ratelimited, otherwise let 1/xth traffic through 586287917Sdes # ratelimit-factor: 10 587287917Sdes 588287917Sdes # override the ratelimit for a specific domain name. 589287917Sdes # give this setting multiple times to have multiple overrides. 590287917Sdes # ratelimit-for-domain: example.com 1000 591287917Sdes # override the ratelimits for all domains below a domain name 592287917Sdes # can give this multiple times, the name closest to the zone is used. 593287917Sdes # ratelimit-below-domain: example 1000 594287917Sdes 595276612Sdes# Python config section. To enable: 596276612Sdes# o use --with-pythonmodule to configure before compiling. 597276612Sdes# o list python in the module-config string (above) to enable. 598276612Sdes# o and give a python-script to run. 599276612Sdespython: 600276612Sdes # Script file to load 601276612Sdes # python-script: "/var/unbound/ubmodule-tst.py" 602276612Sdes 603292206Sdes# Remote control config section. 604276612Sdesremote-control: 605276612Sdes # Enable remote control with unbound-control(8) here. 606276612Sdes # set up the keys and certificates with unbound-control-setup. 607276612Sdes # control-enable: no 608276612Sdes 609282089Sdes # Set to no and use an absolute path as control-interface to use 610282089Sdes # a unix local named pipe for unbound-control. 611282089Sdes # control-use-cert: yes 612282089Sdes 613276612Sdes # what interfaces are listened to for remote control. 614276612Sdes # give 0.0.0.0 and ::0 to listen to all interfaces. 615276612Sdes # control-interface: 127.0.0.1 616276612Sdes # control-interface: ::1 617276612Sdes 618276612Sdes # port number for remote control operations. 619276612Sdes # control-port: 8953 620276612Sdes 621276612Sdes # unbound server key file. 622276612Sdes # server-key-file: "/var/unbound/unbound_server.key" 623276612Sdes 624276612Sdes # unbound server certificate file. 625276612Sdes # server-cert-file: "/var/unbound/unbound_server.pem" 626276612Sdes 627276612Sdes # unbound-control key file. 628276612Sdes # control-key-file: "/var/unbound/unbound_control.key" 629276612Sdes 630276612Sdes # unbound-control certificate file. 631276612Sdes # control-cert-file: "/var/unbound/unbound_control.pem" 632276612Sdes 633276612Sdes# Stub zones. 634292206Sdes# Create entries like below, to make all queries for 'example.com' and 635292206Sdes# 'example.org' go to the given list of nameservers. list zero or more 636292206Sdes# nameservers by hostname or by ipaddress. If you set stub-prime to yes, 637276612Sdes# the list is treated as priming hints (default is no). 638276612Sdes# With stub-first yes, it attempts without the stub if it fails. 639289063Sdes# Consider adding domain-insecure: name and local-zone: name nodefault 640289063Sdes# to the server: section if the stub is a locally served zone. 641276612Sdes# stub-zone: 642276612Sdes# name: "example.com" 643276612Sdes# stub-addr: 192.0.2.68 644276612Sdes# stub-prime: no 645276612Sdes# stub-first: no 646276612Sdes# stub-zone: 647276612Sdes# name: "example.org" 648276612Sdes# stub-host: ns.example.com. 649276612Sdes 650276612Sdes# Forward zones 651276612Sdes# Create entries like below, to make all queries for 'example.com' and 652276612Sdes# 'example.org' go to the given list of servers. These servers have to handle 653276612Sdes# recursion to other nameservers. List zero or more nameservers by hostname 654276612Sdes# or by ipaddress. Use an entry with name "." to forward all queries. 655276612Sdes# If you enable forward-first, it attempts without the forward if it fails. 656276612Sdes# forward-zone: 657276612Sdes# name: "example.com" 658276612Sdes# forward-addr: 192.0.2.68 659276612Sdes# forward-addr: 192.0.2.73@5355 # forward to port 5355. 660276612Sdes# forward-first: no 661276612Sdes# forward-zone: 662276612Sdes# name: "example.org" 663276612Sdes# forward-host: fwd.example.com 664