1b7579f77SDag-Erling Smørgrav# 2b7579f77SDag-Erling Smørgrav# Example configuration file. 3b7579f77SDag-Erling Smørgrav# 4*09a3aaf3SDag-Erling Smørgrav# See unbound.conf(5) man page, version 1.5.4. 5b7579f77SDag-Erling Smørgrav# 6b7579f77SDag-Erling Smørgrav# this is a comment. 7b7579f77SDag-Erling Smørgrav 8b7579f77SDag-Erling Smørgrav#Use this to include other text into the file. 9b7579f77SDag-Erling Smørgrav#include: "otherfile.conf" 10b7579f77SDag-Erling Smørgrav 11b7579f77SDag-Erling Smørgrav# The server clause sets the main parameters. 12b7579f77SDag-Erling Smørgravserver: 13b7579f77SDag-Erling Smørgrav # whitespace is not necessary, but looks cleaner. 14b7579f77SDag-Erling Smørgrav 15b7579f77SDag-Erling Smørgrav # verbosity number, 0 is least verbose. 1 is default. 16b7579f77SDag-Erling Smørgrav verbosity: 1 17b7579f77SDag-Erling Smørgrav 18b7579f77SDag-Erling Smørgrav # print statistics to the log (for every thread) every N seconds. 19b7579f77SDag-Erling Smørgrav # Set to "" or 0 to disable. Default is disabled. 20b7579f77SDag-Erling Smørgrav # statistics-interval: 0 21b7579f77SDag-Erling Smørgrav 22b7579f77SDag-Erling Smørgrav # enable cumulative statistics, without clearing them after printing. 23b7579f77SDag-Erling Smørgrav # statistics-cumulative: no 24b7579f77SDag-Erling Smørgrav 25b7579f77SDag-Erling Smørgrav # enable extended statistics (query types, answer codes, status) 26b7579f77SDag-Erling Smørgrav # printed from unbound-control. default off, because of speed. 27b7579f77SDag-Erling Smørgrav # extended-statistics: no 28b7579f77SDag-Erling Smørgrav 29b7579f77SDag-Erling Smørgrav # number of threads to create. 1 disables threading. 30b7579f77SDag-Erling Smørgrav # num-threads: 1 31b7579f77SDag-Erling Smørgrav 32b7579f77SDag-Erling Smørgrav # specify the interfaces to answer queries from by ip-address. 33b7579f77SDag-Erling Smørgrav # The default is to listen to localhost (127.0.0.1 and ::1). 34b7579f77SDag-Erling Smørgrav # specify 0.0.0.0 and ::0 to bind to all available interfaces. 35b7579f77SDag-Erling Smørgrav # specify every interface[@port] on a new 'interface:' labelled line. 36b7579f77SDag-Erling Smørgrav # The listen interfaces are not changed on reload, only on restart. 37b7579f77SDag-Erling Smørgrav # interface: 192.0.2.153 38b7579f77SDag-Erling Smørgrav # interface: 192.0.2.154 39b7579f77SDag-Erling Smørgrav # interface: 192.0.2.154@5003 40b7579f77SDag-Erling Smørgrav # interface: 2001:DB8::5 41b7579f77SDag-Erling Smørgrav 42b7579f77SDag-Erling Smørgrav # enable this feature to copy the source address of queries to reply. 43b7579f77SDag-Erling Smørgrav # Socket options are not supported on all platforms. experimental. 44b7579f77SDag-Erling Smørgrav # interface-automatic: no 45b7579f77SDag-Erling Smørgrav 46b7579f77SDag-Erling Smørgrav # port to answer queries from 47b7579f77SDag-Erling Smørgrav # port: 53 48b7579f77SDag-Erling Smørgrav 49b7579f77SDag-Erling Smørgrav # specify the interfaces to send outgoing queries to authoritative 50b7579f77SDag-Erling Smørgrav # server from by ip-address. If none, the default (all) interface 51b7579f77SDag-Erling Smørgrav # is used. Specify every interface on a 'outgoing-interface:' line. 52b7579f77SDag-Erling Smørgrav # outgoing-interface: 192.0.2.153 53b7579f77SDag-Erling Smørgrav # outgoing-interface: 2001:DB8::5 54b7579f77SDag-Erling Smørgrav # outgoing-interface: 2001:DB8::6 55b7579f77SDag-Erling Smørgrav 56b7579f77SDag-Erling Smørgrav # number of ports to allocate per thread, determines the size of the 57b7579f77SDag-Erling Smørgrav # port range that can be open simultaneously. About double the 58b7579f77SDag-Erling Smørgrav # num-queries-per-thread, or, use as many as the OS will allow you. 59b7579f77SDag-Erling Smørgrav # outgoing-range: 4096 60b7579f77SDag-Erling Smørgrav 61b7579f77SDag-Erling Smørgrav # permit unbound to use this port number or port range for 62b7579f77SDag-Erling Smørgrav # making outgoing queries, using an outgoing interface. 63b7579f77SDag-Erling Smørgrav # outgoing-port-permit: 32768 64b7579f77SDag-Erling Smørgrav 65b7579f77SDag-Erling Smørgrav # deny unbound the use this of port number or port range for 66b7579f77SDag-Erling Smørgrav # making outgoing queries, using an outgoing interface. 67b7579f77SDag-Erling Smørgrav # Use this to make sure unbound does not grab a UDP port that some 68b7579f77SDag-Erling Smørgrav # other server on this computer needs. The default is to avoid 69b7579f77SDag-Erling Smørgrav # IANA-assigned port numbers. 708ed2b524SDag-Erling Smørgrav # If multiple outgoing-port-permit and outgoing-port-avoid options 718ed2b524SDag-Erling Smørgrav # are present, they are processed in order. 72b7579f77SDag-Erling Smørgrav # outgoing-port-avoid: "3200-3208" 73b7579f77SDag-Erling Smørgrav 74b7579f77SDag-Erling Smørgrav # number of outgoing simultaneous tcp buffers to hold per thread. 75b7579f77SDag-Erling Smørgrav # outgoing-num-tcp: 10 76b7579f77SDag-Erling Smørgrav 77b7579f77SDag-Erling Smørgrav # number of incoming simultaneous tcp buffers to hold per thread. 78b7579f77SDag-Erling Smørgrav # incoming-num-tcp: 10 79b7579f77SDag-Erling Smørgrav 80b7579f77SDag-Erling Smørgrav # buffer size for UDP port 53 incoming (SO_RCVBUF socket option). 81b7579f77SDag-Erling Smørgrav # 0 is system default. Use 4m to catch query spikes for busy servers. 82b7579f77SDag-Erling Smørgrav # so-rcvbuf: 0 83b7579f77SDag-Erling Smørgrav 84b7579f77SDag-Erling Smørgrav # buffer size for UDP port 53 outgoing (SO_SNDBUF socket option). 85b7579f77SDag-Erling Smørgrav # 0 is system default. Use 4m to handle spikes on very busy servers. 86b7579f77SDag-Erling Smørgrav # so-sndbuf: 0 87b7579f77SDag-Erling Smørgrav 88ff825849SDag-Erling Smørgrav # use SO_REUSEPORT to distribute queries over threads. 8917d15b25SDag-Erling Smørgrav # so-reuseport: no 9017d15b25SDag-Erling Smørgrav 91*09a3aaf3SDag-Erling Smørgrav # use IP_TRANSPARENT so the interface: addresses can be non-local 92*09a3aaf3SDag-Erling Smørgrav # and you can config non-existing IPs that are going to work later on 93*09a3aaf3SDag-Erling Smørgrav # ip-transparent: no 94*09a3aaf3SDag-Erling Smørgrav 95b7579f77SDag-Erling Smørgrav # EDNS reassembly buffer to advertise to UDP peers (the actual buffer 96b7579f77SDag-Erling Smørgrav # is set with msg-buffer-size). 1480 can solve fragmentation (timeouts). 97b7579f77SDag-Erling Smørgrav # edns-buffer-size: 4096 98b7579f77SDag-Erling Smørgrav 9917d15b25SDag-Erling Smørgrav # Maximum UDP response size (not applied to TCP response). 10017d15b25SDag-Erling Smørgrav # Suggested values are 512 to 4096. Default is 4096. 65536 disables it. 10117d15b25SDag-Erling Smørgrav # max-udp-size: 4096 10217d15b25SDag-Erling Smørgrav 103b7579f77SDag-Erling Smørgrav # buffer size for handling DNS data. No messages larger than this 104b7579f77SDag-Erling Smørgrav # size can be sent or received, by UDP or TCP. In bytes. 105b7579f77SDag-Erling Smørgrav # msg-buffer-size: 65552 106b7579f77SDag-Erling Smørgrav 107b7579f77SDag-Erling Smørgrav # the amount of memory to use for the message cache. 108b7579f77SDag-Erling Smørgrav # plain value in bytes or you can append k, m or G. default is "4Mb". 109b7579f77SDag-Erling Smørgrav # msg-cache-size: 4m 110b7579f77SDag-Erling Smørgrav 111b7579f77SDag-Erling Smørgrav # the number of slabs to use for the message cache. 112b7579f77SDag-Erling Smørgrav # the number of slabs must be a power of 2. 113b7579f77SDag-Erling Smørgrav # more slabs reduce lock contention, but fragment memory usage. 114b7579f77SDag-Erling Smørgrav # msg-cache-slabs: 4 115b7579f77SDag-Erling Smørgrav 116b7579f77SDag-Erling Smørgrav # the number of queries that a thread gets to service. 117b7579f77SDag-Erling Smørgrav # num-queries-per-thread: 1024 118b7579f77SDag-Erling Smørgrav 119b7579f77SDag-Erling Smørgrav # if very busy, 50% queries run to completion, 50% get timeout in msec 120b7579f77SDag-Erling Smørgrav # jostle-timeout: 200 121b7579f77SDag-Erling Smørgrav 12217d15b25SDag-Erling Smørgrav # msec to wait before close of port on timeout UDP. 0 disables. 12317d15b25SDag-Erling Smørgrav # delay-close: 0 12417d15b25SDag-Erling Smørgrav 125b7579f77SDag-Erling Smørgrav # the amount of memory to use for the RRset cache. 126b7579f77SDag-Erling Smørgrav # plain value in bytes or you can append k, m or G. default is "4Mb". 127b7579f77SDag-Erling Smørgrav # rrset-cache-size: 4m 128b7579f77SDag-Erling Smørgrav 129b7579f77SDag-Erling Smørgrav # the number of slabs to use for the RRset cache. 130b7579f77SDag-Erling Smørgrav # the number of slabs must be a power of 2. 131b7579f77SDag-Erling Smørgrav # more slabs reduce lock contention, but fragment memory usage. 132b7579f77SDag-Erling Smørgrav # rrset-cache-slabs: 4 133b7579f77SDag-Erling Smørgrav 134b7579f77SDag-Erling Smørgrav # the time to live (TTL) value lower bound, in seconds. Default 0. 135b7579f77SDag-Erling Smørgrav # If more than an hour could easily give trouble due to stale data. 136b7579f77SDag-Erling Smørgrav # cache-min-ttl: 0 137b7579f77SDag-Erling Smørgrav 138b7579f77SDag-Erling Smørgrav # the time to live (TTL) value cap for RRsets and messages in the 139b7579f77SDag-Erling Smørgrav # cache. Items are not cached for longer. In seconds. 140b7579f77SDag-Erling Smørgrav # cache-max-ttl: 86400 141b7579f77SDag-Erling Smørgrav 142*09a3aaf3SDag-Erling Smørgrav # the time to live (TTL) value cap for negative responses in the cache 143*09a3aaf3SDag-Erling Smørgrav # cache-max-negative-ttl: 3600 144*09a3aaf3SDag-Erling Smørgrav 145b7579f77SDag-Erling Smørgrav # the time to live (TTL) value for cached roundtrip times, lameness and 146b7579f77SDag-Erling Smørgrav # EDNS version information for hosts. In seconds. 147b7579f77SDag-Erling Smørgrav # infra-host-ttl: 900 148b7579f77SDag-Erling Smørgrav 1496480faa8SDag-Erling Smørgrav # minimum wait time for responses, increase if uplink is long. In msec. 1506480faa8SDag-Erling Smørgrav # infra-cache-min-rtt: 50 1516480faa8SDag-Erling Smørgrav 152b7579f77SDag-Erling Smørgrav # the number of slabs to use for the Infrastructure cache. 153b7579f77SDag-Erling Smørgrav # the number of slabs must be a power of 2. 154b7579f77SDag-Erling Smørgrav # more slabs reduce lock contention, but fragment memory usage. 155b7579f77SDag-Erling Smørgrav # infra-cache-slabs: 4 156b7579f77SDag-Erling Smørgrav 157b7579f77SDag-Erling Smørgrav # the maximum number of hosts that are cached (roundtrip, EDNS, lame). 158b7579f77SDag-Erling Smørgrav # infra-cache-numhosts: 10000 159b7579f77SDag-Erling Smørgrav 160b7579f77SDag-Erling Smørgrav # Enable IPv4, "yes" or "no". 161b7579f77SDag-Erling Smørgrav # do-ip4: yes 162b7579f77SDag-Erling Smørgrav 163b7579f77SDag-Erling Smørgrav # Enable IPv6, "yes" or "no". 164b7579f77SDag-Erling Smørgrav # do-ip6: yes 165b7579f77SDag-Erling Smørgrav 166b7579f77SDag-Erling Smørgrav # Enable UDP, "yes" or "no". 167b7579f77SDag-Erling Smørgrav # do-udp: yes 168b7579f77SDag-Erling Smørgrav 169b7579f77SDag-Erling Smørgrav # Enable TCP, "yes" or "no". 170b7579f77SDag-Erling Smørgrav # do-tcp: yes 171b7579f77SDag-Erling Smørgrav 172b7579f77SDag-Erling Smørgrav # upstream connections use TCP only (and no UDP), "yes" or "no" 173b7579f77SDag-Erling Smørgrav # useful for tunneling scenarios, default no. 174b7579f77SDag-Erling Smørgrav # tcp-upstream: no 175b7579f77SDag-Erling Smørgrav 176b7579f77SDag-Erling Smørgrav # Detach from the terminal, run in background, "yes" or "no". 177b7579f77SDag-Erling Smørgrav # do-daemonize: yes 178b7579f77SDag-Erling Smørgrav 179b7579f77SDag-Erling Smørgrav # control which clients are allowed to make (recursive) queries 180b7579f77SDag-Erling Smørgrav # to this server. Specify classless netblocks with /size and action. 181b7579f77SDag-Erling Smørgrav # By default everything is refused, except for localhost. 182b7579f77SDag-Erling Smørgrav # Choose deny (drop message), refuse (polite error reply), 183b7579f77SDag-Erling Smørgrav # allow (recursive ok), allow_snoop (recursive and nonrecursive ok) 18417d15b25SDag-Erling Smørgrav # deny_non_local (drop queries unless can be answered from local-data) 18517d15b25SDag-Erling Smørgrav # refuse_non_local (like deny_non_local but polite error reply). 186b7579f77SDag-Erling Smørgrav # access-control: 0.0.0.0/0 refuse 187b7579f77SDag-Erling Smørgrav # access-control: 127.0.0.0/8 allow 188b7579f77SDag-Erling Smørgrav # access-control: ::0/0 refuse 189b7579f77SDag-Erling Smørgrav # access-control: ::1 allow 190b7579f77SDag-Erling Smørgrav # access-control: ::ffff:127.0.0.1 allow 191b7579f77SDag-Erling Smørgrav 192b7579f77SDag-Erling Smørgrav # if given, a chroot(2) is done to the given directory. 193b7579f77SDag-Erling Smørgrav # i.e. you can chroot to the working directory, for example, 194b7579f77SDag-Erling Smørgrav # for extra security, but make sure all files are in that directory. 195b7579f77SDag-Erling Smørgrav # 196b7579f77SDag-Erling Smørgrav # If chroot is enabled, you should pass the configfile (from the 197b7579f77SDag-Erling Smørgrav # commandline) as a full path from the original root. After the 198b7579f77SDag-Erling Smørgrav # chroot has been performed the now defunct portion of the config 199b7579f77SDag-Erling Smørgrav # file path is removed to be able to reread the config after a reload. 200b7579f77SDag-Erling Smørgrav # 201b7579f77SDag-Erling Smørgrav # All other file paths (working dir, logfile, roothints, and 202b7579f77SDag-Erling Smørgrav # key files) can be specified in several ways: 203b7579f77SDag-Erling Smørgrav # o as an absolute path relative to the new root. 204b7579f77SDag-Erling Smørgrav # o as a relative path to the working directory. 205b7579f77SDag-Erling Smørgrav # o as an absolute path relative to the original root. 206b7579f77SDag-Erling Smørgrav # In the last case the path is adjusted to remove the unused portion. 207b7579f77SDag-Erling Smørgrav # 208b7579f77SDag-Erling Smørgrav # The pid file can be absolute and outside of the chroot, it is 209b7579f77SDag-Erling Smørgrav # written just prior to performing the chroot and dropping permissions. 210b7579f77SDag-Erling Smørgrav # 211b7579f77SDag-Erling Smørgrav # Additionally, unbound may need to access /dev/random (for entropy). 212b7579f77SDag-Erling Smørgrav # How to do this is specific to your OS. 213b7579f77SDag-Erling Smørgrav # 214b7579f77SDag-Erling Smørgrav # If you give "" no chroot is performed. The path must not end in a /. 215b7579f77SDag-Erling Smørgrav # chroot: "@UNBOUND_CHROOT_DIR@" 216b7579f77SDag-Erling Smørgrav 217b7579f77SDag-Erling Smørgrav # if given, user privileges are dropped (after binding port), 218b7579f77SDag-Erling Smørgrav # and the given username is assumed. Default is user "unbound". 219b7579f77SDag-Erling Smørgrav # If you give "" no privileges are dropped. 220b7579f77SDag-Erling Smørgrav # username: "@UNBOUND_USERNAME@" 221b7579f77SDag-Erling Smørgrav 222b7579f77SDag-Erling Smørgrav # the working directory. The relative files in this config are 223b7579f77SDag-Erling Smørgrav # relative to this directory. If you give "" the working directory 224b7579f77SDag-Erling Smørgrav # is not changed. 225b7579f77SDag-Erling Smørgrav # directory: "@UNBOUND_RUN_DIR@" 226b7579f77SDag-Erling Smørgrav 227b7579f77SDag-Erling Smørgrav # the log file, "" means log to stderr. 228b7579f77SDag-Erling Smørgrav # Use of this option sets use-syslog to "no". 229b7579f77SDag-Erling Smørgrav # logfile: "" 230b7579f77SDag-Erling Smørgrav 231b7579f77SDag-Erling Smørgrav # Log to syslog(3) if yes. The log facility LOG_DAEMON is used to 232b7579f77SDag-Erling Smørgrav # log to, with identity "unbound". If yes, it overrides the logfile. 233b7579f77SDag-Erling Smørgrav # use-syslog: yes 234b7579f77SDag-Erling Smørgrav 235b7579f77SDag-Erling Smørgrav # print UTC timestamp in ascii to logfile, default is epoch in seconds. 236b7579f77SDag-Erling Smørgrav # log-time-ascii: no 237b7579f77SDag-Erling Smørgrav 238b7579f77SDag-Erling Smørgrav # print one line with time, IP, name, type, class for every query. 239b7579f77SDag-Erling Smørgrav # log-queries: no 240b7579f77SDag-Erling Smørgrav 241b7579f77SDag-Erling Smørgrav # the pid file. Can be an absolute path outside of chroot/work dir. 242b7579f77SDag-Erling Smørgrav # pidfile: "@UNBOUND_PIDFILE@" 243b7579f77SDag-Erling Smørgrav 244b7579f77SDag-Erling Smørgrav # file to read root hints from. 245b7579f77SDag-Erling Smørgrav # get one from ftp://FTP.INTERNIC.NET/domain/named.cache 246b7579f77SDag-Erling Smørgrav # root-hints: "" 247b7579f77SDag-Erling Smørgrav 248b7579f77SDag-Erling Smørgrav # enable to not answer id.server and hostname.bind queries. 249b7579f77SDag-Erling Smørgrav # hide-identity: no 250b7579f77SDag-Erling Smørgrav 251b7579f77SDag-Erling Smørgrav # enable to not answer version.server and version.bind queries. 252b7579f77SDag-Erling Smørgrav # hide-version: no 253b7579f77SDag-Erling Smørgrav 254b7579f77SDag-Erling Smørgrav # the identity to report. Leave "" or default to return hostname. 255b7579f77SDag-Erling Smørgrav # identity: "" 256b7579f77SDag-Erling Smørgrav 257b7579f77SDag-Erling Smørgrav # the version to report. Leave "" or default to return package version. 258b7579f77SDag-Erling Smørgrav # version: "" 259b7579f77SDag-Erling Smørgrav 260b7579f77SDag-Erling Smørgrav # the target fetch policy. 261b7579f77SDag-Erling Smørgrav # series of integers describing the policy per dependency depth. 262b7579f77SDag-Erling Smørgrav # The number of values in the list determines the maximum dependency 263b7579f77SDag-Erling Smørgrav # depth the recursor will pursue before giving up. Each integer means: 264b7579f77SDag-Erling Smørgrav # -1 : fetch all targets opportunistically, 265b7579f77SDag-Erling Smørgrav # 0: fetch on demand, 266b7579f77SDag-Erling Smørgrav # positive value: fetch that many targets opportunistically. 267b7579f77SDag-Erling Smørgrav # Enclose the list of numbers between quotes (""). 268b7579f77SDag-Erling Smørgrav # target-fetch-policy: "3 2 1 0 0" 269b7579f77SDag-Erling Smørgrav 270b7579f77SDag-Erling Smørgrav # Harden against very small EDNS buffer sizes. 271b7579f77SDag-Erling Smørgrav # harden-short-bufsize: no 272b7579f77SDag-Erling Smørgrav 273b7579f77SDag-Erling Smørgrav # Harden against unseemly large queries. 274b7579f77SDag-Erling Smørgrav # harden-large-queries: no 275b7579f77SDag-Erling Smørgrav 276b7579f77SDag-Erling Smørgrav # Harden against out of zone rrsets, to avoid spoofing attempts. 277b7579f77SDag-Erling Smørgrav # harden-glue: yes 278b7579f77SDag-Erling Smørgrav 279b7579f77SDag-Erling Smørgrav # Harden against receiving dnssec-stripped data. If you turn it 280b7579f77SDag-Erling Smørgrav # off, failing to validate dnskey data for a trustanchor will 281b7579f77SDag-Erling Smørgrav # trigger insecure mode for that zone (like without a trustanchor). 282b7579f77SDag-Erling Smørgrav # Default on, which insists on dnssec data for trust-anchored zones. 283b7579f77SDag-Erling Smørgrav # harden-dnssec-stripped: yes 284b7579f77SDag-Erling Smørgrav 285b7579f77SDag-Erling Smørgrav # Harden against queries that fall under dnssec-signed nxdomain names. 286b7579f77SDag-Erling Smørgrav # harden-below-nxdomain: no 287b7579f77SDag-Erling Smørgrav 288b7579f77SDag-Erling Smørgrav # Harden the referral path by performing additional queries for 289b7579f77SDag-Erling Smørgrav # infrastructure data. Validates the replies (if possible). 290b7579f77SDag-Erling Smørgrav # Default off, because the lookups burden the server. Experimental 291b7579f77SDag-Erling Smørgrav # implementation of draft-wijngaards-dnsext-resolver-side-mitigation. 292b7579f77SDag-Erling Smørgrav # harden-referral-path: no 293b7579f77SDag-Erling Smørgrav 294*09a3aaf3SDag-Erling Smørgrav # Harden against algorithm downgrade when multiple algorithms are 295*09a3aaf3SDag-Erling Smørgrav # advertised in the DS record. If no, allows the weakest algorithm 296*09a3aaf3SDag-Erling Smørgrav # to validate the zone. 297*09a3aaf3SDag-Erling Smørgrav # harden-algo-downgrade: yes 298*09a3aaf3SDag-Erling Smørgrav 299b7579f77SDag-Erling Smørgrav # Use 0x20-encoded random bits in the query to foil spoof attempts. 300b7579f77SDag-Erling Smørgrav # This feature is an experimental implementation of draft dns-0x20. 301b7579f77SDag-Erling Smørgrav # use-caps-for-id: no 302b7579f77SDag-Erling Smørgrav 303*09a3aaf3SDag-Erling Smørgrav # Domains (and domains in them) without support for dns-0x20 and 304*09a3aaf3SDag-Erling Smørgrav # the fallback fails because they keep sending different answers. 305*09a3aaf3SDag-Erling Smørgrav # caps-whitelist: "licdn.com" 306*09a3aaf3SDag-Erling Smørgrav 307b7579f77SDag-Erling Smørgrav # Enforce privacy of these addresses. Strips them away from answers. 308b7579f77SDag-Erling Smørgrav # It may cause DNSSEC validation to additionally mark it as bogus. 309b7579f77SDag-Erling Smørgrav # Protects against 'DNS Rebinding' (uses browser as network proxy). 310b7579f77SDag-Erling Smørgrav # Only 'private-domain' and 'local-data' names are allowed to have 311b7579f77SDag-Erling Smørgrav # these private addresses. No default. 312b7579f77SDag-Erling Smørgrav # private-address: 10.0.0.0/8 313b7579f77SDag-Erling Smørgrav # private-address: 172.16.0.0/12 314b7579f77SDag-Erling Smørgrav # private-address: 192.168.0.0/16 315b7579f77SDag-Erling Smørgrav # private-address: 169.254.0.0/16 316b7579f77SDag-Erling Smørgrav # private-address: fd00::/8 317b7579f77SDag-Erling Smørgrav # private-address: fe80::/10 318b7579f77SDag-Erling Smørgrav 319b7579f77SDag-Erling Smørgrav # Allow the domain (and its subdomains) to contain private addresses. 320b7579f77SDag-Erling Smørgrav # local-data statements are allowed to contain private addresses too. 321b7579f77SDag-Erling Smørgrav # private-domain: "example.com" 322b7579f77SDag-Erling Smørgrav 323b7579f77SDag-Erling Smørgrav # If nonzero, unwanted replies are not only reported in statistics, 324b7579f77SDag-Erling Smørgrav # but also a running total is kept per thread. If it reaches the 325b7579f77SDag-Erling Smørgrav # threshold, a warning is printed and a defensive action is taken, 326b7579f77SDag-Erling Smørgrav # the cache is cleared to flush potential poison out of it. 327b7579f77SDag-Erling Smørgrav # A suggested value is 10000000, the default is 0 (turned off). 328b7579f77SDag-Erling Smørgrav # unwanted-reply-threshold: 0 329b7579f77SDag-Erling Smørgrav 330b7579f77SDag-Erling Smørgrav # Do not query the following addresses. No DNS queries are sent there. 331b7579f77SDag-Erling Smørgrav # List one address per entry. List classless netblocks with /size, 332b7579f77SDag-Erling Smørgrav # do-not-query-address: 127.0.0.1/8 333b7579f77SDag-Erling Smørgrav # do-not-query-address: ::1 334b7579f77SDag-Erling Smørgrav 335b7579f77SDag-Erling Smørgrav # if yes, the above default do-not-query-address entries are present. 336b7579f77SDag-Erling Smørgrav # if no, localhost can be queried (for testing and debugging). 337b7579f77SDag-Erling Smørgrav # do-not-query-localhost: yes 338b7579f77SDag-Erling Smørgrav 339b7579f77SDag-Erling Smørgrav # if yes, perform prefetching of almost expired message cache entries. 340b7579f77SDag-Erling Smørgrav # prefetch: no 341b7579f77SDag-Erling Smørgrav 342b7579f77SDag-Erling Smørgrav # if yes, perform key lookups adjacent to normal lookups. 343b7579f77SDag-Erling Smørgrav # prefetch-key: no 344b7579f77SDag-Erling Smørgrav 345b7579f77SDag-Erling Smørgrav # if yes, Unbound rotates RRSet order in response. 346b7579f77SDag-Erling Smørgrav # rrset-roundrobin: no 347b7579f77SDag-Erling Smørgrav 348b7579f77SDag-Erling Smørgrav # if yes, Unbound doesn't insert authority/additional sections 349b7579f77SDag-Erling Smørgrav # into response messages when those sections are not required. 350b7579f77SDag-Erling Smørgrav # minimal-responses: no 351b7579f77SDag-Erling Smørgrav 352b7579f77SDag-Erling Smørgrav # module configuration of the server. A string with identifiers 353ff825849SDag-Erling Smørgrav # separated by spaces. Syntax: "[dns64] [validator] iterator" 354b7579f77SDag-Erling Smørgrav # module-config: "validator iterator" 355b7579f77SDag-Erling Smørgrav 356b7579f77SDag-Erling Smørgrav # File with trusted keys, kept uptodate using RFC5011 probes, 357b7579f77SDag-Erling Smørgrav # initial file like trust-anchor-file, then it stores metadata. 358b7579f77SDag-Erling Smørgrav # Use several entries, one per domain name, to track multiple zones. 359b7579f77SDag-Erling Smørgrav # 360b7579f77SDag-Erling Smørgrav # If you want to perform DNSSEC validation, run unbound-anchor before 361b7579f77SDag-Erling Smørgrav # you start unbound (i.e. in the system boot scripts). And enable: 362b7579f77SDag-Erling Smørgrav # Please note usage of unbound-anchor root anchor is at your own risk 363b7579f77SDag-Erling Smørgrav # and under the terms of our LICENSE (see that file in the source). 364b7579f77SDag-Erling Smørgrav # auto-trust-anchor-file: "@UNBOUND_ROOTKEY_FILE@" 365b7579f77SDag-Erling Smørgrav 366b7579f77SDag-Erling Smørgrav # File with DLV trusted keys. Same format as trust-anchor-file. 367b7579f77SDag-Erling Smørgrav # There can be only one DLV configured, it is trusted from root down. 368*09a3aaf3SDag-Erling Smørgrav # DLV is going to be decommissioned. Please do not use it any more. 369b7579f77SDag-Erling Smørgrav # dlv-anchor-file: "dlv.isc.org.key" 370b7579f77SDag-Erling Smørgrav 371b7579f77SDag-Erling Smørgrav # File with trusted keys for validation. Specify more than one file 372b7579f77SDag-Erling Smørgrav # with several entries, one file per entry. 373b7579f77SDag-Erling Smørgrav # Zone file format, with DS and DNSKEY entries. 374b7579f77SDag-Erling Smørgrav # Note this gets out of date, use auto-trust-anchor-file please. 375b7579f77SDag-Erling Smørgrav # trust-anchor-file: "" 376b7579f77SDag-Erling Smørgrav 377b7579f77SDag-Erling Smørgrav # Trusted key for validation. DS or DNSKEY. specify the RR on a 378b7579f77SDag-Erling Smørgrav # single line, surrounded by "". TTL is ignored. class is IN default. 379b7579f77SDag-Erling Smørgrav # Note this gets out of date, use auto-trust-anchor-file please. 380b7579f77SDag-Erling Smørgrav # (These examples are from August 2007 and may not be valid anymore). 381b7579f77SDag-Erling Smørgrav # trust-anchor: "nlnetlabs.nl. DNSKEY 257 3 5 AQPzzTWMz8qSWIQlfRnPckx2BiVmkVN6LPupO3mbz7FhLSnm26n6iG9N Lby97Ji453aWZY3M5/xJBSOS2vWtco2t8C0+xeO1bc/d6ZTy32DHchpW 6rDH1vp86Ll+ha0tmwyy9QP7y2bVw5zSbFCrefk8qCUBgfHm9bHzMG1U BYtEIQ==" 382b7579f77SDag-Erling Smørgrav # trust-anchor: "jelte.nlnetlabs.nl. DS 42860 5 1 14D739EB566D2B1A5E216A0BA4D17FA9B038BE4A" 383b7579f77SDag-Erling Smørgrav 384b7579f77SDag-Erling Smørgrav # File with trusted keys for validation. Specify more than one file 385b7579f77SDag-Erling Smørgrav # with several entries, one file per entry. Like trust-anchor-file 386b7579f77SDag-Erling Smørgrav # but has a different file format. Format is BIND-9 style format, 387b7579f77SDag-Erling Smørgrav # the trusted-keys { name flag proto algo "key"; }; clauses are read. 388b7579f77SDag-Erling Smørgrav # you need external update procedures to track changes in keys. 389b7579f77SDag-Erling Smørgrav # trusted-keys-file: "" 390b7579f77SDag-Erling Smørgrav 391b7579f77SDag-Erling Smørgrav # Ignore chain of trust. Domain is treated as insecure. 392b7579f77SDag-Erling Smørgrav # domain-insecure: "example.com" 393b7579f77SDag-Erling Smørgrav 394b7579f77SDag-Erling Smørgrav # Override the date for validation with a specific fixed date. 395b7579f77SDag-Erling Smørgrav # Do not set this unless you are debugging signature inception 396b7579f77SDag-Erling Smørgrav # and expiration. "" or "0" turns the feature off. -1 ignores date. 397b7579f77SDag-Erling Smørgrav # val-override-date: "" 398b7579f77SDag-Erling Smørgrav 399b7579f77SDag-Erling Smørgrav # The time to live for bogus data, rrsets and messages. This avoids 400b7579f77SDag-Erling Smørgrav # some of the revalidation, until the time interval expires. in secs. 401b7579f77SDag-Erling Smørgrav # val-bogus-ttl: 60 402b7579f77SDag-Erling Smørgrav 403b7579f77SDag-Erling Smørgrav # The signature inception and expiration dates are allowed to be off 404b7579f77SDag-Erling Smørgrav # by 10% of the signature lifetime (expir-incep) from our local clock. 405b7579f77SDag-Erling Smørgrav # This leeway is capped with a minimum and a maximum. In seconds. 406b7579f77SDag-Erling Smørgrav # val-sig-skew-min: 3600 407b7579f77SDag-Erling Smørgrav # val-sig-skew-max: 86400 408b7579f77SDag-Erling Smørgrav 409b7579f77SDag-Erling Smørgrav # Should additional section of secure message also be kept clean of 410b7579f77SDag-Erling Smørgrav # unsecure data. Useful to shield the users of this validator from 411b7579f77SDag-Erling Smørgrav # potential bogus data in the additional section. All unsigned data 412b7579f77SDag-Erling Smørgrav # in the additional section is removed from secure messages. 413b7579f77SDag-Erling Smørgrav # val-clean-additional: yes 414b7579f77SDag-Erling Smørgrav 415b7579f77SDag-Erling Smørgrav # Turn permissive mode on to permit bogus messages. Thus, messages 416b7579f77SDag-Erling Smørgrav # for which security checks failed will be returned to clients, 417b7579f77SDag-Erling Smørgrav # instead of SERVFAIL. It still performs the security checks, which 418b7579f77SDag-Erling Smørgrav # result in interesting log files and possibly the AD bit in 419b7579f77SDag-Erling Smørgrav # replies if the message is found secure. The default is off. 420b7579f77SDag-Erling Smørgrav # val-permissive-mode: no 421b7579f77SDag-Erling Smørgrav 422b7579f77SDag-Erling Smørgrav # Ignore the CD flag in incoming queries and refuse them bogus data. 423b7579f77SDag-Erling Smørgrav # Enable it if the only clients of unbound are legacy servers (w2008) 424b7579f77SDag-Erling Smørgrav # that set CD but cannot validate themselves. 425b7579f77SDag-Erling Smørgrav # ignore-cd-flag: no 426b7579f77SDag-Erling Smørgrav 427b7579f77SDag-Erling Smørgrav # Have the validator log failed validations for your diagnosis. 428b7579f77SDag-Erling Smørgrav # 0: off. 1: A line per failed user query. 2: With reason and bad IP. 429b7579f77SDag-Erling Smørgrav # val-log-level: 0 430b7579f77SDag-Erling Smørgrav 431b7579f77SDag-Erling Smørgrav # It is possible to configure NSEC3 maximum iteration counts per 432b7579f77SDag-Erling Smørgrav # keysize. Keep this table very short, as linear search is done. 433b7579f77SDag-Erling Smørgrav # A message with an NSEC3 with larger count is marked insecure. 434b7579f77SDag-Erling Smørgrav # List in ascending order the keysize and count values. 435b7579f77SDag-Erling Smørgrav # val-nsec3-keysize-iterations: "1024 150 2048 500 4096 2500" 436b7579f77SDag-Erling Smørgrav 437b7579f77SDag-Erling Smørgrav # instruct the auto-trust-anchor-file probing to add anchors after ttl. 438b7579f77SDag-Erling Smørgrav # add-holddown: 2592000 # 30 days 439b7579f77SDag-Erling Smørgrav 440b7579f77SDag-Erling Smørgrav # instruct the auto-trust-anchor-file probing to del anchors after ttl. 441b7579f77SDag-Erling Smørgrav # del-holddown: 2592000 # 30 days 442b7579f77SDag-Erling Smørgrav 443b7579f77SDag-Erling Smørgrav # auto-trust-anchor-file probing removes missing anchors after ttl. 444b7579f77SDag-Erling Smørgrav # If the value 0 is given, missing anchors are not removed. 445b7579f77SDag-Erling Smørgrav # keep-missing: 31622400 # 366 days 446b7579f77SDag-Erling Smørgrav 447b7579f77SDag-Erling Smørgrav # the amount of memory to use for the key cache. 448b7579f77SDag-Erling Smørgrav # plain value in bytes or you can append k, m or G. default is "4Mb". 449b7579f77SDag-Erling Smørgrav # key-cache-size: 4m 450b7579f77SDag-Erling Smørgrav 451b7579f77SDag-Erling Smørgrav # the number of slabs to use for the key cache. 452b7579f77SDag-Erling Smørgrav # the number of slabs must be a power of 2. 453b7579f77SDag-Erling Smørgrav # more slabs reduce lock contention, but fragment memory usage. 454b7579f77SDag-Erling Smørgrav # key-cache-slabs: 4 455b7579f77SDag-Erling Smørgrav 456b7579f77SDag-Erling Smørgrav # the amount of memory to use for the negative cache (used for DLV). 457b7579f77SDag-Erling Smørgrav # plain value in bytes or you can append k, m or G. default is "1Mb". 458b7579f77SDag-Erling Smørgrav # neg-cache-size: 1m 459b7579f77SDag-Erling Smørgrav 46017d15b25SDag-Erling Smørgrav # By default, for a number of zones a small default 'nothing here' 46117d15b25SDag-Erling Smørgrav # reply is built-in. Query traffic is thus blocked. If you 46217d15b25SDag-Erling Smørgrav # wish to serve such zone you can unblock them by uncommenting one 46317d15b25SDag-Erling Smørgrav # of the nodefault statements below. 46417d15b25SDag-Erling Smørgrav # You may also have to use domain-insecure: zone to make DNSSEC work, 46517d15b25SDag-Erling Smørgrav # unless you have your own trust anchors for this zone. 46617d15b25SDag-Erling Smørgrav # local-zone: "localhost." nodefault 46717d15b25SDag-Erling Smørgrav # local-zone: "127.in-addr.arpa." nodefault 46817d15b25SDag-Erling Smørgrav # 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 46917d15b25SDag-Erling Smørgrav # local-zone: "10.in-addr.arpa." nodefault 47017d15b25SDag-Erling Smørgrav # local-zone: "16.172.in-addr.arpa." nodefault 47117d15b25SDag-Erling Smørgrav # local-zone: "17.172.in-addr.arpa." nodefault 47217d15b25SDag-Erling Smørgrav # local-zone: "18.172.in-addr.arpa." nodefault 47317d15b25SDag-Erling Smørgrav # local-zone: "19.172.in-addr.arpa." nodefault 47417d15b25SDag-Erling Smørgrav # local-zone: "20.172.in-addr.arpa." nodefault 47517d15b25SDag-Erling Smørgrav # local-zone: "21.172.in-addr.arpa." nodefault 47617d15b25SDag-Erling Smørgrav # local-zone: "22.172.in-addr.arpa." nodefault 47717d15b25SDag-Erling Smørgrav # local-zone: "23.172.in-addr.arpa." nodefault 47817d15b25SDag-Erling Smørgrav # local-zone: "24.172.in-addr.arpa." nodefault 47917d15b25SDag-Erling Smørgrav # local-zone: "25.172.in-addr.arpa." nodefault 48017d15b25SDag-Erling Smørgrav # local-zone: "26.172.in-addr.arpa." nodefault 48117d15b25SDag-Erling Smørgrav # local-zone: "27.172.in-addr.arpa." nodefault 48217d15b25SDag-Erling Smørgrav # local-zone: "28.172.in-addr.arpa." nodefault 48317d15b25SDag-Erling Smørgrav # local-zone: "29.172.in-addr.arpa." nodefault 48417d15b25SDag-Erling Smørgrav # local-zone: "30.172.in-addr.arpa." nodefault 48517d15b25SDag-Erling Smørgrav # local-zone: "31.172.in-addr.arpa." nodefault 48617d15b25SDag-Erling Smørgrav # local-zone: "168.192.in-addr.arpa." nodefault 48717d15b25SDag-Erling Smørgrav # local-zone: "0.in-addr.arpa." nodefault 48817d15b25SDag-Erling Smørgrav # local-zone: "254.169.in-addr.arpa." nodefault 48917d15b25SDag-Erling Smørgrav # local-zone: "2.0.192.in-addr.arpa." nodefault 49017d15b25SDag-Erling Smørgrav # local-zone: "100.51.198.in-addr.arpa." nodefault 49117d15b25SDag-Erling Smørgrav # local-zone: "113.0.203.in-addr.arpa." nodefault 49217d15b25SDag-Erling Smørgrav # local-zone: "255.255.255.255.in-addr.arpa." nodefault 49317d15b25SDag-Erling Smørgrav # 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 49417d15b25SDag-Erling Smørgrav # local-zone: "d.f.ip6.arpa." nodefault 49517d15b25SDag-Erling Smørgrav # local-zone: "8.e.f.ip6.arpa." nodefault 49617d15b25SDag-Erling Smørgrav # local-zone: "9.e.f.ip6.arpa." nodefault 49717d15b25SDag-Erling Smørgrav # local-zone: "a.e.f.ip6.arpa." nodefault 49817d15b25SDag-Erling Smørgrav # local-zone: "b.e.f.ip6.arpa." nodefault 49917d15b25SDag-Erling Smørgrav # local-zone: "8.b.d.0.1.0.0.2.ip6.arpa." nodefault 500ff825849SDag-Erling Smørgrav # And for 64.100.in-addr.arpa. to 127.100.in-addr.arpa. 501ff825849SDag-Erling Smørgrav 502ff825849SDag-Erling Smørgrav # if unbound is running service for the local host then it is useful 503ff825849SDag-Erling Smørgrav # to perform lan-wide lookups to the upstream, and unblock the 504ff825849SDag-Erling Smørgrav # long list of local-zones above. If this unbound is a dns server 505ff825849SDag-Erling Smørgrav # for a network of computers, disabled is better and stops information 506ff825849SDag-Erling Smørgrav # leakage of local lan information. 507ff825849SDag-Erling Smørgrav # unblock-lan-zones: no 50817d15b25SDag-Erling Smørgrav 509b7579f77SDag-Erling Smørgrav # a number of locally served zones can be configured. 510b7579f77SDag-Erling Smørgrav # local-zone: <zone> <type> 511b7579f77SDag-Erling Smørgrav # local-data: "<resource record string>" 512b7579f77SDag-Erling Smørgrav # o deny serves local data (if any), else, drops queries. 513b7579f77SDag-Erling Smørgrav # o refuse serves local data (if any), else, replies with error. 514b7579f77SDag-Erling Smørgrav # o static serves local data, else, nxdomain or nodata answer. 515b7579f77SDag-Erling Smørgrav # o transparent gives local data, but resolves normally for other names 516b7579f77SDag-Erling Smørgrav # o redirect serves the zone data for any subdomain in the zone. 517b7579f77SDag-Erling Smørgrav # o nodefault can be used to normally resolve AS112 zones. 518b7579f77SDag-Erling Smørgrav # o typetransparent resolves normally for other types and other names 5196480faa8SDag-Erling Smørgrav # o inform resolves normally, but logs client IP address 520*09a3aaf3SDag-Erling Smørgrav # o inform_deny drops queries and logs client IP address 521b7579f77SDag-Erling Smørgrav # 522b7579f77SDag-Erling Smørgrav # defaults are localhost address, reverse for 127.0.0.1 and ::1 523b7579f77SDag-Erling Smørgrav # and nxdomain for AS112 zones. If you configure one of these zones 524b7579f77SDag-Erling Smørgrav # the default content is omitted, or you can omit it with 'nodefault'. 525b7579f77SDag-Erling Smørgrav # 526b7579f77SDag-Erling Smørgrav # If you configure local-data without specifying local-zone, by 527b7579f77SDag-Erling Smørgrav # default a transparent local-zone is created for the data. 528b7579f77SDag-Erling Smørgrav # 529b7579f77SDag-Erling Smørgrav # You can add locally served data with 530b7579f77SDag-Erling Smørgrav # local-zone: "local." static 531b7579f77SDag-Erling Smørgrav # local-data: "mycomputer.local. IN A 192.0.2.51" 532b7579f77SDag-Erling Smørgrav # local-data: 'mytext.local TXT "content of text record"' 533b7579f77SDag-Erling Smørgrav # 534b7579f77SDag-Erling Smørgrav # You can override certain queries with 535b7579f77SDag-Erling Smørgrav # local-data: "adserver.example.com A 127.0.0.1" 536b7579f77SDag-Erling Smørgrav # 537b7579f77SDag-Erling Smørgrav # You can redirect a domain to a fixed address with 538b7579f77SDag-Erling Smørgrav # (this makes example.com, www.example.com, etc, all go to 192.0.2.3) 539b7579f77SDag-Erling Smørgrav # local-zone: "example.com" redirect 540b7579f77SDag-Erling Smørgrav # local-data: "example.com A 192.0.2.3" 541b7579f77SDag-Erling Smørgrav # 542b7579f77SDag-Erling Smørgrav # Shorthand to make PTR records, "IPv4 name" or "IPv6 name". 543b7579f77SDag-Erling Smørgrav # You can also add PTR records using local-data directly, but then 544b7579f77SDag-Erling Smørgrav # you need to do the reverse notation yourself. 545b7579f77SDag-Erling Smørgrav # local-data-ptr: "192.0.2.3 www.example.com" 546b7579f77SDag-Erling Smørgrav 547b7579f77SDag-Erling Smørgrav # service clients over SSL (on the TCP sockets), with plain DNS inside 548b7579f77SDag-Erling Smørgrav # the SSL stream. Give the certificate to use and private key. 549b7579f77SDag-Erling Smørgrav # default is "" (disabled). requires restart to take effect. 550b7579f77SDag-Erling Smørgrav # ssl-service-key: "path/to/privatekeyfile.key" 551b7579f77SDag-Erling Smørgrav # ssl-service-pem: "path/to/publiccertfile.pem" 552b7579f77SDag-Erling Smørgrav # ssl-port: 443 553b7579f77SDag-Erling Smørgrav 554b7579f77SDag-Erling Smørgrav # request upstream over SSL (with plain DNS inside the SSL stream). 555b7579f77SDag-Erling Smørgrav # Default is no. Can be turned on and off with unbound-control. 556b7579f77SDag-Erling Smørgrav # ssl-upstream: no 557b7579f77SDag-Erling Smørgrav 558ff825849SDag-Erling Smørgrav # DNS64 prefix. Must be specified when DNS64 is use. 559ff825849SDag-Erling Smørgrav # Enable dns64 in module-config. Used to synthesize IPv6 from IPv4. 560ff825849SDag-Erling Smørgrav # dns64-prefix: 64:ff9b::0/96 561ff825849SDag-Erling Smørgrav 562*09a3aaf3SDag-Erling Smørgrav # ratelimit for uncached, new queries, this limits recursion effort. 563*09a3aaf3SDag-Erling Smørgrav # ratelimiting is experimental, and may help against randomqueryflood. 564*09a3aaf3SDag-Erling Smørgrav # if 0(default) it is disabled, otherwise state qps allowed per zone. 565*09a3aaf3SDag-Erling Smørgrav # ratelimit: 0 566*09a3aaf3SDag-Erling Smørgrav 567*09a3aaf3SDag-Erling Smørgrav # ratelimits are tracked in a cache, size in bytes of cache (or k,m). 568*09a3aaf3SDag-Erling Smørgrav # ratelimit-size: 4m 569*09a3aaf3SDag-Erling Smørgrav # ratelimit cache slabs, reduces lock contention if equal to cpucount. 570*09a3aaf3SDag-Erling Smørgrav # ratelimit-slabs: 4 571*09a3aaf3SDag-Erling Smørgrav 572*09a3aaf3SDag-Erling Smørgrav # 0 blocks when ratelimited, otherwise let 1/xth traffic through 573*09a3aaf3SDag-Erling Smørgrav # ratelimit-factor: 10 574*09a3aaf3SDag-Erling Smørgrav 575*09a3aaf3SDag-Erling Smørgrav # override the ratelimit for a specific domain name. 576*09a3aaf3SDag-Erling Smørgrav # give this setting multiple times to have multiple overrides. 577*09a3aaf3SDag-Erling Smørgrav # ratelimit-for-domain: example.com 1000 578*09a3aaf3SDag-Erling Smørgrav # override the ratelimits for all domains below a domain name 579*09a3aaf3SDag-Erling Smørgrav # can give this multiple times, the name closest to the zone is used. 580*09a3aaf3SDag-Erling Smørgrav # ratelimit-below-domain: example 1000 581*09a3aaf3SDag-Erling Smørgrav 582b7579f77SDag-Erling Smørgrav# Python config section. To enable: 583b7579f77SDag-Erling Smørgrav# o use --with-pythonmodule to configure before compiling. 584b7579f77SDag-Erling Smørgrav# o list python in the module-config string (above) to enable. 585b7579f77SDag-Erling Smørgrav# o and give a python-script to run. 586b7579f77SDag-Erling Smørgravpython: 587b7579f77SDag-Erling Smørgrav # Script file to load 588b7579f77SDag-Erling Smørgrav # python-script: "@UNBOUND_SHARE_DIR@/ubmodule-tst.py" 589b7579f77SDag-Erling Smørgrav 590b7579f77SDag-Erling Smørgrav# Remote control config section. 591b7579f77SDag-Erling Smørgravremote-control: 592b7579f77SDag-Erling Smørgrav # Enable remote control with unbound-control(8) here. 593b7579f77SDag-Erling Smørgrav # set up the keys and certificates with unbound-control-setup. 594b7579f77SDag-Erling Smørgrav # control-enable: no 595b7579f77SDag-Erling Smørgrav 5966480faa8SDag-Erling Smørgrav # Set to no and use an absolute path as control-interface to use 5976480faa8SDag-Erling Smørgrav # a unix local named pipe for unbound-control. 5986480faa8SDag-Erling Smørgrav # control-use-cert: yes 5996480faa8SDag-Erling Smørgrav 600b7579f77SDag-Erling Smørgrav # what interfaces are listened to for remote control. 601b7579f77SDag-Erling Smørgrav # give 0.0.0.0 and ::0 to listen to all interfaces. 602b7579f77SDag-Erling Smørgrav # control-interface: 127.0.0.1 603b7579f77SDag-Erling Smørgrav # control-interface: ::1 604b7579f77SDag-Erling Smørgrav 605b7579f77SDag-Erling Smørgrav # port number for remote control operations. 606b7579f77SDag-Erling Smørgrav # control-port: 8953 607b7579f77SDag-Erling Smørgrav 608b7579f77SDag-Erling Smørgrav # unbound server key file. 609b7579f77SDag-Erling Smørgrav # server-key-file: "@UNBOUND_RUN_DIR@/unbound_server.key" 610b7579f77SDag-Erling Smørgrav 611b7579f77SDag-Erling Smørgrav # unbound server certificate file. 612b7579f77SDag-Erling Smørgrav # server-cert-file: "@UNBOUND_RUN_DIR@/unbound_server.pem" 613b7579f77SDag-Erling Smørgrav 614b7579f77SDag-Erling Smørgrav # unbound-control key file. 615b7579f77SDag-Erling Smørgrav # control-key-file: "@UNBOUND_RUN_DIR@/unbound_control.key" 616b7579f77SDag-Erling Smørgrav 617b7579f77SDag-Erling Smørgrav # unbound-control certificate file. 618b7579f77SDag-Erling Smørgrav # control-cert-file: "@UNBOUND_RUN_DIR@/unbound_control.pem" 619b7579f77SDag-Erling Smørgrav 620b7579f77SDag-Erling Smørgrav# Stub zones. 621b7579f77SDag-Erling Smørgrav# Create entries like below, to make all queries for 'example.com' and 622b7579f77SDag-Erling Smørgrav# 'example.org' go to the given list of nameservers. list zero or more 623b7579f77SDag-Erling Smørgrav# nameservers by hostname or by ipaddress. If you set stub-prime to yes, 624b7579f77SDag-Erling Smørgrav# the list is treated as priming hints (default is no). 625b7579f77SDag-Erling Smørgrav# With stub-first yes, it attempts without the stub if it fails. 626b7579f77SDag-Erling Smørgrav# stub-zone: 627b7579f77SDag-Erling Smørgrav# name: "example.com" 628b7579f77SDag-Erling Smørgrav# stub-addr: 192.0.2.68 629b7579f77SDag-Erling Smørgrav# stub-prime: no 630b7579f77SDag-Erling Smørgrav# stub-first: no 631b7579f77SDag-Erling Smørgrav# stub-zone: 632b7579f77SDag-Erling Smørgrav# name: "example.org" 633b7579f77SDag-Erling Smørgrav# stub-host: ns.example.com. 634b7579f77SDag-Erling Smørgrav 635b7579f77SDag-Erling Smørgrav# Forward zones 636b7579f77SDag-Erling Smørgrav# Create entries like below, to make all queries for 'example.com' and 637b7579f77SDag-Erling Smørgrav# 'example.org' go to the given list of servers. These servers have to handle 638b7579f77SDag-Erling Smørgrav# recursion to other nameservers. List zero or more nameservers by hostname 639b7579f77SDag-Erling Smørgrav# or by ipaddress. Use an entry with name "." to forward all queries. 640b7579f77SDag-Erling Smørgrav# If you enable forward-first, it attempts without the forward if it fails. 641b7579f77SDag-Erling Smørgrav# forward-zone: 642b7579f77SDag-Erling Smørgrav# name: "example.com" 643b7579f77SDag-Erling Smørgrav# forward-addr: 192.0.2.68 644b7579f77SDag-Erling Smørgrav# forward-addr: 192.0.2.73@5355 # forward to port 5355. 645b7579f77SDag-Erling Smørgrav# forward-first: no 646b7579f77SDag-Erling Smørgrav# forward-zone: 647b7579f77SDag-Erling Smørgrav# name: "example.org" 648b7579f77SDag-Erling Smørgrav# forward-host: fwd.example.com 649