1# 2# Example configuration file. 3# 4# See unbound.conf(5) man page, version 1.17.0. 5# 6# this is a comment. 7 8# Use this anywhere in the file to include other text into this file. 9#include: "otherfile.conf" 10 11# Use this anywhere in the file to include other text, that explicitly starts a 12# clause, into this file. Text after this directive needs to start a clause. 13#include-toplevel: "otherfile.conf" 14 15# The server clause sets the main parameters. 16server: 17 # whitespace is not necessary, but looks cleaner. 18 19 # verbosity number, 0 is least verbose. 1 is default. 20 # verbosity: 1 21 22 # print statistics to the log (for every thread) every N seconds. 23 # Set to "" or 0 to disable. Default is disabled. 24 # statistics-interval: 0 25 26 # enable shm for stats, default no. if you enable also enable 27 # statistics-interval, every time it also writes stats to the 28 # shared memory segment keyed with shm-key. 29 # shm-enable: no 30 31 # shm for stats uses this key, and key+1 for the shared mem segment. 32 # shm-key: 11777 33 34 # enable cumulative statistics, without clearing them after printing. 35 # statistics-cumulative: no 36 37 # enable extended statistics (query types, answer codes, status) 38 # printed from unbound-control. default off, because of speed. 39 # extended-statistics: no 40 41 # number of threads to create. 1 disables threading. 42 # num-threads: 1 43 44 # specify the interfaces to answer queries from by ip-address. 45 # The default is to listen to localhost (127.0.0.1 and ::1). 46 # specify 0.0.0.0 and ::0 to bind to all available interfaces. 47 # specify every interface[@port] on a new 'interface:' labelled line. 48 # The listen interfaces are not changed on reload, only on restart. 49 # interface: 192.0.2.153 50 # interface: 192.0.2.154 51 # interface: 192.0.2.154@5003 52 # interface: 2001:DB8::5 53 # interface: eth0@5003 54 55 # enable this feature to copy the source address of queries to reply. 56 # Socket options are not supported on all platforms. experimental. 57 # interface-automatic: no 58 59 # instead of the default port, open additional ports separated by 60 # spaces when interface-automatic is enabled, by listing them here. 61 # interface-automatic-ports: "" 62 63 # port to answer queries from 64 # port: 53 65 66 # specify the interfaces to send outgoing queries to authoritative 67 # server from by ip-address. If none, the default (all) interface 68 # is used. Specify every interface on a 'outgoing-interface:' line. 69 # outgoing-interface: 192.0.2.153 70 # outgoing-interface: 2001:DB8::5 71 # outgoing-interface: 2001:DB8::6 72 73 # Specify a netblock to use remainder 64 bits as random bits for 74 # upstream queries. Uses freebind option (Linux). 75 # outgoing-interface: 2001:DB8::/64 76 # Also (Linux:) ip -6 addr add 2001:db8::/64 dev lo 77 # And: ip -6 route add local 2001:db8::/64 dev lo 78 # And set prefer-ip6: yes to use the ip6 randomness from a netblock. 79 # Set this to yes to prefer ipv6 upstream servers over ipv4. 80 # prefer-ip6: no 81 82 # Prefer ipv4 upstream servers, even if ipv6 is available. 83 # prefer-ip4: no 84 85 # number of ports to allocate per thread, determines the size of the 86 # port range that can be open simultaneously. About double the 87 # num-queries-per-thread, or, use as many as the OS will allow you. 88 # outgoing-range: 4096 89 90 # permit Unbound to use this port number or port range for 91 # making outgoing queries, using an outgoing interface. 92 # outgoing-port-permit: 32768 93 94 # deny Unbound the use this of port number or port range for 95 # making outgoing queries, using an outgoing interface. 96 # Use this to make sure Unbound does not grab a UDP port that some 97 # other server on this computer needs. The default is to avoid 98 # IANA-assigned port numbers. 99 # If multiple outgoing-port-permit and outgoing-port-avoid options 100 # are present, they are processed in order. 101 # outgoing-port-avoid: "3200-3208" 102 103 # number of outgoing simultaneous tcp buffers to hold per thread. 104 # outgoing-num-tcp: 10 105 106 # number of incoming simultaneous tcp buffers to hold per thread. 107 # incoming-num-tcp: 10 108 109 # buffer size for UDP port 53 incoming (SO_RCVBUF socket option). 110 # 0 is system default. Use 4m to catch query spikes for busy servers. 111 # so-rcvbuf: 0 112 113 # buffer size for UDP port 53 outgoing (SO_SNDBUF socket option). 114 # 0 is system default. Use 4m to handle spikes on very busy servers. 115 # so-sndbuf: 0 116 117 # use SO_REUSEPORT to distribute queries over threads. 118 # at extreme load it could be better to turn it off to distribute even. 119 # so-reuseport: yes 120 121 # use IP_TRANSPARENT so the interface: addresses can be non-local 122 # and you can config non-existing IPs that are going to work later on 123 # (uses IP_BINDANY on FreeBSD). 124 # ip-transparent: no 125 126 # use IP_FREEBIND so the interface: addresses can be non-local 127 # and you can bind to nonexisting IPs and interfaces that are down. 128 # Linux only. On Linux you also have ip-transparent that is similar. 129 # ip-freebind: no 130 131 # the value of the Differentiated Services Codepoint (DSCP) 132 # in the differentiated services field (DS) of the outgoing 133 # IP packets 134 # ip-dscp: 0 135 136 # EDNS reassembly buffer to advertise to UDP peers (the actual buffer 137 # is set with msg-buffer-size). 138 # edns-buffer-size: 1232 139 140 # Maximum UDP response size (not applied to TCP response). 141 # Suggested values are 512 to 4096. Default is 4096. 65536 disables it. 142 # max-udp-size: 4096 143 144 # max memory to use for stream(tcp and tls) waiting result buffers. 145 # stream-wait-size: 4m 146 147 # buffer size for handling DNS data. No messages larger than this 148 # size can be sent or received, by UDP or TCP. In bytes. 149 # msg-buffer-size: 65552 150 151 # the amount of memory to use for the message cache. 152 # plain value in bytes or you can append k, m or G. default is "4Mb". 153 # msg-cache-size: 4m 154 155 # the number of slabs to use for the message cache. 156 # the number of slabs must be a power of 2. 157 # more slabs reduce lock contention, but fragment memory usage. 158 # msg-cache-slabs: 4 159 160 # the number of queries that a thread gets to service. 161 # num-queries-per-thread: 1024 162 163 # if very busy, 50% queries run to completion, 50% get timeout in msec 164 # jostle-timeout: 200 165 166 # msec to wait before close of port on timeout UDP. 0 disables. 167 # delay-close: 0 168 169 # perform connect for UDP sockets to mitigate ICMP side channel. 170 # udp-connect: yes 171 172 # The number of retries, per upstream nameserver in a delegation, when 173 # a throwaway response (also timeouts) is received. 174 # outbound-msg-retry: 5 175 176 # msec for waiting for an unknown server to reply. Increase if you 177 # are behind a slow satellite link, to eg. 1128. 178 # unknown-server-time-limit: 376 179 180 # the amount of memory to use for the RRset cache. 181 # plain value in bytes or you can append k, m or G. default is "4Mb". 182 # rrset-cache-size: 4m 183 184 # the number of slabs to use for the RRset cache. 185 # the number of slabs must be a power of 2. 186 # more slabs reduce lock contention, but fragment memory usage. 187 # rrset-cache-slabs: 4 188 189 # the time to live (TTL) value lower bound, in seconds. Default 0. 190 # If more than an hour could easily give trouble due to stale data. 191 # cache-min-ttl: 0 192 193 # the time to live (TTL) value cap for RRsets and messages in the 194 # cache. Items are not cached for longer. In seconds. 195 # cache-max-ttl: 86400 196 197 # the time to live (TTL) value cap for negative responses in the cache 198 # cache-max-negative-ttl: 3600 199 200 # the time to live (TTL) value for cached roundtrip times, lameness and 201 # EDNS version information for hosts. In seconds. 202 # infra-host-ttl: 900 203 204 # minimum wait time for responses, increase if uplink is long. In msec. 205 # infra-cache-min-rtt: 50 206 207 # maximum wait time for responses. In msec. 208 # infra-cache-max-rtt: 120000 209 210 # enable to make server probe down hosts more frequently. 211 # infra-keep-probing: no 212 213 # the number of slabs to use for the Infrastructure cache. 214 # the number of slabs must be a power of 2. 215 # more slabs reduce lock contention, but fragment memory usage. 216 # infra-cache-slabs: 4 217 218 # the maximum number of hosts that are cached (roundtrip, EDNS, lame). 219 # infra-cache-numhosts: 10000 220 221 # define a number of tags here, use with local-zone, access-control, 222 # interface-*. 223 # repeat the define-tag statement to add additional tags. 224 # define-tag: "tag1 tag2 tag3" 225 226 # Enable IPv4, "yes" or "no". 227 # do-ip4: yes 228 229 # Enable IPv6, "yes" or "no". 230 # do-ip6: yes 231 232 # Enable UDP, "yes" or "no". 233 # do-udp: yes 234 235 # Enable TCP, "yes" or "no". 236 # do-tcp: yes 237 238 # upstream connections use TCP only (and no UDP), "yes" or "no" 239 # useful for tunneling scenarios, default no. 240 # tcp-upstream: no 241 242 # upstream connections also use UDP (even if do-udp is no). 243 # useful if if you want UDP upstream, but don't provide UDP downstream. 244 # udp-upstream-without-downstream: no 245 246 # Maximum segment size (MSS) of TCP socket on which the server 247 # responds to queries. Default is 0, system default MSS. 248 # tcp-mss: 0 249 250 # Maximum segment size (MSS) of TCP socket for outgoing queries. 251 # Default is 0, system default MSS. 252 # outgoing-tcp-mss: 0 253 254 # Idle TCP timeout, connection closed in milliseconds 255 # tcp-idle-timeout: 30000 256 257 # Enable EDNS TCP keepalive option. 258 # edns-tcp-keepalive: no 259 260 # Timeout for EDNS TCP keepalive, in msec. 261 # edns-tcp-keepalive-timeout: 120000 262 263 # Use systemd socket activation for UDP, TCP, and control sockets. 264 # use-systemd: no 265 266 # Detach from the terminal, run in background, "yes" or "no". 267 # Set the value to "no" when Unbound runs as systemd service. 268 # do-daemonize: yes 269 270 # control which clients are allowed to make (recursive) queries 271 # to this server. Specify classless netblocks with /size and action. 272 # By default everything is refused, except for localhost. 273 # Choose deny (drop message), refuse (polite error reply), 274 # allow (recursive ok), allow_setrd (recursive ok, rd bit is forced on), 275 # allow_snoop (recursive and nonrecursive ok) 276 # deny_non_local (drop queries unless can be answered from local-data) 277 # refuse_non_local (like deny_non_local but polite error reply). 278 # access-control: 127.0.0.0/8 allow 279 # access-control: ::1 allow 280 # access-control: ::ffff:127.0.0.1 allow 281 282 # tag access-control with list of tags (in "" with spaces between) 283 # Clients using this access control element use localzones that 284 # are tagged with one of these tags. 285 # access-control-tag: 192.0.2.0/24 "tag2 tag3" 286 287 # set action for particular tag for given access control element. 288 # if you have multiple tag values, the tag used to lookup the action 289 # is the first tag match between access-control-tag and local-zone-tag 290 # where "first" comes from the order of the define-tag values. 291 # access-control-tag-action: 192.0.2.0/24 tag3 refuse 292 293 # set redirect data for particular tag for access control element 294 # access-control-tag-data: 192.0.2.0/24 tag2 "A 127.0.0.1" 295 296 # Set view for access control element 297 # access-control-view: 192.0.2.0/24 viewname 298 299 # Similar to 'access-control:' but for interfaces. 300 # Control which listening interfaces are allowed to accept (recursive) 301 # queries for this server. 302 # The specified interfaces should be the same as the ones specified in 303 # 'interface:' followed by the action. 304 # The actions are the same as 'access-control:' above. 305 # By default all the interfaces configured are refused. 306 # Note: any 'access-control*:' setting overrides all 'interface-*:' 307 # settings for targeted clients. 308 # interface-action: 192.0.2.153 allow 309 # interface-action: 192.0.2.154 allow 310 # interface-action: 192.0.2.154@5003 allow 311 # interface-action: 2001:DB8::5 allow 312 # interface-action: eth0@5003 allow 313 314 # Similar to 'access-control-tag:' but for interfaces. 315 # Tag interfaces with a list of tags (in "" with spaces between). 316 # Interfaces using these tags use localzones that are tagged with one 317 # of these tags. 318 # The specified interfaces should be the same as the ones specified in 319 # 'interface:' followed by the list of tags. 320 # Note: any 'access-control*:' setting overrides all 'interface-*:' 321 # settings for targeted clients. 322 # interface-tag: eth0@5003 "tag2 tag3" 323 324 # Similar to 'access-control-tag-action:' but for interfaces. 325 # Set action for particular tag for a given interface element. 326 # If you have multiple tag values, the tag used to lookup the action 327 # is the first tag match between interface-tag and local-zone-tag 328 # where "first" comes from the order of the define-tag values. 329 # The specified interfaces should be the same as the ones specified in 330 # 'interface:' followed by the tag and action. 331 # Note: any 'access-control*:' setting overrides all 'interface-*:' 332 # settings for targeted clients. 333 # interface-tag-action: eth0@5003 tag3 refuse 334 335 # Similar to 'access-control-tag-data:' but for interfaces. 336 # Set redirect data for a particular tag for an interface element. 337 # The specified interfaces should be the same as the ones specified in 338 # 'interface:' followed by the tag and the redirect data. 339 # Note: any 'access-control*:' setting overrides all 'interface-*:' 340 # settings for targeted clients. 341 # interface-tag-data: eth0@5003 tag2 "A 127.0.0.1" 342 343 # Similar to 'access-control-view:' but for interfaces. 344 # Set view for an interface element. 345 # The specified interfaces should be the same as the ones specified in 346 # 'interface:' followed by the view name. 347 # Note: any 'access-control*:' setting overrides all 'interface-*:' 348 # settings for targeted clients. 349 # interface-view: eth0@5003 viewname 350 351 # if given, a chroot(2) is done to the given directory. 352 # i.e. you can chroot to the working directory, for example, 353 # for extra security, but make sure all files are in that directory. 354 # 355 # If chroot is enabled, you should pass the configfile (from the 356 # commandline) as a full path from the original root. After the 357 # chroot has been performed the now defunct portion of the config 358 # file path is removed to be able to reread the config after a reload. 359 # 360 # All other file paths (working dir, logfile, roothints, and 361 # key files) can be specified in several ways: 362 # o as an absolute path relative to the new root. 363 # o as a relative path to the working directory. 364 # o as an absolute path relative to the original root. 365 # In the last case the path is adjusted to remove the unused portion. 366 # 367 # The pid file can be absolute and outside of the chroot, it is 368 # written just prior to performing the chroot and dropping permissions. 369 # 370 # Additionally, Unbound may need to access /dev/urandom (for entropy). 371 # How to do this is specific to your OS. 372 # 373 # If you give "" no chroot is performed. The path must not end in a /. 374 # chroot: "@UNBOUND_CHROOT_DIR@" 375 376 # if given, user privileges are dropped (after binding port), 377 # and the given username is assumed. Default is user "unbound". 378 # If you give "" no privileges are dropped. 379 # username: "@UNBOUND_USERNAME@" 380 381 # the working directory. The relative files in this config are 382 # relative to this directory. If you give "" the working directory 383 # is not changed. 384 # If you give a server: directory: dir before include: file statements 385 # then those includes can be relative to the working directory. 386 # directory: "@UNBOUND_RUN_DIR@" 387 388 # the log file, "" means log to stderr. 389 # Use of this option sets use-syslog to "no". 390 # logfile: "" 391 392 # Log to syslog(3) if yes. The log facility LOG_DAEMON is used to 393 # log to. If yes, it overrides the logfile. 394 # use-syslog: yes 395 396 # Log identity to report. if empty, defaults to the name of argv[0] 397 # (usually "unbound"). 398 # log-identity: "" 399 400 # print UTC timestamp in ascii to logfile, default is epoch in seconds. 401 # log-time-ascii: no 402 403 # print one line with time, IP, name, type, class for every query. 404 # log-queries: no 405 406 # print one line per reply, with time, IP, name, type, class, rcode, 407 # timetoresolve, fromcache and responsesize. 408 # log-replies: no 409 410 # log with tag 'query' and 'reply' instead of 'info' for 411 # filtering log-queries and log-replies from the log. 412 # log-tag-queryreply: no 413 414 # log the local-zone actions, like local-zone type inform is enabled 415 # also for the other local zone types. 416 # log-local-actions: no 417 418 # print log lines that say why queries return SERVFAIL to clients. 419 # log-servfail: no 420 421 # the pid file. Can be an absolute path outside of chroot/work dir. 422 # pidfile: "@UNBOUND_PIDFILE@" 423 424 # file to read root hints from. 425 # get one from https://www.internic.net/domain/named.cache 426 # root-hints: "" 427 428 # enable to not answer id.server and hostname.bind queries. 429 # hide-identity: no 430 431 # enable to not answer version.server and version.bind queries. 432 # hide-version: no 433 434 # enable to not answer trustanchor.unbound queries. 435 # hide-trustanchor: no 436 437 # enable to not set the User-Agent HTTP header. 438 # hide-http-user-agent: no 439 440 # the identity to report. Leave "" or default to return hostname. 441 # identity: "" 442 443 # the version to report. Leave "" or default to return package version. 444 # version: "" 445 446 # NSID identity (hex string, or "ascii_somestring"). default disabled. 447 # nsid: "aabbccdd" 448 449 # User-Agent HTTP header to use. Leave "" or default to use package name 450 # and version. 451 # http-user-agent: "" 452 453 # the target fetch policy. 454 # series of integers describing the policy per dependency depth. 455 # The number of values in the list determines the maximum dependency 456 # depth the recursor will pursue before giving up. Each integer means: 457 # -1 : fetch all targets opportunistically, 458 # 0: fetch on demand, 459 # positive value: fetch that many targets opportunistically. 460 # Enclose the list of numbers between quotes (""). 461 # target-fetch-policy: "3 2 1 0 0" 462 463 # Harden against very small EDNS buffer sizes. 464 # harden-short-bufsize: yes 465 466 # Harden against unseemly large queries. 467 # harden-large-queries: no 468 469 # Harden against out of zone rrsets, to avoid spoofing attempts. 470 # harden-glue: yes 471 472 # Harden against receiving dnssec-stripped data. If you turn it 473 # off, failing to validate dnskey data for a trustanchor will 474 # trigger insecure mode for that zone (like without a trustanchor). 475 # Default on, which insists on dnssec data for trust-anchored zones. 476 # harden-dnssec-stripped: yes 477 478 # Harden against queries that fall under dnssec-signed nxdomain names. 479 # harden-below-nxdomain: yes 480 481 # Harden the referral path by performing additional queries for 482 # infrastructure data. Validates the replies (if possible). 483 # Default off, because the lookups burden the server. Experimental 484 # implementation of draft-wijngaards-dnsext-resolver-side-mitigation. 485 # harden-referral-path: no 486 487 # Harden against algorithm downgrade when multiple algorithms are 488 # advertised in the DS record. If no, allows the weakest algorithm 489 # to validate the zone. 490 # harden-algo-downgrade: no 491 492 # Sent minimum amount of information to upstream servers to enhance 493 # privacy. Only sent minimum required labels of the QNAME and set QTYPE 494 # to A when possible. 495 # qname-minimisation: yes 496 497 # QNAME minimisation in strict mode. Do not fall-back to sending full 498 # QNAME to potentially broken nameservers. A lot of domains will not be 499 # resolvable when this option in enabled. 500 # This option only has effect when qname-minimisation is enabled. 501 # qname-minimisation-strict: no 502 503 # Aggressive NSEC uses the DNSSEC NSEC chain to synthesize NXDOMAIN 504 # and other denials, using information from previous NXDOMAINs answers. 505 # aggressive-nsec: yes 506 507 # Use 0x20-encoded random bits in the query to foil spoof attempts. 508 # This feature is an experimental implementation of draft dns-0x20. 509 # use-caps-for-id: no 510 511 # Domains (and domains in them) without support for dns-0x20 and 512 # the fallback fails because they keep sending different answers. 513 # caps-exempt: "licdn.com" 514 # caps-exempt: "senderbase.org" 515 516 # Enforce privacy of these addresses. Strips them away from answers. 517 # It may cause DNSSEC validation to additionally mark it as bogus. 518 # Protects against 'DNS Rebinding' (uses browser as network proxy). 519 # Only 'private-domain' and 'local-data' names are allowed to have 520 # these private addresses. No default. 521 # private-address: 10.0.0.0/8 522 # private-address: 172.16.0.0/12 523 # private-address: 192.168.0.0/16 524 # private-address: 169.254.0.0/16 525 # private-address: fd00::/8 526 # private-address: fe80::/10 527 # private-address: ::ffff:0:0/96 528 529 # Allow the domain (and its subdomains) to contain private addresses. 530 # local-data statements are allowed to contain private addresses too. 531 # private-domain: "example.com" 532 533 # If nonzero, unwanted replies are not only reported in statistics, 534 # but also a running total is kept per thread. If it reaches the 535 # threshold, a warning is printed and a defensive action is taken, 536 # the cache is cleared to flush potential poison out of it. 537 # A suggested value is 10000000, the default is 0 (turned off). 538 # unwanted-reply-threshold: 0 539 540 # Do not query the following addresses. No DNS queries are sent there. 541 # List one address per entry. List classless netblocks with /size, 542 # do-not-query-address: 127.0.0.1/8 543 # do-not-query-address: ::1 544 545 # if yes, the above default do-not-query-address entries are present. 546 # if no, localhost can be queried (for testing and debugging). 547 # do-not-query-localhost: yes 548 549 # if yes, perform prefetching of almost expired message cache entries. 550 # prefetch: no 551 552 # if yes, perform key lookups adjacent to normal lookups. 553 # prefetch-key: no 554 555 # deny queries of type ANY with an empty response. 556 # deny-any: no 557 558 # if yes, Unbound rotates RRSet order in response. 559 # rrset-roundrobin: yes 560 561 # if yes, Unbound doesn't insert authority/additional sections 562 # into response messages when those sections are not required. 563 # minimal-responses: yes 564 565 # true to disable DNSSEC lameness check in iterator. 566 # disable-dnssec-lame-check: no 567 568 # module configuration of the server. A string with identifiers 569 # separated by spaces. Syntax: "[dns64] [validator] iterator" 570 # most modules have to be listed at the beginning of the line, 571 # except cachedb(just before iterator), and python (at the beginning, 572 # or, just before the iterator). 573 # module-config: "validator iterator" 574 575 # File with trusted keys, kept uptodate using RFC5011 probes, 576 # initial file like trust-anchor-file, then it stores metadata. 577 # Use several entries, one per domain name, to track multiple zones. 578 # 579 # If you want to perform DNSSEC validation, run unbound-anchor before 580 # you start Unbound (i.e. in the system boot scripts). 581 # And then enable the auto-trust-anchor-file config item. 582 # Please note usage of unbound-anchor root anchor is at your own risk 583 # and under the terms of our LICENSE (see that file in the source). 584 # auto-trust-anchor-file: "@UNBOUND_ROOTKEY_FILE@" 585 586 # trust anchor signaling sends a RFC8145 key tag query after priming. 587 # trust-anchor-signaling: yes 588 589 # Root key trust anchor sentinel (draft-ietf-dnsop-kskroll-sentinel) 590 # root-key-sentinel: yes 591 592 # File with trusted keys for validation. Specify more than one file 593 # with several entries, one file per entry. 594 # Zone file format, with DS and DNSKEY entries. 595 # Note this gets out of date, use auto-trust-anchor-file please. 596 # trust-anchor-file: "" 597 598 # Trusted key for validation. DS or DNSKEY. specify the RR on a 599 # single line, surrounded by "". TTL is ignored. class is IN default. 600 # Note this gets out of date, use auto-trust-anchor-file please. 601 # (These examples are from August 2007 and may not be valid anymore). 602 # trust-anchor: "nlnetlabs.nl. DNSKEY 257 3 5 AQPzzTWMz8qSWIQlfRnPckx2BiVmkVN6LPupO3mbz7FhLSnm26n6iG9N Lby97Ji453aWZY3M5/xJBSOS2vWtco2t8C0+xeO1bc/d6ZTy32DHchpW 6rDH1vp86Ll+ha0tmwyy9QP7y2bVw5zSbFCrefk8qCUBgfHm9bHzMG1U BYtEIQ==" 603 # trust-anchor: "jelte.nlnetlabs.nl. DS 42860 5 1 14D739EB566D2B1A5E216A0BA4D17FA9B038BE4A" 604 605 # File with trusted keys for validation. Specify more than one file 606 # with several entries, one file per entry. Like trust-anchor-file 607 # but has a different file format. Format is BIND-9 style format, 608 # the trusted-keys { name flag proto algo "key"; }; clauses are read. 609 # you need external update procedures to track changes in keys. 610 # trusted-keys-file: "" 611 612 # Ignore chain of trust. Domain is treated as insecure. 613 # domain-insecure: "example.com" 614 615 # Override the date for validation with a specific fixed date. 616 # Do not set this unless you are debugging signature inception 617 # and expiration. "" or "0" turns the feature off. -1 ignores date. 618 # val-override-date: "" 619 620 # The time to live for bogus data, rrsets and messages. This avoids 621 # some of the revalidation, until the time interval expires. in secs. 622 # val-bogus-ttl: 60 623 624 # The signature inception and expiration dates are allowed to be off 625 # by 10% of the signature lifetime (expir-incep) from our local clock. 626 # This leeway is capped with a minimum and a maximum. In seconds. 627 # val-sig-skew-min: 3600 628 # val-sig-skew-max: 86400 629 630 # The maximum number the validator should restart validation with 631 # another authority in case of failed validation. 632 # val-max-restart: 5 633 634 # Should additional section of secure message also be kept clean of 635 # unsecure data. Useful to shield the users of this validator from 636 # potential bogus data in the additional section. All unsigned data 637 # in the additional section is removed from secure messages. 638 # val-clean-additional: yes 639 640 # Turn permissive mode on to permit bogus messages. Thus, messages 641 # for which security checks failed will be returned to clients, 642 # instead of SERVFAIL. It still performs the security checks, which 643 # result in interesting log files and possibly the AD bit in 644 # replies if the message is found secure. The default is off. 645 # val-permissive-mode: no 646 647 # Ignore the CD flag in incoming queries and refuse them bogus data. 648 # Enable it if the only clients of Unbound are legacy servers (w2008) 649 # that set CD but cannot validate themselves. 650 # ignore-cd-flag: no 651 652 # Serve expired responses from cache, with serve-expired-reply-ttl in 653 # the response, and then attempt to fetch the data afresh. 654 # serve-expired: no 655 # 656 # Limit serving of expired responses to configured seconds after 657 # expiration. 0 disables the limit. 658 # serve-expired-ttl: 0 659 # 660 # Set the TTL of expired records to the serve-expired-ttl value after a 661 # failed attempt to retrieve the record from upstream. This makes sure 662 # that the expired records will be served as long as there are queries 663 # for it. 664 # serve-expired-ttl-reset: no 665 # 666 # TTL value to use when replying with expired data. 667 # serve-expired-reply-ttl: 30 668 # 669 # Time in milliseconds before replying to the client with expired data. 670 # This essentially enables the serve-stale behavior as specified in 671 # RFC 8767 that first tries to resolve before 672 # immediately responding with expired data. 0 disables this behavior. 673 # A recommended value is 1800. 674 # serve-expired-client-timeout: 0 675 676 # Return the original TTL as received from the upstream name server rather 677 # than the decrementing TTL as stored in the cache. Enabling this feature 678 # does not impact cache expiry, it only changes the TTL Unbound embeds in 679 # responses to queries. Note that enabling this feature implicitly disables 680 # enforcement of the configured minimum and maximum TTL. 681 # serve-original-ttl: no 682 683 # Have the validator log failed validations for your diagnosis. 684 # 0: off. 1: A line per failed user query. 2: With reason and bad IP. 685 # val-log-level: 0 686 687 # It is possible to configure NSEC3 maximum iteration counts per 688 # keysize. Keep this table very short, as linear search is done. 689 # A message with an NSEC3 with larger count is marked insecure. 690 # List in ascending order the keysize and count values. 691 # val-nsec3-keysize-iterations: "1024 150 2048 150 4096 150" 692 693 # if enabled, ZONEMD verification failures do not block the zone. 694 # zonemd-permissive-mode: no 695 696 # instruct the auto-trust-anchor-file probing to add anchors after ttl. 697 # add-holddown: 2592000 # 30 days 698 699 # instruct the auto-trust-anchor-file probing to del anchors after ttl. 700 # del-holddown: 2592000 # 30 days 701 702 # auto-trust-anchor-file probing removes missing anchors after ttl. 703 # If the value 0 is given, missing anchors are not removed. 704 # keep-missing: 31622400 # 366 days 705 706 # debug option that allows very small holddown times for key rollover, 707 # otherwise the RFC mandates probe intervals must be at least 1 hour. 708 # permit-small-holddown: no 709 710 # the amount of memory to use for the key cache. 711 # plain value in bytes or you can append k, m or G. default is "4Mb". 712 # key-cache-size: 4m 713 714 # the number of slabs to use for the key cache. 715 # the number of slabs must be a power of 2. 716 # more slabs reduce lock contention, but fragment memory usage. 717 # key-cache-slabs: 4 718 719 # the amount of memory to use for the negative cache. 720 # plain value in bytes or you can append k, m or G. default is "1Mb". 721 # neg-cache-size: 1m 722 723 # By default, for a number of zones a small default 'nothing here' 724 # reply is built-in. Query traffic is thus blocked. If you 725 # wish to serve such zone you can unblock them by uncommenting one 726 # of the nodefault statements below. 727 # You may also have to use domain-insecure: zone to make DNSSEC work, 728 # unless you have your own trust anchors for this zone. 729 # local-zone: "localhost." nodefault 730 # local-zone: "127.in-addr.arpa." nodefault 731 # 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 732 # local-zone: "home.arpa." nodefault 733 # local-zone: "onion." nodefault 734 # local-zone: "test." nodefault 735 # local-zone: "invalid." nodefault 736 # local-zone: "10.in-addr.arpa." nodefault 737 # local-zone: "16.172.in-addr.arpa." nodefault 738 # local-zone: "17.172.in-addr.arpa." nodefault 739 # local-zone: "18.172.in-addr.arpa." nodefault 740 # local-zone: "19.172.in-addr.arpa." nodefault 741 # local-zone: "20.172.in-addr.arpa." nodefault 742 # local-zone: "21.172.in-addr.arpa." nodefault 743 # local-zone: "22.172.in-addr.arpa." nodefault 744 # local-zone: "23.172.in-addr.arpa." nodefault 745 # local-zone: "24.172.in-addr.arpa." nodefault 746 # local-zone: "25.172.in-addr.arpa." nodefault 747 # local-zone: "26.172.in-addr.arpa." nodefault 748 # local-zone: "27.172.in-addr.arpa." nodefault 749 # local-zone: "28.172.in-addr.arpa." nodefault 750 # local-zone: "29.172.in-addr.arpa." nodefault 751 # local-zone: "30.172.in-addr.arpa." nodefault 752 # local-zone: "31.172.in-addr.arpa." nodefault 753 # local-zone: "168.192.in-addr.arpa." nodefault 754 # local-zone: "0.in-addr.arpa." nodefault 755 # local-zone: "254.169.in-addr.arpa." nodefault 756 # local-zone: "2.0.192.in-addr.arpa." nodefault 757 # local-zone: "100.51.198.in-addr.arpa." nodefault 758 # local-zone: "113.0.203.in-addr.arpa." nodefault 759 # local-zone: "255.255.255.255.in-addr.arpa." nodefault 760 # 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 761 # local-zone: "d.f.ip6.arpa." nodefault 762 # local-zone: "8.e.f.ip6.arpa." nodefault 763 # local-zone: "9.e.f.ip6.arpa." nodefault 764 # local-zone: "a.e.f.ip6.arpa." nodefault 765 # local-zone: "b.e.f.ip6.arpa." nodefault 766 # local-zone: "8.b.d.0.1.0.0.2.ip6.arpa." nodefault 767 # And for 64.100.in-addr.arpa. to 127.100.in-addr.arpa. 768 769 # Add example.com into ipset 770 # local-zone: "example.com" ipset 771 772 # If Unbound is running service for the local host then it is useful 773 # to perform lan-wide lookups to the upstream, and unblock the 774 # long list of local-zones above. If this Unbound is a dns server 775 # for a network of computers, disabled is better and stops information 776 # leakage of local lan information. 777 # unblock-lan-zones: no 778 779 # The insecure-lan-zones option disables validation for 780 # these zones, as if they were all listed as domain-insecure. 781 # insecure-lan-zones: no 782 783 # a number of locally served zones can be configured. 784 # local-zone: <zone> <type> 785 # local-data: "<resource record string>" 786 # o deny serves local data (if any), else, drops queries. 787 # o refuse serves local data (if any), else, replies with error. 788 # o static serves local data, else, nxdomain or nodata answer. 789 # o transparent gives local data, but resolves normally for other names 790 # o redirect serves the zone data for any subdomain in the zone. 791 # o nodefault can be used to normally resolve AS112 zones. 792 # o typetransparent resolves normally for other types and other names 793 # o inform acts like transparent, but logs client IP address 794 # o inform_deny drops queries and logs client IP address 795 # o inform_redirect redirects queries and logs client IP address 796 # o always_transparent, always_refuse, always_nxdomain, always_nodata, 797 # always_deny resolve in that way but ignore local data for 798 # that name 799 # o always_null returns 0.0.0.0 or ::0 for any name in the zone. 800 # o noview breaks out of that view towards global local-zones. 801 # 802 # defaults are localhost address, reverse for 127.0.0.1 and ::1 803 # and nxdomain for AS112 zones. If you configure one of these zones 804 # the default content is omitted, or you can omit it with 'nodefault'. 805 # 806 # If you configure local-data without specifying local-zone, by 807 # default a transparent local-zone is created for the data. 808 # 809 # You can add locally served data with 810 # local-zone: "local." static 811 # local-data: "mycomputer.local. IN A 192.0.2.51" 812 # local-data: 'mytext.local TXT "content of text record"' 813 # 814 # You can override certain queries with 815 # local-data: "adserver.example.com A 127.0.0.1" 816 # 817 # You can redirect a domain to a fixed address with 818 # (this makes example.com, www.example.com, etc, all go to 192.0.2.3) 819 # local-zone: "example.com" redirect 820 # local-data: "example.com A 192.0.2.3" 821 # 822 # Shorthand to make PTR records, "IPv4 name" or "IPv6 name". 823 # You can also add PTR records using local-data directly, but then 824 # you need to do the reverse notation yourself. 825 # local-data-ptr: "192.0.2.3 www.example.com" 826 827 # tag a localzone with a list of tag names (in "" with spaces between) 828 # local-zone-tag: "example.com" "tag2 tag3" 829 830 # add a netblock specific override to a localzone, with zone type 831 # local-zone-override: "example.com" 192.0.2.0/24 refuse 832 833 # service clients over TLS (on the TCP sockets) with plain DNS inside 834 # the TLS stream, and over HTTPS using HTTP/2 as specified in RFC8484. 835 # Give the certificate to use and private key. 836 # default is "" (disabled). requires restart to take effect. 837 # tls-service-key: "path/to/privatekeyfile.key" 838 # tls-service-pem: "path/to/publiccertfile.pem" 839 # tls-port: 853 840 # https-port: 443 841 842 # cipher setting for TLSv1.2 843 # tls-ciphers: "DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256" 844 # cipher setting for TLSv1.3 845 # tls-ciphersuites: "TLS_AES_128_GCM_SHA256:TLS_AES_128_CCM_8_SHA256:TLS_AES_128_CCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256" 846 847 # Pad responses to padded queries received over TLS 848 # pad-responses: yes 849 850 # Padded responses will be padded to the closest multiple of this size. 851 # pad-responses-block-size: 468 852 853 # Use the SNI extension for TLS connections. Default is yes. 854 # Changing the value requires a reload. 855 # tls-use-sni: yes 856 857 # Add the secret file for TLS Session Ticket. 858 # Secret file must be 80 bytes of random data. 859 # First key use to encrypt and decrypt TLS session tickets. 860 # Other keys use to decrypt only. 861 # requires restart to take effect. 862 # tls-session-ticket-keys: "path/to/secret_file1" 863 # tls-session-ticket-keys: "path/to/secret_file2" 864 865 # request upstream over TLS (with plain DNS inside the TLS stream). 866 # Default is no. Can be turned on and off with unbound-control. 867 # tls-upstream: no 868 869 # Certificates used to authenticate connections made upstream. 870 # tls-cert-bundle: "" 871 872 # Add system certs to the cert bundle, from the Windows Cert Store 873 # tls-win-cert: no 874 # and on other systems, the default openssl certificates 875 # tls-system-cert: no 876 877 # Pad queries over TLS upstreams 878 # pad-queries: yes 879 880 # Padded queries will be padded to the closest multiple of this size. 881 # pad-queries-block-size: 128 882 883 # Also serve tls on these port numbers (eg. 443, ...), by listing 884 # tls-additional-port: portno for each of the port numbers. 885 886 # HTTP endpoint to provide DNS-over-HTTPS service on. 887 # http-endpoint: "/dns-query" 888 889 # HTTP/2 SETTINGS_MAX_CONCURRENT_STREAMS value to use. 890 # http-max-streams: 100 891 892 # Maximum number of bytes used for all HTTP/2 query buffers. 893 # http-query-buffer-size: 4m 894 895 # Maximum number of bytes used for all HTTP/2 response buffers. 896 # http-response-buffer-size: 4m 897 898 # Set TCP_NODELAY socket option on sockets used for DNS-over-HTTPS 899 # service. 900 # http-nodelay: yes 901 902 # Disable TLS for DNS-over-HTTP downstream service. 903 # http-notls-downstream: no 904 905 # The interfaces that use these listed port numbers will support and 906 # expect PROXYv2. For UDP and TCP/TLS interfaces. 907 # proxy-protocol-port: portno for each of the port numbers. 908 909 # DNS64 prefix. Must be specified when DNS64 is use. 910 # Enable dns64 in module-config. Used to synthesize IPv6 from IPv4. 911 # dns64-prefix: 64:ff9b::0/96 912 913 # DNS64 ignore AAAA records for these domains and use A instead. 914 # dns64-ignore-aaaa: "example.com" 915 916 # ratelimit for uncached, new queries, this limits recursion effort. 917 # ratelimiting is experimental, and may help against randomqueryflood. 918 # if 0(default) it is disabled, otherwise state qps allowed per zone. 919 # ratelimit: 0 920 921 # ratelimits are tracked in a cache, size in bytes of cache (or k,m). 922 # ratelimit-size: 4m 923 # ratelimit cache slabs, reduces lock contention if equal to cpucount. 924 # ratelimit-slabs: 4 925 926 # 0 blocks when ratelimited, otherwise let 1/xth traffic through 927 # ratelimit-factor: 10 928 929 # Aggressive rate limit when the limit is reached and until demand has 930 # decreased in a 2 second rate window. 931 # ratelimit-backoff: no 932 933 # override the ratelimit for a specific domain name. 934 # give this setting multiple times to have multiple overrides. 935 # ratelimit-for-domain: example.com 1000 936 # override the ratelimits for all domains below a domain name 937 # can give this multiple times, the name closest to the zone is used. 938 # ratelimit-below-domain: com 1000 939 940 # global query ratelimit for all ip addresses. 941 # feature is experimental. 942 # if 0(default) it is disabled, otherwise states qps allowed per ip address 943 # ip-ratelimit: 0 944 945 # ip ratelimits are tracked in a cache, size in bytes of cache (or k,m). 946 # ip-ratelimit-size: 4m 947 # ip ratelimit cache slabs, reduces lock contention if equal to cpucount. 948 # ip-ratelimit-slabs: 4 949 950 # 0 blocks when ip is ratelimited, otherwise let 1/xth traffic through 951 # ip-ratelimit-factor: 10 952 953 # Aggressive rate limit when the limit is reached and until demand has 954 # decreased in a 2 second rate window. 955 # ip-ratelimit-backoff: no 956 957 # Limit the number of connections simultaneous from a netblock 958 # tcp-connection-limit: 192.0.2.0/24 12 959 960 # select from the fastest servers this many times out of 1000. 0 means 961 # the fast server select is disabled. prefetches are not sped up. 962 # fast-server-permil: 0 963 # the number of servers that will be used in the fast server selection. 964 # fast-server-num: 3 965 966 # Enable to attach Extended DNS Error codes (RFC8914) to responses. 967 # ede: no 968 969 # Enable to attach an Extended DNS Error (RFC8914) Code 3 - Stale 970 # Answer as EDNS0 option to expired responses. 971 # Note that the ede option above needs to be enabled for this to work. 972 # ede-serve-expired: no 973 974 # Specific options for ipsecmod. Unbound needs to be configured with 975 # --enable-ipsecmod for these to take effect. 976 # 977 # Enable or disable ipsecmod (it still needs to be defined in 978 # module-config above). Can be used when ipsecmod needs to be 979 # enabled/disabled via remote-control(below). 980 # ipsecmod-enabled: yes 981 # 982 # Path to executable external hook. It must be defined when ipsecmod is 983 # listed in module-config (above). 984 # ipsecmod-hook: "./my_executable" 985 # 986 # When enabled Unbound will reply with SERVFAIL if the return value of 987 # the ipsecmod-hook is not 0. 988 # ipsecmod-strict: no 989 # 990 # Maximum time to live (TTL) for cached A/AAAA records with IPSECKEY. 991 # ipsecmod-max-ttl: 3600 992 # 993 # Reply with A/AAAA even if the relevant IPSECKEY is bogus. Mainly used for 994 # testing. 995 # ipsecmod-ignore-bogus: no 996 # 997 # Domains for which ipsecmod will be triggered. If not defined (default) 998 # all domains are treated as being allowed. 999 # ipsecmod-allow: "example.com" 1000 # ipsecmod-allow: "nlnetlabs.nl" 1001 1002 # Timeout for REUSE entries in milliseconds. 1003 # tcp-reuse-timeout: 60000 1004 # Max number of queries on a reuse connection. 1005 # max-reuse-tcp-queries: 200 1006 # Timeout in milliseconds for TCP queries to auth servers. 1007 # tcp-auth-query-timeout: 3000 1008 1009 1010# Python config section. To enable: 1011# o use --with-pythonmodule to configure before compiling. 1012# o list python in the module-config string (above) to enable. 1013# It can be at the start, it gets validated results, or just before 1014# the iterator and process before DNSSEC validation. 1015# o and give a python-script to run. 1016python: 1017 # Script file to load 1018 # python-script: "@UNBOUND_SHARE_DIR@/ubmodule-tst.py" 1019 1020# Dynamic library config section. To enable: 1021# o use --with-dynlibmodule to configure before compiling. 1022# o list dynlib in the module-config string (above) to enable. 1023# It can be placed anywhere, the dynlib module is only a very thin wrapper 1024# to load modules dynamically. 1025# o and give a dynlib-file to run. If more than one dynlib entry is listed in 1026# the module-config then you need one dynlib-file per instance. 1027dynlib: 1028 # Script file to load 1029 # dynlib-file: "@UNBOUND_SHARE_DIR@/dynlib.so" 1030 1031# Remote control config section. 1032remote-control: 1033 # Enable remote control with unbound-control(8) here. 1034 # set up the keys and certificates with unbound-control-setup. 1035 # control-enable: no 1036 1037 # what interfaces are listened to for remote control. 1038 # give 0.0.0.0 and ::0 to listen to all interfaces. 1039 # set to an absolute path to use a unix local name pipe, certificates 1040 # are not used for that, so key and cert files need not be present. 1041 # control-interface: 127.0.0.1 1042 # control-interface: ::1 1043 1044 # port number for remote control operations. 1045 # control-port: 8953 1046 1047 # for localhost, you can disable use of TLS by setting this to "no" 1048 # For local sockets this option is ignored, and TLS is not used. 1049 # control-use-cert: "yes" 1050 1051 # Unbound server key file. 1052 # server-key-file: "@UNBOUND_RUN_DIR@/unbound_server.key" 1053 1054 # Unbound server certificate file. 1055 # server-cert-file: "@UNBOUND_RUN_DIR@/unbound_server.pem" 1056 1057 # unbound-control key file. 1058 # control-key-file: "@UNBOUND_RUN_DIR@/unbound_control.key" 1059 1060 # unbound-control certificate file. 1061 # control-cert-file: "@UNBOUND_RUN_DIR@/unbound_control.pem" 1062 1063# Stub zones. 1064# Create entries like below, to make all queries for 'example.com' and 1065# 'example.org' go to the given list of nameservers. list zero or more 1066# nameservers by hostname or by ipaddress. If you set stub-prime to yes, 1067# the list is treated as priming hints (default is no). 1068# With stub-first yes, it attempts without the stub if it fails. 1069# Consider adding domain-insecure: name and local-zone: name nodefault 1070# to the server: section if the stub is a locally served zone. 1071# stub-zone: 1072# name: "example.com" 1073# stub-addr: 192.0.2.68 1074# stub-prime: no 1075# stub-first: no 1076# stub-tcp-upstream: no 1077# stub-tls-upstream: no 1078# stub-no-cache: no 1079# stub-zone: 1080# name: "example.org" 1081# stub-host: ns.example.com. 1082 1083# Forward zones 1084# Create entries like below, to make all queries for 'example.com' and 1085# 'example.org' go to the given list of servers. These servers have to handle 1086# recursion to other nameservers. List zero or more nameservers by hostname 1087# or by ipaddress. Use an entry with name "." to forward all queries. 1088# If you enable forward-first, it attempts without the forward if it fails. 1089# forward-zone: 1090# name: "example.com" 1091# forward-addr: 192.0.2.68 1092# forward-addr: 192.0.2.73@5355 # forward to port 5355. 1093# forward-first: no 1094# forward-tcp-upstream: no 1095# forward-tls-upstream: no 1096# forward-no-cache: no 1097# forward-zone: 1098# name: "example.org" 1099# forward-host: fwd.example.com 1100 1101# Authority zones 1102# The data for these zones is kept locally, from a file or downloaded. 1103# The data can be served to downstream clients, or used instead of the 1104# upstream (which saves a lookup to the upstream). The first example 1105# has a copy of the root for local usage. The second serves example.org 1106# authoritatively. zonefile: reads from file (and writes to it if you also 1107# download it), primary: fetches with AXFR and IXFR, or url to zonefile. 1108# With allow-notify: you can give additional (apart from primaries and urls) 1109# sources of notifies. 1110# auth-zone: 1111# name: "." 1112# primary: 199.9.14.201 # b.root-servers.net 1113# primary: 192.33.4.12 # c.root-servers.net 1114# primary: 199.7.91.13 # d.root-servers.net 1115# primary: 192.5.5.241 # f.root-servers.net 1116# primary: 192.112.36.4 # g.root-servers.net 1117# primary: 193.0.14.129 # k.root-servers.net 1118# primary: 192.0.47.132 # xfr.cjr.dns.icann.org 1119# primary: 192.0.32.132 # xfr.lax.dns.icann.org 1120# primary: 2001:500:200::b # b.root-servers.net 1121# primary: 2001:500:2::c # c.root-servers.net 1122# primary: 2001:500:2d::d # d.root-servers.net 1123# primary: 2001:500:2f::f # f.root-servers.net 1124# primary: 2001:500:12::d0d # g.root-servers.net 1125# primary: 2001:7fd::1 # k.root-servers.net 1126# primary: 2620:0:2830:202::132 # xfr.cjr.dns.icann.org 1127# primary: 2620:0:2d0:202::132 # xfr.lax.dns.icann.org 1128# fallback-enabled: yes 1129# for-downstream: no 1130# for-upstream: yes 1131# auth-zone: 1132# name: "example.org" 1133# for-downstream: yes 1134# for-upstream: yes 1135# zonemd-check: no 1136# zonemd-reject-absence: no 1137# zonefile: "example.org.zone" 1138 1139# Views 1140# Create named views. Name must be unique. Map views to requests using 1141# the access-control-view option. Views can contain zero or more local-zone 1142# and local-data options. Options from matching views will override global 1143# options. Global options will be used if no matching view is found. 1144# With view-first yes, it will try to answer using the global local-zone and 1145# local-data elements if there is no view specific match. 1146# view: 1147# name: "viewname" 1148# local-zone: "example.com" redirect 1149# local-data: "example.com A 192.0.2.3" 1150# local-data-ptr: "192.0.2.3 www.example.com" 1151# view-first: no 1152# view: 1153# name: "anotherview" 1154# local-zone: "example.com" refuse 1155 1156# DNSCrypt 1157# To enable, use --enable-dnscrypt to configure before compiling. 1158# Caveats: 1159# 1. the keys/certs cannot be produced by Unbound. You can use dnscrypt-wrapper 1160# for this: https://github.com/cofyc/dnscrypt-wrapper/blob/master/README.md#usage 1161# 2. dnscrypt channel attaches to an interface. you MUST set interfaces to 1162# listen on `dnscrypt-port` with the follo0wing snippet: 1163# server: 1164# interface: 0.0.0.0@443 1165# interface: ::0@443 1166# 1167# Finally, `dnscrypt` config has its own section. 1168# dnscrypt: 1169# dnscrypt-enable: yes 1170# dnscrypt-port: 443 1171# dnscrypt-provider: 2.dnscrypt-cert.example.com. 1172# dnscrypt-secret-key: /path/unbound-conf/keys1/1.key 1173# dnscrypt-secret-key: /path/unbound-conf/keys2/1.key 1174# dnscrypt-provider-cert: /path/unbound-conf/keys1/1.cert 1175# dnscrypt-provider-cert: /path/unbound-conf/keys2/1.cert 1176 1177# CacheDB 1178# External backend DB as auxiliary cache. 1179# To enable, use --enable-cachedb to configure before compiling. 1180# Specify the backend name 1181# (default is "testframe", which has no use other than for debugging and 1182# testing) and backend-specific options. The 'cachedb' module must be 1183# included in module-config, just before the iterator module. 1184# cachedb: 1185# backend: "testframe" 1186# # secret seed string to calculate hashed keys 1187# secret-seed: "default" 1188# 1189# # For "redis" backend: 1190# # (to enable, use --with-libhiredis to configure before compiling) 1191# # redis server's IP address or host name 1192# redis-server-host: 127.0.0.1 1193# # redis server's TCP port 1194# redis-server-port: 6379 1195# # timeout (in ms) for communication with the redis server 1196# redis-timeout: 100 1197# # set timeout on redis records based on DNS response TTL 1198# redis-expire-records: no 1199 1200# IPSet 1201# Add specify domain into set via ipset. 1202# To enable: 1203# o use --enable-ipset to configure before compiling; 1204# o Unbound then needs to run as root user. 1205# ipset: 1206# # set name for ip v4 addresses 1207# name-v4: "list-v4" 1208# # set name for ip v6 addresses 1209# name-v6: "list-v6" 1210# 1211 1212# Dnstap logging support, if compiled in by using --enable-dnstap to configure. 1213# To enable, set the dnstap-enable to yes and also some of 1214# dnstap-log-..-messages to yes. And select an upstream log destination, by 1215# socket path, TCP or TLS destination. 1216# dnstap: 1217# dnstap-enable: no 1218# # if set to yes frame streams will be used in bidirectional mode 1219# dnstap-bidirectional: yes 1220# dnstap-socket-path: "@DNSTAP_SOCKET_PATH@" 1221# # if "" use the unix socket in dnstap-socket-path, otherwise, 1222# # set it to "IPaddress[@port]" of the destination. 1223# dnstap-ip: "" 1224# # if set to yes if you want to use TLS to dnstap-ip, no for TCP. 1225# dnstap-tls: yes 1226# # name for authenticating the upstream server. or "" disabled. 1227# dnstap-tls-server-name: "" 1228# # if "", it uses the cert bundle from the main Unbound config. 1229# dnstap-tls-cert-bundle: "" 1230# # key file for client authentication, or "" disabled. 1231# dnstap-tls-client-key-file: "" 1232# # cert file for client authentication, or "" disabled. 1233# dnstap-tls-client-cert-file: "" 1234# dnstap-send-identity: no 1235# dnstap-send-version: no 1236# # if "" it uses the hostname. 1237# dnstap-identity: "" 1238# # if "" it uses the package version. 1239# dnstap-version: "" 1240# dnstap-log-resolver-query-messages: no 1241# dnstap-log-resolver-response-messages: no 1242# dnstap-log-client-query-messages: no 1243# dnstap-log-client-response-messages: no 1244# dnstap-log-forwarder-query-messages: no 1245# dnstap-log-forwarder-response-messages: no 1246 1247# Response Policy Zones 1248# RPZ policies. Applied in order of configuration. QNAME, Response IP 1249# Address, nsdname, nsip and clientip triggers are supported. Supported 1250# actions are: NXDOMAIN, NODATA, PASSTHRU, DROP, Local Data, tcp-only 1251# and drop. Policies can be loaded from a file, or using zone 1252# transfer, or using HTTP. The respip module needs to be added 1253# to the module-config, e.g.: module-config: "respip validator iterator". 1254# rpz: 1255# name: "rpz.example.com" 1256# zonefile: "rpz.example.com" 1257# primary: 192.0.2.0 1258# allow-notify: 192.0.2.0/32 1259# url: http://www.example.com/rpz.example.org.zone 1260# rpz-action-override: cname 1261# rpz-cname-override: www.example.org 1262# rpz-log: yes 1263# rpz-log-name: "example policy" 1264# rpz-signal-nxdomain-ra: no 1265# for-downstream: no 1266# tags: "example" 1267