example.conf.in revision 289063
1238106Sdes# 2238106Sdes# Example configuration file. 3238106Sdes# 4289063Sdes# See unbound.conf(5) man page, version 1.5.5. 5238106Sdes# 6238106Sdes# this is a comment. 7238106Sdes 8238106Sdes#Use this to include other text into the file. 9238106Sdes#include: "otherfile.conf" 10238106Sdes 11238106Sdes# 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. 43238106Sdes # 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 87266114Sdes 88276605Sdes # use SO_REUSEPORT to distribute queries over threads. 89266114Sdes # so-reuseport: no 90287917Sdes 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 94238106Sdes 95238106Sdes # EDNS reassembly buffer to advertise to UDP peers (the actual buffer 96238106Sdes # is set with msg-buffer-size). 1480 can solve fragmentation (timeouts). 97238106Sdes # edns-buffer-size: 4096 98238106Sdes 99266114Sdes # Maximum UDP response size (not applied to TCP response). 100266114Sdes # Suggested values are 512 to 4096. Default is 4096. 65536 disables it. 101266114Sdes # max-udp-size: 4096 102266114Sdes 103238106Sdes # buffer size for handling DNS data. No messages larger than this 104238106Sdes # size can be sent or received, by UDP or TCP. In bytes. 105238106Sdes # msg-buffer-size: 65552 106238106Sdes 107238106Sdes # the amount of memory to use for the message cache. 108238106Sdes # plain value in bytes or you can append k, m or G. default is "4Mb". 109238106Sdes # msg-cache-size: 4m 110238106Sdes 111238106Sdes # the number of slabs to use for the message cache. 112238106Sdes # the number of slabs must be a power of 2. 113238106Sdes # more slabs reduce lock contention, but fragment memory usage. 114238106Sdes # msg-cache-slabs: 4 115238106Sdes 116238106Sdes # the number of queries that a thread gets to service. 117238106Sdes # num-queries-per-thread: 1024 118238106Sdes 119238106Sdes # if very busy, 50% queries run to completion, 50% get timeout in msec 120238106Sdes # jostle-timeout: 200 121266114Sdes 122266114Sdes # msec to wait before close of port on timeout UDP. 0 disables. 123266114Sdes # delay-close: 0 124238106Sdes 125238106Sdes # the amount of memory to use for the RRset cache. 126238106Sdes # plain value in bytes or you can append k, m or G. default is "4Mb". 127238106Sdes # rrset-cache-size: 4m 128238106Sdes 129238106Sdes # the number of slabs to use for the RRset cache. 130238106Sdes # the number of slabs must be a power of 2. 131238106Sdes # more slabs reduce lock contention, but fragment memory usage. 132238106Sdes # rrset-cache-slabs: 4 133238106Sdes 134238106Sdes # the time to live (TTL) value lower bound, in seconds. Default 0. 135238106Sdes # If more than an hour could easily give trouble due to stale data. 136238106Sdes # cache-min-ttl: 0 137238106Sdes 138238106Sdes # the time to live (TTL) value cap for RRsets and messages in the 139238106Sdes # cache. Items are not cached for longer. In seconds. 140238106Sdes # cache-max-ttl: 86400 141238106Sdes 142287917Sdes # the time to live (TTL) value cap for negative responses in the cache 143287917Sdes # cache-max-negative-ttl: 3600 144287917Sdes 145238106Sdes # the time to live (TTL) value for cached roundtrip times, lameness and 146238106Sdes # EDNS version information for hosts. In seconds. 147238106Sdes # infra-host-ttl: 900 148282089Sdes 149282089Sdes # minimum wait time for responses, increase if uplink is long. In msec. 150282089Sdes # infra-cache-min-rtt: 50 151238106Sdes 152238106Sdes # the number of slabs to use for the Infrastructure cache. 153238106Sdes # the number of slabs must be a power of 2. 154238106Sdes # more slabs reduce lock contention, but fragment memory usage. 155238106Sdes # infra-cache-slabs: 4 156238106Sdes 157238106Sdes # the maximum number of hosts that are cached (roundtrip, EDNS, lame). 158238106Sdes # infra-cache-numhosts: 10000 159238106Sdes 160238106Sdes # Enable IPv4, "yes" or "no". 161238106Sdes # do-ip4: yes 162238106Sdes 163238106Sdes # Enable IPv6, "yes" or "no". 164238106Sdes # do-ip6: yes 165238106Sdes 166238106Sdes # Enable UDP, "yes" or "no". 167238106Sdes # do-udp: yes 168238106Sdes 169238106Sdes # Enable TCP, "yes" or "no". 170238106Sdes # do-tcp: yes 171238106Sdes 172238106Sdes # upstream connections use TCP only (and no UDP), "yes" or "no" 173238106Sdes # useful for tunneling scenarios, default no. 174238106Sdes # tcp-upstream: no 175238106Sdes 176238106Sdes # Detach from the terminal, run in background, "yes" or "no". 177238106Sdes # do-daemonize: yes 178238106Sdes 179238106Sdes # control which clients are allowed to make (recursive) queries 180238106Sdes # to this server. Specify classless netblocks with /size and action. 181238106Sdes # By default everything is refused, except for localhost. 182238106Sdes # Choose deny (drop message), refuse (polite error reply), 183238106Sdes # allow (recursive ok), allow_snoop (recursive and nonrecursive ok) 184266114Sdes # deny_non_local (drop queries unless can be answered from local-data) 185266114Sdes # refuse_non_local (like deny_non_local but polite error reply). 186238106Sdes # access-control: 0.0.0.0/0 refuse 187238106Sdes # access-control: 127.0.0.0/8 allow 188238106Sdes # access-control: ::0/0 refuse 189238106Sdes # access-control: ::1 allow 190238106Sdes # access-control: ::ffff:127.0.0.1 allow 191238106Sdes 192238106Sdes # if given, a chroot(2) is done to the given directory. 193238106Sdes # i.e. you can chroot to the working directory, for example, 194238106Sdes # for extra security, but make sure all files are in that directory. 195238106Sdes # 196238106Sdes # If chroot is enabled, you should pass the configfile (from the 197238106Sdes # commandline) as a full path from the original root. After the 198238106Sdes # chroot has been performed the now defunct portion of the config 199238106Sdes # file path is removed to be able to reread the config after a reload. 200238106Sdes # 201238106Sdes # All other file paths (working dir, logfile, roothints, and 202238106Sdes # key files) can be specified in several ways: 203238106Sdes # o as an absolute path relative to the new root. 204238106Sdes # o as a relative path to the working directory. 205238106Sdes # o as an absolute path relative to the original root. 206238106Sdes # In the last case the path is adjusted to remove the unused portion. 207238106Sdes # 208238106Sdes # The pid file can be absolute and outside of the chroot, it is 209238106Sdes # written just prior to performing the chroot and dropping permissions. 210238106Sdes # 211238106Sdes # Additionally, unbound may need to access /dev/random (for entropy). 212238106Sdes # How to do this is specific to your OS. 213238106Sdes # 214238106Sdes # If you give "" no chroot is performed. The path must not end in a /. 215238106Sdes # chroot: "@UNBOUND_CHROOT_DIR@" 216238106Sdes 217238106Sdes # if given, user privileges are dropped (after binding port), 218238106Sdes # and the given username is assumed. Default is user "unbound". 219238106Sdes # If you give "" no privileges are dropped. 220238106Sdes # username: "@UNBOUND_USERNAME@" 221238106Sdes 222238106Sdes # the working directory. The relative files in this config are 223238106Sdes # relative to this directory. If you give "" the working directory 224238106Sdes # is not changed. 225238106Sdes # directory: "@UNBOUND_RUN_DIR@" 226238106Sdes 227238106Sdes # the log file, "" means log to stderr. 228238106Sdes # Use of this option sets use-syslog to "no". 229238106Sdes # logfile: "" 230238106Sdes 231238106Sdes # Log to syslog(3) if yes. The log facility LOG_DAEMON is used to 232238106Sdes # log to, with identity "unbound". If yes, it overrides the logfile. 233238106Sdes # use-syslog: yes 234238106Sdes 235238106Sdes # print UTC timestamp in ascii to logfile, default is epoch in seconds. 236238106Sdes # log-time-ascii: no 237238106Sdes 238238106Sdes # print one line with time, IP, name, type, class for every query. 239238106Sdes # log-queries: no 240238106Sdes 241238106Sdes # the pid file. Can be an absolute path outside of chroot/work dir. 242238106Sdes # pidfile: "@UNBOUND_PIDFILE@" 243238106Sdes 244238106Sdes # file to read root hints from. 245238106Sdes # get one from ftp://FTP.INTERNIC.NET/domain/named.cache 246238106Sdes # root-hints: "" 247238106Sdes 248238106Sdes # enable to not answer id.server and hostname.bind queries. 249238106Sdes # hide-identity: no 250238106Sdes 251238106Sdes # enable to not answer version.server and version.bind queries. 252238106Sdes # hide-version: no 253238106Sdes 254238106Sdes # the identity to report. Leave "" or default to return hostname. 255238106Sdes # identity: "" 256238106Sdes 257238106Sdes # the version to report. Leave "" or default to return package version. 258238106Sdes # version: "" 259238106Sdes 260238106Sdes # the target fetch policy. 261238106Sdes # series of integers describing the policy per dependency depth. 262238106Sdes # The number of values in the list determines the maximum dependency 263238106Sdes # depth the recursor will pursue before giving up. Each integer means: 264238106Sdes # -1 : fetch all targets opportunistically, 265238106Sdes # 0: fetch on demand, 266238106Sdes # positive value: fetch that many targets opportunistically. 267238106Sdes # Enclose the list of numbers between quotes (""). 268238106Sdes # target-fetch-policy: "3 2 1 0 0" 269238106Sdes 270238106Sdes # Harden against very small EDNS buffer sizes. 271238106Sdes # harden-short-bufsize: no 272238106Sdes 273238106Sdes # Harden against unseemly large queries. 274238106Sdes # harden-large-queries: no 275238106Sdes 276238106Sdes # Harden against out of zone rrsets, to avoid spoofing attempts. 277238106Sdes # harden-glue: yes 278238106Sdes 279238106Sdes # Harden against receiving dnssec-stripped data. If you turn it 280238106Sdes # off, failing to validate dnskey data for a trustanchor will 281238106Sdes # trigger insecure mode for that zone (like without a trustanchor). 282238106Sdes # Default on, which insists on dnssec data for trust-anchored zones. 283238106Sdes # harden-dnssec-stripped: yes 284238106Sdes 285238106Sdes # Harden against queries that fall under dnssec-signed nxdomain names. 286238106Sdes # harden-below-nxdomain: no 287238106Sdes 288238106Sdes # Harden the referral path by performing additional queries for 289238106Sdes # infrastructure data. Validates the replies (if possible). 290238106Sdes # Default off, because the lookups burden the server. Experimental 291238106Sdes # implementation of draft-wijngaards-dnsext-resolver-side-mitigation. 292238106Sdes # harden-referral-path: no 293238106Sdes 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 299238106Sdes # Use 0x20-encoded random bits in the query to foil spoof attempts. 300238106Sdes # This feature is an experimental implementation of draft dns-0x20. 301238106Sdes # use-caps-for-id: no 302287917Sdes 303287917Sdes # Domains (and domains in them) without support for dns-0x20 and 304287917Sdes # the fallback fails because they keep sending different answers. 305287917Sdes # caps-whitelist: "licdn.com" 306238106Sdes 307238106Sdes # Enforce privacy of these addresses. Strips them away from answers. 308238106Sdes # It may cause DNSSEC validation to additionally mark it as bogus. 309238106Sdes # Protects against 'DNS Rebinding' (uses browser as network proxy). 310238106Sdes # Only 'private-domain' and 'local-data' names are allowed to have 311238106Sdes # these private addresses. No default. 312238106Sdes # private-address: 10.0.0.0/8 313238106Sdes # private-address: 172.16.0.0/12 314238106Sdes # private-address: 192.168.0.0/16 315238106Sdes # private-address: 169.254.0.0/16 316238106Sdes # private-address: fd00::/8 317238106Sdes # private-address: fe80::/10 318238106Sdes 319238106Sdes # Allow the domain (and its subdomains) to contain private addresses. 320238106Sdes # local-data statements are allowed to contain private addresses too. 321238106Sdes # private-domain: "example.com" 322238106Sdes 323238106Sdes # If nonzero, unwanted replies are not only reported in statistics, 324238106Sdes # but also a running total is kept per thread. If it reaches the 325238106Sdes # threshold, a warning is printed and a defensive action is taken, 326238106Sdes # the cache is cleared to flush potential poison out of it. 327238106Sdes # A suggested value is 10000000, the default is 0 (turned off). 328238106Sdes # unwanted-reply-threshold: 0 329238106Sdes 330238106Sdes # Do not query the following addresses. No DNS queries are sent there. 331238106Sdes # List one address per entry. List classless netblocks with /size, 332238106Sdes # do-not-query-address: 127.0.0.1/8 333238106Sdes # do-not-query-address: ::1 334238106Sdes 335238106Sdes # if yes, the above default do-not-query-address entries are present. 336238106Sdes # if no, localhost can be queried (for testing and debugging). 337238106Sdes # do-not-query-localhost: yes 338238106Sdes 339238106Sdes # if yes, perform prefetching of almost expired message cache entries. 340238106Sdes # prefetch: no 341238106Sdes 342238106Sdes # if yes, perform key lookups adjacent to normal lookups. 343238106Sdes # prefetch-key: no 344238106Sdes 345238106Sdes # if yes, Unbound rotates RRSet order in response. 346238106Sdes # rrset-roundrobin: no 347238106Sdes 348238106Sdes # if yes, Unbound doesn't insert authority/additional sections 349238106Sdes # into response messages when those sections are not required. 350238106Sdes # minimal-responses: no 351238106Sdes 352238106Sdes # module configuration of the server. A string with identifiers 353276605Sdes # separated by spaces. Syntax: "[dns64] [validator] iterator" 354238106Sdes # module-config: "validator iterator" 355238106Sdes 356238106Sdes # File with trusted keys, kept uptodate using RFC5011 probes, 357238106Sdes # initial file like trust-anchor-file, then it stores metadata. 358238106Sdes # Use several entries, one per domain name, to track multiple zones. 359238106Sdes # 360238106Sdes # If you want to perform DNSSEC validation, run unbound-anchor before 361238106Sdes # you start unbound (i.e. in the system boot scripts). And enable: 362238106Sdes # Please note usage of unbound-anchor root anchor is at your own risk 363238106Sdes # and under the terms of our LICENSE (see that file in the source). 364238106Sdes # auto-trust-anchor-file: "@UNBOUND_ROOTKEY_FILE@" 365238106Sdes 366238106Sdes # File with DLV trusted keys. Same format as trust-anchor-file. 367238106Sdes # There can be only one DLV configured, it is trusted from root down. 368287917Sdes # DLV is going to be decommissioned. Please do not use it any more. 369238106Sdes # dlv-anchor-file: "dlv.isc.org.key" 370238106Sdes 371238106Sdes # File with trusted keys for validation. Specify more than one file 372238106Sdes # with several entries, one file per entry. 373238106Sdes # Zone file format, with DS and DNSKEY entries. 374238106Sdes # Note this gets out of date, use auto-trust-anchor-file please. 375238106Sdes # trust-anchor-file: "" 376238106Sdes 377238106Sdes # Trusted key for validation. DS or DNSKEY. specify the RR on a 378238106Sdes # single line, surrounded by "". TTL is ignored. class is IN default. 379238106Sdes # Note this gets out of date, use auto-trust-anchor-file please. 380238106Sdes # (These examples are from August 2007 and may not be valid anymore). 381238106Sdes # trust-anchor: "nlnetlabs.nl. DNSKEY 257 3 5 AQPzzTWMz8qSWIQlfRnPckx2BiVmkVN6LPupO3mbz7FhLSnm26n6iG9N Lby97Ji453aWZY3M5/xJBSOS2vWtco2t8C0+xeO1bc/d6ZTy32DHchpW 6rDH1vp86Ll+ha0tmwyy9QP7y2bVw5zSbFCrefk8qCUBgfHm9bHzMG1U BYtEIQ==" 382238106Sdes # trust-anchor: "jelte.nlnetlabs.nl. DS 42860 5 1 14D739EB566D2B1A5E216A0BA4D17FA9B038BE4A" 383238106Sdes 384238106Sdes # File with trusted keys for validation. Specify more than one file 385238106Sdes # with several entries, one file per entry. Like trust-anchor-file 386238106Sdes # but has a different file format. Format is BIND-9 style format, 387238106Sdes # the trusted-keys { name flag proto algo "key"; }; clauses are read. 388238106Sdes # you need external update procedures to track changes in keys. 389238106Sdes # trusted-keys-file: "" 390238106Sdes 391238106Sdes # Ignore chain of trust. Domain is treated as insecure. 392238106Sdes # domain-insecure: "example.com" 393238106Sdes 394238106Sdes # Override the date for validation with a specific fixed date. 395238106Sdes # Do not set this unless you are debugging signature inception 396238106Sdes # and expiration. "" or "0" turns the feature off. -1 ignores date. 397238106Sdes # val-override-date: "" 398238106Sdes 399238106Sdes # The time to live for bogus data, rrsets and messages. This avoids 400238106Sdes # some of the revalidation, until the time interval expires. in secs. 401238106Sdes # val-bogus-ttl: 60 402238106Sdes 403238106Sdes # The signature inception and expiration dates are allowed to be off 404238106Sdes # by 10% of the signature lifetime (expir-incep) from our local clock. 405238106Sdes # This leeway is capped with a minimum and a maximum. In seconds. 406238106Sdes # val-sig-skew-min: 3600 407238106Sdes # val-sig-skew-max: 86400 408238106Sdes 409238106Sdes # Should additional section of secure message also be kept clean of 410238106Sdes # unsecure data. Useful to shield the users of this validator from 411238106Sdes # potential bogus data in the additional section. All unsigned data 412238106Sdes # in the additional section is removed from secure messages. 413238106Sdes # val-clean-additional: yes 414238106Sdes 415238106Sdes # Turn permissive mode on to permit bogus messages. Thus, messages 416238106Sdes # for which security checks failed will be returned to clients, 417238106Sdes # instead of SERVFAIL. It still performs the security checks, which 418238106Sdes # result in interesting log files and possibly the AD bit in 419238106Sdes # replies if the message is found secure. The default is off. 420238106Sdes # val-permissive-mode: no 421238106Sdes 422238106Sdes # Ignore the CD flag in incoming queries and refuse them bogus data. 423238106Sdes # Enable it if the only clients of unbound are legacy servers (w2008) 424238106Sdes # that set CD but cannot validate themselves. 425238106Sdes # ignore-cd-flag: no 426238106Sdes 427238106Sdes # Have the validator log failed validations for your diagnosis. 428238106Sdes # 0: off. 1: A line per failed user query. 2: With reason and bad IP. 429238106Sdes # val-log-level: 0 430238106Sdes 431238106Sdes # It is possible to configure NSEC3 maximum iteration counts per 432238106Sdes # keysize. Keep this table very short, as linear search is done. 433238106Sdes # A message with an NSEC3 with larger count is marked insecure. 434238106Sdes # List in ascending order the keysize and count values. 435238106Sdes # val-nsec3-keysize-iterations: "1024 150 2048 500 4096 2500" 436238106Sdes 437238106Sdes # instruct the auto-trust-anchor-file probing to add anchors after ttl. 438238106Sdes # add-holddown: 2592000 # 30 days 439238106Sdes 440238106Sdes # instruct the auto-trust-anchor-file probing to del anchors after ttl. 441238106Sdes # del-holddown: 2592000 # 30 days 442238106Sdes 443238106Sdes # auto-trust-anchor-file probing removes missing anchors after ttl. 444238106Sdes # If the value 0 is given, missing anchors are not removed. 445238106Sdes # keep-missing: 31622400 # 366 days 446238106Sdes 447289063Sdes # debug option that allows very small holddown times for key rollover 448289063Sdes # permit-small-holddown: no 449289063Sdes 450238106Sdes # the amount of memory to use for the key cache. 451238106Sdes # plain value in bytes or you can append k, m or G. default is "4Mb". 452238106Sdes # key-cache-size: 4m 453238106Sdes 454238106Sdes # the number of slabs to use for the key cache. 455238106Sdes # the number of slabs must be a power of 2. 456238106Sdes # more slabs reduce lock contention, but fragment memory usage. 457238106Sdes # key-cache-slabs: 4 458238106Sdes 459238106Sdes # the amount of memory to use for the negative cache (used for DLV). 460238106Sdes # plain value in bytes or you can append k, m or G. default is "1Mb". 461238106Sdes # neg-cache-size: 1m 462282089Sdes 463266114Sdes # By default, for a number of zones a small default 'nothing here' 464266114Sdes # reply is built-in. Query traffic is thus blocked. If you 465266114Sdes # wish to serve such zone you can unblock them by uncommenting one 466266114Sdes # of the nodefault statements below. 467266114Sdes # You may also have to use domain-insecure: zone to make DNSSEC work, 468266114Sdes # unless you have your own trust anchors for this zone. 469266114Sdes # local-zone: "localhost." nodefault 470266114Sdes # local-zone: "127.in-addr.arpa." nodefault 471266114Sdes # 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 472266114Sdes # local-zone: "10.in-addr.arpa." nodefault 473266114Sdes # local-zone: "16.172.in-addr.arpa." nodefault 474266114Sdes # local-zone: "17.172.in-addr.arpa." nodefault 475266114Sdes # local-zone: "18.172.in-addr.arpa." nodefault 476266114Sdes # local-zone: "19.172.in-addr.arpa." nodefault 477266114Sdes # local-zone: "20.172.in-addr.arpa." nodefault 478266114Sdes # local-zone: "21.172.in-addr.arpa." nodefault 479266114Sdes # local-zone: "22.172.in-addr.arpa." nodefault 480266114Sdes # local-zone: "23.172.in-addr.arpa." nodefault 481266114Sdes # local-zone: "24.172.in-addr.arpa." nodefault 482266114Sdes # local-zone: "25.172.in-addr.arpa." nodefault 483266114Sdes # local-zone: "26.172.in-addr.arpa." nodefault 484266114Sdes # local-zone: "27.172.in-addr.arpa." nodefault 485266114Sdes # local-zone: "28.172.in-addr.arpa." nodefault 486266114Sdes # local-zone: "29.172.in-addr.arpa." nodefault 487266114Sdes # local-zone: "30.172.in-addr.arpa." nodefault 488266114Sdes # local-zone: "31.172.in-addr.arpa." nodefault 489266114Sdes # local-zone: "168.192.in-addr.arpa." nodefault 490266114Sdes # local-zone: "0.in-addr.arpa." nodefault 491266114Sdes # local-zone: "254.169.in-addr.arpa." nodefault 492266114Sdes # local-zone: "2.0.192.in-addr.arpa." nodefault 493266114Sdes # local-zone: "100.51.198.in-addr.arpa." nodefault 494266114Sdes # local-zone: "113.0.203.in-addr.arpa." nodefault 495266114Sdes # local-zone: "255.255.255.255.in-addr.arpa." nodefault 496266114Sdes # 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 497266114Sdes # local-zone: "d.f.ip6.arpa." nodefault 498266114Sdes # local-zone: "8.e.f.ip6.arpa." nodefault 499266114Sdes # local-zone: "9.e.f.ip6.arpa." nodefault 500266114Sdes # local-zone: "a.e.f.ip6.arpa." nodefault 501266114Sdes # local-zone: "b.e.f.ip6.arpa." nodefault 502266114Sdes # local-zone: "8.b.d.0.1.0.0.2.ip6.arpa." nodefault 503276605Sdes # And for 64.100.in-addr.arpa. to 127.100.in-addr.arpa. 504276605Sdes 505276605Sdes # if unbound is running service for the local host then it is useful 506276605Sdes # to perform lan-wide lookups to the upstream, and unblock the 507276605Sdes # long list of local-zones above. If this unbound is a dns server 508276605Sdes # for a network of computers, disabled is better and stops information 509276605Sdes # leakage of local lan information. 510276605Sdes # unblock-lan-zones: no 511266114Sdes 512238106Sdes # a number of locally served zones can be configured. 513238106Sdes # local-zone: <zone> <type> 514238106Sdes # local-data: "<resource record string>" 515238106Sdes # o deny serves local data (if any), else, drops queries. 516238106Sdes # o refuse serves local data (if any), else, replies with error. 517238106Sdes # o static serves local data, else, nxdomain or nodata answer. 518238106Sdes # o transparent gives local data, but resolves normally for other names 519238106Sdes # o redirect serves the zone data for any subdomain in the zone. 520238106Sdes # o nodefault can be used to normally resolve AS112 zones. 521238106Sdes # o typetransparent resolves normally for other types and other names 522282089Sdes # o inform resolves normally, but logs client IP address 523287917Sdes # o inform_deny drops queries and logs client IP address 524238106Sdes # 525238106Sdes # defaults are localhost address, reverse for 127.0.0.1 and ::1 526238106Sdes # and nxdomain for AS112 zones. If you configure one of these zones 527238106Sdes # the default content is omitted, or you can omit it with 'nodefault'. 528238106Sdes # 529238106Sdes # If you configure local-data without specifying local-zone, by 530238106Sdes # default a transparent local-zone is created for the data. 531238106Sdes # 532238106Sdes # You can add locally served data with 533238106Sdes # local-zone: "local." static 534238106Sdes # local-data: "mycomputer.local. IN A 192.0.2.51" 535238106Sdes # local-data: 'mytext.local TXT "content of text record"' 536238106Sdes # 537238106Sdes # You can override certain queries with 538238106Sdes # local-data: "adserver.example.com A 127.0.0.1" 539238106Sdes # 540238106Sdes # You can redirect a domain to a fixed address with 541238106Sdes # (this makes example.com, www.example.com, etc, all go to 192.0.2.3) 542238106Sdes # local-zone: "example.com" redirect 543238106Sdes # local-data: "example.com A 192.0.2.3" 544238106Sdes # 545238106Sdes # Shorthand to make PTR records, "IPv4 name" or "IPv6 name". 546238106Sdes # You can also add PTR records using local-data directly, but then 547238106Sdes # you need to do the reverse notation yourself. 548238106Sdes # local-data-ptr: "192.0.2.3 www.example.com" 549238106Sdes 550238106Sdes # service clients over SSL (on the TCP sockets), with plain DNS inside 551238106Sdes # the SSL stream. Give the certificate to use and private key. 552238106Sdes # default is "" (disabled). requires restart to take effect. 553238106Sdes # ssl-service-key: "path/to/privatekeyfile.key" 554238106Sdes # ssl-service-pem: "path/to/publiccertfile.pem" 555238106Sdes # ssl-port: 443 556238106Sdes 557238106Sdes # request upstream over SSL (with plain DNS inside the SSL stream). 558238106Sdes # Default is no. Can be turned on and off with unbound-control. 559238106Sdes # ssl-upstream: no 560238106Sdes 561276605Sdes # DNS64 prefix. Must be specified when DNS64 is use. 562276605Sdes # Enable dns64 in module-config. Used to synthesize IPv6 from IPv4. 563276605Sdes # dns64-prefix: 64:ff9b::0/96 564276605Sdes 565287917Sdes # ratelimit for uncached, new queries, this limits recursion effort. 566287917Sdes # ratelimiting is experimental, and may help against randomqueryflood. 567287917Sdes # if 0(default) it is disabled, otherwise state qps allowed per zone. 568287917Sdes # ratelimit: 0 569287917Sdes 570287917Sdes # ratelimits are tracked in a cache, size in bytes of cache (or k,m). 571287917Sdes # ratelimit-size: 4m 572287917Sdes # ratelimit cache slabs, reduces lock contention if equal to cpucount. 573287917Sdes # ratelimit-slabs: 4 574287917Sdes 575287917Sdes # 0 blocks when ratelimited, otherwise let 1/xth traffic through 576287917Sdes # ratelimit-factor: 10 577287917Sdes 578287917Sdes # override the ratelimit for a specific domain name. 579287917Sdes # give this setting multiple times to have multiple overrides. 580287917Sdes # ratelimit-for-domain: example.com 1000 581287917Sdes # override the ratelimits for all domains below a domain name 582287917Sdes # can give this multiple times, the name closest to the zone is used. 583287917Sdes # ratelimit-below-domain: example 1000 584287917Sdes 585238106Sdes# Python config section. To enable: 586238106Sdes# o use --with-pythonmodule to configure before compiling. 587238106Sdes# o list python in the module-config string (above) to enable. 588238106Sdes# o and give a python-script to run. 589238106Sdespython: 590238106Sdes # Script file to load 591238106Sdes # python-script: "@UNBOUND_SHARE_DIR@/ubmodule-tst.py" 592238106Sdes 593238106Sdes# Remote control config section. 594238106Sdesremote-control: 595238106Sdes # Enable remote control with unbound-control(8) here. 596238106Sdes # set up the keys and certificates with unbound-control-setup. 597238106Sdes # control-enable: no 598238106Sdes 599282089Sdes # Set to no and use an absolute path as control-interface to use 600282089Sdes # a unix local named pipe for unbound-control. 601282089Sdes # control-use-cert: yes 602282089Sdes 603238106Sdes # what interfaces are listened to for remote control. 604238106Sdes # give 0.0.0.0 and ::0 to listen to all interfaces. 605238106Sdes # control-interface: 127.0.0.1 606238106Sdes # control-interface: ::1 607238106Sdes 608238106Sdes # port number for remote control operations. 609238106Sdes # control-port: 8953 610238106Sdes 611238106Sdes # unbound server key file. 612238106Sdes # server-key-file: "@UNBOUND_RUN_DIR@/unbound_server.key" 613238106Sdes 614238106Sdes # unbound server certificate file. 615238106Sdes # server-cert-file: "@UNBOUND_RUN_DIR@/unbound_server.pem" 616238106Sdes 617238106Sdes # unbound-control key file. 618238106Sdes # control-key-file: "@UNBOUND_RUN_DIR@/unbound_control.key" 619238106Sdes 620238106Sdes # unbound-control certificate file. 621238106Sdes # control-cert-file: "@UNBOUND_RUN_DIR@/unbound_control.pem" 622238106Sdes 623238106Sdes# Stub zones. 624238106Sdes# Create entries like below, to make all queries for 'example.com' and 625238106Sdes# 'example.org' go to the given list of nameservers. list zero or more 626238106Sdes# nameservers by hostname or by ipaddress. If you set stub-prime to yes, 627238106Sdes# the list is treated as priming hints (default is no). 628238106Sdes# With stub-first yes, it attempts without the stub if it fails. 629289063Sdes# Consider adding domain-insecure: name and local-zone: name nodefault 630289063Sdes# to the server: section if the stub is a locally served zone. 631238106Sdes# stub-zone: 632238106Sdes# name: "example.com" 633238106Sdes# stub-addr: 192.0.2.68 634238106Sdes# stub-prime: no 635238106Sdes# stub-first: no 636238106Sdes# stub-zone: 637238106Sdes# name: "example.org" 638238106Sdes# stub-host: ns.example.com. 639238106Sdes 640238106Sdes# Forward zones 641238106Sdes# Create entries like below, to make all queries for 'example.com' and 642238106Sdes# 'example.org' go to the given list of servers. These servers have to handle 643238106Sdes# recursion to other nameservers. List zero or more nameservers by hostname 644238106Sdes# or by ipaddress. Use an entry with name "." to forward all queries. 645238106Sdes# If you enable forward-first, it attempts without the forward if it fails. 646238106Sdes# forward-zone: 647238106Sdes# name: "example.com" 648238106Sdes# forward-addr: 192.0.2.68 649238106Sdes# forward-addr: 192.0.2.73@5355 # forward to port 5355. 650238106Sdes# forward-first: no 651238106Sdes# forward-zone: 652238106Sdes# name: "example.org" 653238106Sdes# forward-host: fwd.example.com 654