1c8094600SDag-Erling Smørgrav# 2c8094600SDag-Erling Smørgrav# Example configuration file. 3c8094600SDag-Erling Smørgrav# 4*4c75e3aaSDag-Erling Smørgrav# See unbound.conf(5) man page, version 1.8.0. 5c8094600SDag-Erling Smørgrav# 6c8094600SDag-Erling Smørgrav# this is a comment. 7c8094600SDag-Erling Smørgrav 8c8094600SDag-Erling Smørgrav#Use this to include other text into the file. 9c8094600SDag-Erling Smørgrav#include: "otherfile.conf" 10c8094600SDag-Erling Smørgrav 11c8094600SDag-Erling Smørgrav# The server clause sets the main parameters. 12c8094600SDag-Erling Smørgravserver: 13c8094600SDag-Erling Smørgrav # whitespace is not necessary, but looks cleaner. 14c8094600SDag-Erling Smørgrav 15c8094600SDag-Erling Smørgrav # verbosity number, 0 is least verbose. 1 is default. 16c8094600SDag-Erling Smørgrav verbosity: 1 17c8094600SDag-Erling Smørgrav 18c8094600SDag-Erling Smørgrav # print statistics to the log (for every thread) every N seconds. 19c8094600SDag-Erling Smørgrav # Set to "" or 0 to disable. Default is disabled. 20c8094600SDag-Erling Smørgrav # statistics-interval: 0 21c8094600SDag-Erling Smørgrav 2265b390aaSDag-Erling Smørgrav # enable shm for stats, default no. if you enable also enable 2365b390aaSDag-Erling Smørgrav # statistics-interval, every time it also writes stats to the 2465b390aaSDag-Erling Smørgrav # shared memory segment keyed with shm-key. 2565b390aaSDag-Erling Smørgrav # shm-enable: no 2665b390aaSDag-Erling Smørgrav 2765b390aaSDag-Erling Smørgrav # shm for stats uses this key, and key+1 for the shared mem segment. 2865b390aaSDag-Erling Smørgrav # shm-key: 11777 2965b390aaSDag-Erling Smørgrav 30c8094600SDag-Erling Smørgrav # enable cumulative statistics, without clearing them after printing. 31c8094600SDag-Erling Smørgrav # statistics-cumulative: no 32c8094600SDag-Erling Smørgrav 33c8094600SDag-Erling Smørgrav # enable extended statistics (query types, answer codes, status) 34c8094600SDag-Erling Smørgrav # printed from unbound-control. default off, because of speed. 35c8094600SDag-Erling Smørgrav # extended-statistics: no 36c8094600SDag-Erling Smørgrav 37c8094600SDag-Erling Smørgrav # number of threads to create. 1 disables threading. 38c8094600SDag-Erling Smørgrav # num-threads: 1 39c8094600SDag-Erling Smørgrav 40c8094600SDag-Erling Smørgrav # specify the interfaces to answer queries from by ip-address. 41c8094600SDag-Erling Smørgrav # The default is to listen to localhost (127.0.0.1 and ::1). 42c8094600SDag-Erling Smørgrav # specify 0.0.0.0 and ::0 to bind to all available interfaces. 43c8094600SDag-Erling Smørgrav # specify every interface[@port] on a new 'interface:' labelled line. 44c8094600SDag-Erling Smørgrav # The listen interfaces are not changed on reload, only on restart. 45c8094600SDag-Erling Smørgrav # interface: 192.0.2.153 46c8094600SDag-Erling Smørgrav # interface: 192.0.2.154 47c8094600SDag-Erling Smørgrav # interface: 192.0.2.154@5003 48c8094600SDag-Erling Smørgrav # interface: 2001:DB8::5 49c8094600SDag-Erling Smørgrav 50c8094600SDag-Erling Smørgrav # enable this feature to copy the source address of queries to reply. 51c8094600SDag-Erling Smørgrav # Socket options are not supported on all platforms. experimental. 52c8094600SDag-Erling Smørgrav # interface-automatic: no 53c8094600SDag-Erling Smørgrav 54c8094600SDag-Erling Smørgrav # port to answer queries from 55c8094600SDag-Erling Smørgrav # port: 53 56c8094600SDag-Erling Smørgrav 57c8094600SDag-Erling Smørgrav # specify the interfaces to send outgoing queries to authoritative 58c8094600SDag-Erling Smørgrav # server from by ip-address. If none, the default (all) interface 59c8094600SDag-Erling Smørgrav # is used. Specify every interface on a 'outgoing-interface:' line. 60c8094600SDag-Erling Smørgrav # outgoing-interface: 192.0.2.153 61c8094600SDag-Erling Smørgrav # outgoing-interface: 2001:DB8::5 62c8094600SDag-Erling Smørgrav # outgoing-interface: 2001:DB8::6 63c8094600SDag-Erling Smørgrav 64b5663de9SDag-Erling Smørgrav # Specify a netblock to use remainder 64 bits as random bits for 65b5663de9SDag-Erling Smørgrav # upstream queries. Uses freebind option (Linux). 66b5663de9SDag-Erling Smørgrav # outgoing-interface: 2001:DB8::/64 67b5663de9SDag-Erling Smørgrav # Also (Linux:) ip -6 addr add 2001:db8::/64 dev lo 68b5663de9SDag-Erling Smørgrav # And: ip -6 route add local 2001:db8::/64 dev lo 69b5663de9SDag-Erling Smørgrav # And set prefer-ip6: yes to use the ip6 randomness from a netblock. 70b5663de9SDag-Erling Smørgrav # Set this to yes to prefer ipv6 upstream servers over ipv4. 71b5663de9SDag-Erling Smørgrav # prefer-ip6: no 72b5663de9SDag-Erling Smørgrav 73c8094600SDag-Erling Smørgrav # number of ports to allocate per thread, determines the size of the 74c8094600SDag-Erling Smørgrav # port range that can be open simultaneously. About double the 75c8094600SDag-Erling Smørgrav # num-queries-per-thread, or, use as many as the OS will allow you. 76c8094600SDag-Erling Smørgrav # outgoing-range: 4096 77c8094600SDag-Erling Smørgrav 78c8094600SDag-Erling Smørgrav # permit unbound to use this port number or port range for 79c8094600SDag-Erling Smørgrav # making outgoing queries, using an outgoing interface. 80c8094600SDag-Erling Smørgrav # outgoing-port-permit: 32768 81c8094600SDag-Erling Smørgrav 82c8094600SDag-Erling Smørgrav # deny unbound the use this of port number or port range for 83c8094600SDag-Erling Smørgrav # making outgoing queries, using an outgoing interface. 84c8094600SDag-Erling Smørgrav # Use this to make sure unbound does not grab a UDP port that some 85c8094600SDag-Erling Smørgrav # other server on this computer needs. The default is to avoid 86c8094600SDag-Erling Smørgrav # IANA-assigned port numbers. 87c8094600SDag-Erling Smørgrav # If multiple outgoing-port-permit and outgoing-port-avoid options 88c8094600SDag-Erling Smørgrav # are present, they are processed in order. 89c8094600SDag-Erling Smørgrav # outgoing-port-avoid: "3200-3208" 90c8094600SDag-Erling Smørgrav 91c8094600SDag-Erling Smørgrav # number of outgoing simultaneous tcp buffers to hold per thread. 92c8094600SDag-Erling Smørgrav # outgoing-num-tcp: 10 93c8094600SDag-Erling Smørgrav 94c8094600SDag-Erling Smørgrav # number of incoming simultaneous tcp buffers to hold per thread. 95c8094600SDag-Erling Smørgrav # incoming-num-tcp: 10 96c8094600SDag-Erling Smørgrav 97c8094600SDag-Erling Smørgrav # buffer size for UDP port 53 incoming (SO_RCVBUF socket option). 98c8094600SDag-Erling Smørgrav # 0 is system default. Use 4m to catch query spikes for busy servers. 99c8094600SDag-Erling Smørgrav # so-rcvbuf: 0 100c8094600SDag-Erling Smørgrav 101c8094600SDag-Erling Smørgrav # buffer size for UDP port 53 outgoing (SO_SNDBUF socket option). 102c8094600SDag-Erling Smørgrav # 0 is system default. Use 4m to handle spikes on very busy servers. 103c8094600SDag-Erling Smørgrav # so-sndbuf: 0 104c8094600SDag-Erling Smørgrav 105c8094600SDag-Erling Smørgrav # use SO_REUSEPORT to distribute queries over threads. 106*4c75e3aaSDag-Erling Smørgrav # so-reuseport: yes 107c8094600SDag-Erling Smørgrav 10809a3aaf3SDag-Erling Smørgrav # use IP_TRANSPARENT so the interface: addresses can be non-local 10909a3aaf3SDag-Erling Smørgrav # and you can config non-existing IPs that are going to work later on 110f61ef7f6SDag-Erling Smørgrav # (uses IP_BINDANY on FreeBSD). 11109a3aaf3SDag-Erling Smørgrav # ip-transparent: no 11209a3aaf3SDag-Erling Smørgrav 113e2d15004SDag-Erling Smørgrav # use IP_FREEBIND so the interface: addresses can be non-local 114e2d15004SDag-Erling Smørgrav # and you can bind to nonexisting IPs and interfaces that are down. 115e2d15004SDag-Erling Smørgrav # Linux only. On Linux you also have ip-transparent that is similar. 116e2d15004SDag-Erling Smørgrav # ip-freebind: no 117e2d15004SDag-Erling Smørgrav 118c8094600SDag-Erling Smørgrav # EDNS reassembly buffer to advertise to UDP peers (the actual buffer 119971980c3SDag-Erling Smørgrav # is set with msg-buffer-size). 1472 can solve fragmentation (timeouts) 120c8094600SDag-Erling Smørgrav # edns-buffer-size: 4096 121c8094600SDag-Erling Smørgrav 122c8094600SDag-Erling Smørgrav # Maximum UDP response size (not applied to TCP response). 123c8094600SDag-Erling Smørgrav # Suggested values are 512 to 4096. Default is 4096. 65536 disables it. 124c8094600SDag-Erling Smørgrav # max-udp-size: 4096 125c8094600SDag-Erling Smørgrav 126c8094600SDag-Erling Smørgrav # buffer size for handling DNS data. No messages larger than this 127c8094600SDag-Erling Smørgrav # size can be sent or received, by UDP or TCP. In bytes. 128c8094600SDag-Erling Smørgrav # msg-buffer-size: 65552 129c8094600SDag-Erling Smørgrav 130c8094600SDag-Erling Smørgrav # the amount of memory to use for the message cache. 131c8094600SDag-Erling Smørgrav # plain value in bytes or you can append k, m or G. default is "4Mb". 132c8094600SDag-Erling Smørgrav # msg-cache-size: 4m 133c8094600SDag-Erling Smørgrav 134c8094600SDag-Erling Smørgrav # the number of slabs to use for the message cache. 135c8094600SDag-Erling Smørgrav # the number of slabs must be a power of 2. 136c8094600SDag-Erling Smørgrav # more slabs reduce lock contention, but fragment memory usage. 137c8094600SDag-Erling Smørgrav # msg-cache-slabs: 4 138c8094600SDag-Erling Smørgrav 139c8094600SDag-Erling Smørgrav # the number of queries that a thread gets to service. 140c8094600SDag-Erling Smørgrav # num-queries-per-thread: 1024 141c8094600SDag-Erling Smørgrav 142c8094600SDag-Erling Smørgrav # if very busy, 50% queries run to completion, 50% get timeout in msec 143c8094600SDag-Erling Smørgrav # jostle-timeout: 200 144c8094600SDag-Erling Smørgrav 145c8094600SDag-Erling Smørgrav # msec to wait before close of port on timeout UDP. 0 disables. 146c8094600SDag-Erling Smørgrav # delay-close: 0 147c8094600SDag-Erling Smørgrav 148c8094600SDag-Erling Smørgrav # the amount of memory to use for the RRset cache. 149c8094600SDag-Erling Smørgrav # plain value in bytes or you can append k, m or G. default is "4Mb". 150c8094600SDag-Erling Smørgrav # rrset-cache-size: 4m 151c8094600SDag-Erling Smørgrav 152c8094600SDag-Erling Smørgrav # the number of slabs to use for the RRset cache. 153c8094600SDag-Erling Smørgrav # the number of slabs must be a power of 2. 154c8094600SDag-Erling Smørgrav # more slabs reduce lock contention, but fragment memory usage. 155c8094600SDag-Erling Smørgrav # rrset-cache-slabs: 4 156c8094600SDag-Erling Smørgrav 157c8094600SDag-Erling Smørgrav # the time to live (TTL) value lower bound, in seconds. Default 0. 158c8094600SDag-Erling Smørgrav # If more than an hour could easily give trouble due to stale data. 159c8094600SDag-Erling Smørgrav # cache-min-ttl: 0 160c8094600SDag-Erling Smørgrav 161c8094600SDag-Erling Smørgrav # the time to live (TTL) value cap for RRsets and messages in the 162c8094600SDag-Erling Smørgrav # cache. Items are not cached for longer. In seconds. 163c8094600SDag-Erling Smørgrav # cache-max-ttl: 86400 164c8094600SDag-Erling Smørgrav 16509a3aaf3SDag-Erling Smørgrav # the time to live (TTL) value cap for negative responses in the cache 16609a3aaf3SDag-Erling Smørgrav # cache-max-negative-ttl: 3600 16709a3aaf3SDag-Erling Smørgrav 168c8094600SDag-Erling Smørgrav # the time to live (TTL) value for cached roundtrip times, lameness and 169c8094600SDag-Erling Smørgrav # EDNS version information for hosts. In seconds. 170c8094600SDag-Erling Smørgrav # infra-host-ttl: 900 171c8094600SDag-Erling Smørgrav 1726480faa8SDag-Erling Smørgrav # minimum wait time for responses, increase if uplink is long. In msec. 1736480faa8SDag-Erling Smørgrav # infra-cache-min-rtt: 50 1746480faa8SDag-Erling Smørgrav 175c8094600SDag-Erling Smørgrav # the number of slabs to use for the Infrastructure cache. 176c8094600SDag-Erling Smørgrav # the number of slabs must be a power of 2. 177c8094600SDag-Erling Smørgrav # more slabs reduce lock contention, but fragment memory usage. 178c8094600SDag-Erling Smørgrav # infra-cache-slabs: 4 179c8094600SDag-Erling Smørgrav 180c8094600SDag-Erling Smørgrav # the maximum number of hosts that are cached (roundtrip, EDNS, lame). 181c8094600SDag-Erling Smørgrav # infra-cache-numhosts: 10000 182c8094600SDag-Erling Smørgrav 183b5663de9SDag-Erling Smørgrav # define a number of tags here, use with local-zone, access-control. 184b5663de9SDag-Erling Smørgrav # repeat the define-tag statement to add additional tags. 185b5663de9SDag-Erling Smørgrav # define-tag: "tag1 tag2 tag3" 186b5663de9SDag-Erling Smørgrav 187c8094600SDag-Erling Smørgrav # Enable IPv4, "yes" or "no". 188c8094600SDag-Erling Smørgrav # do-ip4: yes 189c8094600SDag-Erling Smørgrav 190c8094600SDag-Erling Smørgrav # Enable IPv6, "yes" or "no". 191c8094600SDag-Erling Smørgrav # do-ip6: yes 192c8094600SDag-Erling Smørgrav 193c8094600SDag-Erling Smørgrav # Enable UDP, "yes" or "no". 194c8094600SDag-Erling Smørgrav # do-udp: yes 195c8094600SDag-Erling Smørgrav 196c8094600SDag-Erling Smørgrav # Enable TCP, "yes" or "no". 197c8094600SDag-Erling Smørgrav # do-tcp: yes 198c8094600SDag-Erling Smørgrav 199c8094600SDag-Erling Smørgrav # upstream connections use TCP only (and no UDP), "yes" or "no" 200c8094600SDag-Erling Smørgrav # useful for tunneling scenarios, default no. 201c8094600SDag-Erling Smørgrav # tcp-upstream: no 202c8094600SDag-Erling Smørgrav 2038a384985SDag-Erling Smørgrav # upstream connections also use UDP (even if do-udp is no). 2048a384985SDag-Erling Smørgrav # useful if if you want UDP upstream, but don't provide UDP downstream. 2058a384985SDag-Erling Smørgrav # udp-upstream-without-downstream: no 2068a384985SDag-Erling Smørgrav 207f61ef7f6SDag-Erling Smørgrav # Maximum segment size (MSS) of TCP socket on which the server 208f61ef7f6SDag-Erling Smørgrav # responds to queries. Default is 0, system default MSS. 209f61ef7f6SDag-Erling Smørgrav # tcp-mss: 0 210f61ef7f6SDag-Erling Smørgrav 211f61ef7f6SDag-Erling Smørgrav # Maximum segment size (MSS) of TCP socket for outgoing queries. 212f61ef7f6SDag-Erling Smørgrav # Default is 0, system default MSS. 213f61ef7f6SDag-Erling Smørgrav # outgoing-tcp-mss: 0 214f61ef7f6SDag-Erling Smørgrav 215*4c75e3aaSDag-Erling Smørgrav # Idle TCP timeout, connection closed in milliseconds 216*4c75e3aaSDag-Erling Smørgrav # tcp-idle-timeout: 30000 217*4c75e3aaSDag-Erling Smørgrav 218*4c75e3aaSDag-Erling Smørgrav # Enable EDNS TCP keepalive option. 219*4c75e3aaSDag-Erling Smørgrav # edns-tcp-keepalive: no 220*4c75e3aaSDag-Erling Smørgrav 221*4c75e3aaSDag-Erling Smørgrav # Timeout for EDNS TCP keepalive, in msec. 222*4c75e3aaSDag-Erling Smørgrav # edns-tcp-keepalive-timeout: 120000 223*4c75e3aaSDag-Erling Smørgrav 2243005e0a3SDag-Erling Smørgrav # Use systemd socket activation for UDP, TCP, and control sockets. 2253005e0a3SDag-Erling Smørgrav # use-systemd: no 2263005e0a3SDag-Erling Smørgrav 227c8094600SDag-Erling Smørgrav # Detach from the terminal, run in background, "yes" or "no". 2283005e0a3SDag-Erling Smørgrav # Set the value to "no" when unbound runs as systemd service. 229c8094600SDag-Erling Smørgrav # do-daemonize: yes 230c8094600SDag-Erling Smørgrav 231c8094600SDag-Erling Smørgrav # control which clients are allowed to make (recursive) queries 232c8094600SDag-Erling Smørgrav # to this server. Specify classless netblocks with /size and action. 233c8094600SDag-Erling Smørgrav # By default everything is refused, except for localhost. 234c8094600SDag-Erling Smørgrav # Choose deny (drop message), refuse (polite error reply), 2353bd4df0aSDag-Erling Smørgrav # allow (recursive ok), allow_setrd (recursive ok, rd bit is forced on), 2363bd4df0aSDag-Erling Smørgrav # allow_snoop (recursive and nonrecursive ok) 237c8094600SDag-Erling Smørgrav # deny_non_local (drop queries unless can be answered from local-data) 238c8094600SDag-Erling Smørgrav # refuse_non_local (like deny_non_local but polite error reply). 239c8094600SDag-Erling Smørgrav # access-control: 0.0.0.0/0 refuse 240c8094600SDag-Erling Smørgrav # access-control: 127.0.0.0/8 allow 241c8094600SDag-Erling Smørgrav # access-control: ::0/0 refuse 242c8094600SDag-Erling Smørgrav # access-control: ::1 allow 243c8094600SDag-Erling Smørgrav # access-control: ::ffff:127.0.0.1 allow 244c8094600SDag-Erling Smørgrav 245b5663de9SDag-Erling Smørgrav # tag access-control with list of tags (in "" with spaces between) 246b5663de9SDag-Erling Smørgrav # Clients using this access control element use localzones that 247b5663de9SDag-Erling Smørgrav # are tagged with one of these tags. 248b5663de9SDag-Erling Smørgrav # access-control-tag: 192.0.2.0/24 "tag2 tag3" 249b5663de9SDag-Erling Smørgrav 250b5663de9SDag-Erling Smørgrav # set action for particular tag for given access control element 251b5663de9SDag-Erling Smørgrav # if you have multiple tag values, the tag used to lookup the action 252b5663de9SDag-Erling Smørgrav # is the first tag match between access-control-tag and local-zone-tag 253b5663de9SDag-Erling Smørgrav # where "first" comes from the order of the define-tag values. 254b5663de9SDag-Erling Smørgrav # access-control-tag-action: 192.0.2.0/24 tag3 refuse 255b5663de9SDag-Erling Smørgrav 256b5663de9SDag-Erling Smørgrav # set redirect data for particular tag for access control element 257b5663de9SDag-Erling Smørgrav # access-control-tag-data: 192.0.2.0/24 tag2 "A 127.0.0.1" 258b5663de9SDag-Erling Smørgrav 2593005e0a3SDag-Erling Smørgrav # Set view for access control element 2603005e0a3SDag-Erling Smørgrav # access-control-view: 192.0.2.0/24 viewname 2613005e0a3SDag-Erling Smørgrav 262c8094600SDag-Erling Smørgrav # if given, a chroot(2) is done to the given directory. 263c8094600SDag-Erling Smørgrav # i.e. you can chroot to the working directory, for example, 264c8094600SDag-Erling Smørgrav # for extra security, but make sure all files are in that directory. 265c8094600SDag-Erling Smørgrav # 266c8094600SDag-Erling Smørgrav # If chroot is enabled, you should pass the configfile (from the 267c8094600SDag-Erling Smørgrav # commandline) as a full path from the original root. After the 268c8094600SDag-Erling Smørgrav # chroot has been performed the now defunct portion of the config 269c8094600SDag-Erling Smørgrav # file path is removed to be able to reread the config after a reload. 270c8094600SDag-Erling Smørgrav # 271c8094600SDag-Erling Smørgrav # All other file paths (working dir, logfile, roothints, and 272c8094600SDag-Erling Smørgrav # key files) can be specified in several ways: 273c8094600SDag-Erling Smørgrav # o as an absolute path relative to the new root. 274c8094600SDag-Erling Smørgrav # o as a relative path to the working directory. 275c8094600SDag-Erling Smørgrav # o as an absolute path relative to the original root. 276c8094600SDag-Erling Smørgrav # In the last case the path is adjusted to remove the unused portion. 277c8094600SDag-Erling Smørgrav # 278c8094600SDag-Erling Smørgrav # The pid file can be absolute and outside of the chroot, it is 279c8094600SDag-Erling Smørgrav # written just prior to performing the chroot and dropping permissions. 280c8094600SDag-Erling Smørgrav # 281c8094600SDag-Erling Smørgrav # Additionally, unbound may need to access /dev/random (for entropy). 282c8094600SDag-Erling Smørgrav # How to do this is specific to your OS. 283c8094600SDag-Erling Smørgrav # 284c8094600SDag-Erling Smørgrav # If you give "" no chroot is performed. The path must not end in a /. 285c8094600SDag-Erling Smørgrav # chroot: "/var/unbound" 286c8094600SDag-Erling Smørgrav 287c8094600SDag-Erling Smørgrav # if given, user privileges are dropped (after binding port), 288c8094600SDag-Erling Smørgrav # and the given username is assumed. Default is user "unbound". 289c8094600SDag-Erling Smørgrav # If you give "" no privileges are dropped. 290c8094600SDag-Erling Smørgrav # username: "unbound" 291c8094600SDag-Erling Smørgrav 292c8094600SDag-Erling Smørgrav # the working directory. The relative files in this config are 293c8094600SDag-Erling Smørgrav # relative to this directory. If you give "" the working directory 294c8094600SDag-Erling Smørgrav # is not changed. 295b5663de9SDag-Erling Smørgrav # If you give a server: directory: dir before include: file statements 296b5663de9SDag-Erling Smørgrav # then those includes can be relative to the working directory. 297c8094600SDag-Erling Smørgrav # directory: "/var/unbound" 298c8094600SDag-Erling Smørgrav 299c8094600SDag-Erling Smørgrav # the log file, "" means log to stderr. 300c8094600SDag-Erling Smørgrav # Use of this option sets use-syslog to "no". 301c8094600SDag-Erling Smørgrav # logfile: "" 302c8094600SDag-Erling Smørgrav 303c8094600SDag-Erling Smørgrav # Log to syslog(3) if yes. The log facility LOG_DAEMON is used to 3043005e0a3SDag-Erling Smørgrav # log to. If yes, it overrides the logfile. 305c8094600SDag-Erling Smørgrav # use-syslog: yes 306c8094600SDag-Erling Smørgrav 3073005e0a3SDag-Erling Smørgrav # Log identity to report. if empty, defaults to the name of argv[0] 3083005e0a3SDag-Erling Smørgrav # (usually "unbound"). 3093005e0a3SDag-Erling Smørgrav # log-identity: "" 3103005e0a3SDag-Erling Smørgrav 311c8094600SDag-Erling Smørgrav # print UTC timestamp in ascii to logfile, default is epoch in seconds. 312c8094600SDag-Erling Smørgrav # log-time-ascii: no 313c8094600SDag-Erling Smørgrav 314c8094600SDag-Erling Smørgrav # print one line with time, IP, name, type, class for every query. 315c8094600SDag-Erling Smørgrav # log-queries: no 316c8094600SDag-Erling Smørgrav 3173005e0a3SDag-Erling Smørgrav # print one line per reply, with time, IP, name, type, class, rcode, 3183005e0a3SDag-Erling Smørgrav # timetoresolve, fromcache and responsesize. 3193005e0a3SDag-Erling Smørgrav # log-replies: no 3203005e0a3SDag-Erling Smørgrav 321*4c75e3aaSDag-Erling Smørgrav # log the local-zone actions, like local-zone type inform is enabled 322*4c75e3aaSDag-Erling Smørgrav # also for the other local zone types. 323*4c75e3aaSDag-Erling Smørgrav # log-local-actions: no 324*4c75e3aaSDag-Erling Smørgrav 325*4c75e3aaSDag-Erling Smørgrav # print log lines that say why queries return SERVFAIL to clients. 326*4c75e3aaSDag-Erling Smørgrav # log-servfail: no 327*4c75e3aaSDag-Erling Smørgrav 328c8094600SDag-Erling Smørgrav # the pid file. Can be an absolute path outside of chroot/work dir. 329c8094600SDag-Erling Smørgrav # pidfile: "/var/unbound/unbound.pid" 330c8094600SDag-Erling Smørgrav 331c8094600SDag-Erling Smørgrav # file to read root hints from. 33205ab2901SDag-Erling Smørgrav # get one from https://www.internic.net/domain/named.cache 333c8094600SDag-Erling Smørgrav # root-hints: "" 334c8094600SDag-Erling Smørgrav 335c8094600SDag-Erling Smørgrav # enable to not answer id.server and hostname.bind queries. 336c8094600SDag-Erling Smørgrav # hide-identity: no 337c8094600SDag-Erling Smørgrav 338c8094600SDag-Erling Smørgrav # enable to not answer version.server and version.bind queries. 339c8094600SDag-Erling Smørgrav # hide-version: no 340c8094600SDag-Erling Smørgrav 34165b390aaSDag-Erling Smørgrav # enable to not answer trustanchor.unbound queries. 34265b390aaSDag-Erling Smørgrav # hide-trustanchor: no 34365b390aaSDag-Erling Smørgrav 344c8094600SDag-Erling Smørgrav # the identity to report. Leave "" or default to return hostname. 345c8094600SDag-Erling Smørgrav # identity: "" 346c8094600SDag-Erling Smørgrav 347c8094600SDag-Erling Smørgrav # the version to report. Leave "" or default to return package version. 348c8094600SDag-Erling Smørgrav # version: "" 349c8094600SDag-Erling Smørgrav 350c8094600SDag-Erling Smørgrav # the target fetch policy. 351c8094600SDag-Erling Smørgrav # series of integers describing the policy per dependency depth. 352c8094600SDag-Erling Smørgrav # The number of values in the list determines the maximum dependency 353c8094600SDag-Erling Smørgrav # depth the recursor will pursue before giving up. Each integer means: 354c8094600SDag-Erling Smørgrav # -1 : fetch all targets opportunistically, 355c8094600SDag-Erling Smørgrav # 0: fetch on demand, 356c8094600SDag-Erling Smørgrav # positive value: fetch that many targets opportunistically. 357c8094600SDag-Erling Smørgrav # Enclose the list of numbers between quotes (""). 358c8094600SDag-Erling Smørgrav # target-fetch-policy: "3 2 1 0 0" 359c8094600SDag-Erling Smørgrav 360c8094600SDag-Erling Smørgrav # Harden against very small EDNS buffer sizes. 361c8094600SDag-Erling Smørgrav # harden-short-bufsize: no 362c8094600SDag-Erling Smørgrav 363c8094600SDag-Erling Smørgrav # Harden against unseemly large queries. 364c8094600SDag-Erling Smørgrav # harden-large-queries: no 365c8094600SDag-Erling Smørgrav 366c8094600SDag-Erling Smørgrav # Harden against out of zone rrsets, to avoid spoofing attempts. 367c8094600SDag-Erling Smørgrav # harden-glue: yes 368c8094600SDag-Erling Smørgrav 369c8094600SDag-Erling Smørgrav # Harden against receiving dnssec-stripped data. If you turn it 370c8094600SDag-Erling Smørgrav # off, failing to validate dnskey data for a trustanchor will 371c8094600SDag-Erling Smørgrav # trigger insecure mode for that zone (like without a trustanchor). 372c8094600SDag-Erling Smørgrav # Default on, which insists on dnssec data for trust-anchored zones. 373c8094600SDag-Erling Smørgrav # harden-dnssec-stripped: yes 374c8094600SDag-Erling Smørgrav 375c8094600SDag-Erling Smørgrav # Harden against queries that fall under dnssec-signed nxdomain names. 376*4c75e3aaSDag-Erling Smørgrav # harden-below-nxdomain: yes 377c8094600SDag-Erling Smørgrav 378c8094600SDag-Erling Smørgrav # Harden the referral path by performing additional queries for 379c8094600SDag-Erling Smørgrav # infrastructure data. Validates the replies (if possible). 380c8094600SDag-Erling Smørgrav # Default off, because the lookups burden the server. Experimental 381c8094600SDag-Erling Smørgrav # implementation of draft-wijngaards-dnsext-resolver-side-mitigation. 382c8094600SDag-Erling Smørgrav # harden-referral-path: no 383c8094600SDag-Erling Smørgrav 38409a3aaf3SDag-Erling Smørgrav # Harden against algorithm downgrade when multiple algorithms are 38509a3aaf3SDag-Erling Smørgrav # advertised in the DS record. If no, allows the weakest algorithm 38609a3aaf3SDag-Erling Smørgrav # to validate the zone. 387b75612f8SDag-Erling Smørgrav # harden-algo-downgrade: no 38809a3aaf3SDag-Erling Smørgrav 38905ab2901SDag-Erling Smørgrav # Sent minimum amount of information to upstream servers to enhance 39005ab2901SDag-Erling Smørgrav # privacy. Only sent minimum required labels of the QNAME and set QTYPE 39157bddd21SDag-Erling Smørgrav # to A when possible. 3923bd4df0aSDag-Erling Smørgrav # qname-minimisation: yes 39305ab2901SDag-Erling Smørgrav 3943005e0a3SDag-Erling Smørgrav # QNAME minimisation in strict mode. Do not fall-back to sending full 3953005e0a3SDag-Erling Smørgrav # QNAME to potentially broken nameservers. A lot of domains will not be 3963005e0a3SDag-Erling Smørgrav # resolvable when this option in enabled. 3973005e0a3SDag-Erling Smørgrav # This option only has effect when qname-minimisation is enabled. 3983005e0a3SDag-Erling Smørgrav # qname-minimisation-strict: no 3993005e0a3SDag-Erling Smørgrav 40057bddd21SDag-Erling Smørgrav # Aggressive NSEC uses the DNSSEC NSEC chain to synthesize NXDOMAIN 40157bddd21SDag-Erling Smørgrav # and other denials, using information from previous NXDOMAINs answers. 40257bddd21SDag-Erling Smørgrav # aggressive-nsec: no 40357bddd21SDag-Erling Smørgrav 404c8094600SDag-Erling Smørgrav # Use 0x20-encoded random bits in the query to foil spoof attempts. 405c8094600SDag-Erling Smørgrav # This feature is an experimental implementation of draft dns-0x20. 406c8094600SDag-Erling Smørgrav # use-caps-for-id: no 407c8094600SDag-Erling Smørgrav 40809a3aaf3SDag-Erling Smørgrav # Domains (and domains in them) without support for dns-0x20 and 40909a3aaf3SDag-Erling Smørgrav # the fallback fails because they keep sending different answers. 41009a3aaf3SDag-Erling Smørgrav # caps-whitelist: "licdn.com" 411b5663de9SDag-Erling Smørgrav # caps-whitelist: "senderbase.org" 41209a3aaf3SDag-Erling Smørgrav 413c8094600SDag-Erling Smørgrav # Enforce privacy of these addresses. Strips them away from answers. 414c8094600SDag-Erling Smørgrav # It may cause DNSSEC validation to additionally mark it as bogus. 415c8094600SDag-Erling Smørgrav # Protects against 'DNS Rebinding' (uses browser as network proxy). 416c8094600SDag-Erling Smørgrav # Only 'private-domain' and 'local-data' names are allowed to have 417c8094600SDag-Erling Smørgrav # these private addresses. No default. 418c8094600SDag-Erling Smørgrav # private-address: 10.0.0.0/8 419c8094600SDag-Erling Smørgrav # private-address: 172.16.0.0/12 420c8094600SDag-Erling Smørgrav # private-address: 192.168.0.0/16 421c8094600SDag-Erling Smørgrav # private-address: 169.254.0.0/16 422c8094600SDag-Erling Smørgrav # private-address: fd00::/8 423c8094600SDag-Erling Smørgrav # private-address: fe80::/10 42405ab2901SDag-Erling Smørgrav # private-address: ::ffff:0:0/96 425c8094600SDag-Erling Smørgrav 426c8094600SDag-Erling Smørgrav # Allow the domain (and its subdomains) to contain private addresses. 427c8094600SDag-Erling Smørgrav # local-data statements are allowed to contain private addresses too. 428c8094600SDag-Erling Smørgrav # private-domain: "example.com" 429c8094600SDag-Erling Smørgrav 430c8094600SDag-Erling Smørgrav # If nonzero, unwanted replies are not only reported in statistics, 431c8094600SDag-Erling Smørgrav # but also a running total is kept per thread. If it reaches the 432c8094600SDag-Erling Smørgrav # threshold, a warning is printed and a defensive action is taken, 433c8094600SDag-Erling Smørgrav # the cache is cleared to flush potential poison out of it. 434c8094600SDag-Erling Smørgrav # A suggested value is 10000000, the default is 0 (turned off). 435c8094600SDag-Erling Smørgrav # unwanted-reply-threshold: 0 436c8094600SDag-Erling Smørgrav 437c8094600SDag-Erling Smørgrav # Do not query the following addresses. No DNS queries are sent there. 438c8094600SDag-Erling Smørgrav # List one address per entry. List classless netblocks with /size, 439c8094600SDag-Erling Smørgrav # do-not-query-address: 127.0.0.1/8 440c8094600SDag-Erling Smørgrav # do-not-query-address: ::1 441c8094600SDag-Erling Smørgrav 442c8094600SDag-Erling Smørgrav # if yes, the above default do-not-query-address entries are present. 443c8094600SDag-Erling Smørgrav # if no, localhost can be queried (for testing and debugging). 444c8094600SDag-Erling Smørgrav # do-not-query-localhost: yes 445c8094600SDag-Erling Smørgrav 446c8094600SDag-Erling Smørgrav # if yes, perform prefetching of almost expired message cache entries. 447c8094600SDag-Erling Smørgrav # prefetch: no 448c8094600SDag-Erling Smørgrav 449c8094600SDag-Erling Smørgrav # if yes, perform key lookups adjacent to normal lookups. 450c8094600SDag-Erling Smørgrav # prefetch-key: no 451c8094600SDag-Erling Smørgrav 452c8094600SDag-Erling Smørgrav # if yes, Unbound rotates RRSet order in response. 453c8094600SDag-Erling Smørgrav # rrset-roundrobin: no 454c8094600SDag-Erling Smørgrav 455c8094600SDag-Erling Smørgrav # if yes, Unbound doesn't insert authority/additional sections 456c8094600SDag-Erling Smørgrav # into response messages when those sections are not required. 457*4c75e3aaSDag-Erling Smørgrav # minimal-responses: yes 458c8094600SDag-Erling Smørgrav 459e2d15004SDag-Erling Smørgrav # true to disable DNSSEC lameness check in iterator. 460e2d15004SDag-Erling Smørgrav # disable-dnssec-lame-check: no 461e2d15004SDag-Erling Smørgrav 462c8094600SDag-Erling Smørgrav # module configuration of the server. A string with identifiers 463c8094600SDag-Erling Smørgrav # separated by spaces. Syntax: "[dns64] [validator] iterator" 464c8094600SDag-Erling Smørgrav # module-config: "validator iterator" 465c8094600SDag-Erling Smørgrav 466c8094600SDag-Erling Smørgrav # File with trusted keys, kept uptodate using RFC5011 probes, 467c8094600SDag-Erling Smørgrav # initial file like trust-anchor-file, then it stores metadata. 468c8094600SDag-Erling Smørgrav # Use several entries, one per domain name, to track multiple zones. 469c8094600SDag-Erling Smørgrav # 470c8094600SDag-Erling Smørgrav # If you want to perform DNSSEC validation, run unbound-anchor before 471c8094600SDag-Erling Smørgrav # you start unbound (i.e. in the system boot scripts). And enable: 472c8094600SDag-Erling Smørgrav # Please note usage of unbound-anchor root anchor is at your own risk 473c8094600SDag-Erling Smørgrav # and under the terms of our LICENSE (see that file in the source). 474c8094600SDag-Erling Smørgrav # auto-trust-anchor-file: "/var/unbound/root.key" 475c8094600SDag-Erling Smørgrav 476c7f4d7adSDag-Erling Smørgrav # trust anchor signaling sends a RFC8145 key tag query after priming. 4778a384985SDag-Erling Smørgrav # trust-anchor-signaling: yes 478c7f4d7adSDag-Erling Smørgrav 4790fb34990SDag-Erling Smørgrav # Root key trust anchor sentinel (draft-ietf-dnsop-kskroll-sentinel) 4800fb34990SDag-Erling Smørgrav # root-key-sentinel: yes 4810fb34990SDag-Erling Smørgrav 482c8094600SDag-Erling Smørgrav # File with DLV trusted keys. Same format as trust-anchor-file. 483c8094600SDag-Erling Smørgrav # There can be only one DLV configured, it is trusted from root down. 48409a3aaf3SDag-Erling Smørgrav # DLV is going to be decommissioned. Please do not use it any more. 485c8094600SDag-Erling Smørgrav # dlv-anchor-file: "dlv.isc.org.key" 486c8094600SDag-Erling Smørgrav 487c8094600SDag-Erling Smørgrav # File with trusted keys for validation. Specify more than one file 488c8094600SDag-Erling Smørgrav # with several entries, one file per entry. 489c8094600SDag-Erling Smørgrav # Zone file format, with DS and DNSKEY entries. 490c8094600SDag-Erling Smørgrav # Note this gets out of date, use auto-trust-anchor-file please. 491c8094600SDag-Erling Smørgrav # trust-anchor-file: "" 492c8094600SDag-Erling Smørgrav 493c8094600SDag-Erling Smørgrav # Trusted key for validation. DS or DNSKEY. specify the RR on a 494c8094600SDag-Erling Smørgrav # single line, surrounded by "". TTL is ignored. class is IN default. 495c8094600SDag-Erling Smørgrav # Note this gets out of date, use auto-trust-anchor-file please. 496c8094600SDag-Erling Smørgrav # (These examples are from August 2007 and may not be valid anymore). 497c8094600SDag-Erling Smørgrav # trust-anchor: "nlnetlabs.nl. DNSKEY 257 3 5 AQPzzTWMz8qSWIQlfRnPckx2BiVmkVN6LPupO3mbz7FhLSnm26n6iG9N Lby97Ji453aWZY3M5/xJBSOS2vWtco2t8C0+xeO1bc/d6ZTy32DHchpW 6rDH1vp86Ll+ha0tmwyy9QP7y2bVw5zSbFCrefk8qCUBgfHm9bHzMG1U BYtEIQ==" 498c8094600SDag-Erling Smørgrav # trust-anchor: "jelte.nlnetlabs.nl. DS 42860 5 1 14D739EB566D2B1A5E216A0BA4D17FA9B038BE4A" 499c8094600SDag-Erling Smørgrav 500c8094600SDag-Erling Smørgrav # File with trusted keys for validation. Specify more than one file 501c8094600SDag-Erling Smørgrav # with several entries, one file per entry. Like trust-anchor-file 502c8094600SDag-Erling Smørgrav # but has a different file format. Format is BIND-9 style format, 503c8094600SDag-Erling Smørgrav # the trusted-keys { name flag proto algo "key"; }; clauses are read. 504c8094600SDag-Erling Smørgrav # you need external update procedures to track changes in keys. 505c8094600SDag-Erling Smørgrav # trusted-keys-file: "" 506c8094600SDag-Erling Smørgrav 507c8094600SDag-Erling Smørgrav # Ignore chain of trust. Domain is treated as insecure. 508c8094600SDag-Erling Smørgrav # domain-insecure: "example.com" 509c8094600SDag-Erling Smørgrav 510c8094600SDag-Erling Smørgrav # Override the date for validation with a specific fixed date. 511c8094600SDag-Erling Smørgrav # Do not set this unless you are debugging signature inception 512c8094600SDag-Erling Smørgrav # and expiration. "" or "0" turns the feature off. -1 ignores date. 513c8094600SDag-Erling Smørgrav # val-override-date: "" 514c8094600SDag-Erling Smørgrav 515c8094600SDag-Erling Smørgrav # The time to live for bogus data, rrsets and messages. This avoids 516c8094600SDag-Erling Smørgrav # some of the revalidation, until the time interval expires. in secs. 517c8094600SDag-Erling Smørgrav # val-bogus-ttl: 60 518c8094600SDag-Erling Smørgrav 519c8094600SDag-Erling Smørgrav # The signature inception and expiration dates are allowed to be off 520c8094600SDag-Erling Smørgrav # by 10% of the signature lifetime (expir-incep) from our local clock. 521c8094600SDag-Erling Smørgrav # This leeway is capped with a minimum and a maximum. In seconds. 522c8094600SDag-Erling Smørgrav # val-sig-skew-min: 3600 523c8094600SDag-Erling Smørgrav # val-sig-skew-max: 86400 524c8094600SDag-Erling Smørgrav 525c8094600SDag-Erling Smørgrav # Should additional section of secure message also be kept clean of 526c8094600SDag-Erling Smørgrav # unsecure data. Useful to shield the users of this validator from 527c8094600SDag-Erling Smørgrav # potential bogus data in the additional section. All unsigned data 528c8094600SDag-Erling Smørgrav # in the additional section is removed from secure messages. 529c8094600SDag-Erling Smørgrav # val-clean-additional: yes 530c8094600SDag-Erling Smørgrav 531c8094600SDag-Erling Smørgrav # Turn permissive mode on to permit bogus messages. Thus, messages 532c8094600SDag-Erling Smørgrav # for which security checks failed will be returned to clients, 533c8094600SDag-Erling Smørgrav # instead of SERVFAIL. It still performs the security checks, which 534c8094600SDag-Erling Smørgrav # result in interesting log files and possibly the AD bit in 535c8094600SDag-Erling Smørgrav # replies if the message is found secure. The default is off. 536c8094600SDag-Erling Smørgrav # val-permissive-mode: no 537c8094600SDag-Erling Smørgrav 538c8094600SDag-Erling Smørgrav # Ignore the CD flag in incoming queries and refuse them bogus data. 539c8094600SDag-Erling Smørgrav # Enable it if the only clients of unbound are legacy servers (w2008) 540c8094600SDag-Erling Smørgrav # that set CD but cannot validate themselves. 541c8094600SDag-Erling Smørgrav # ignore-cd-flag: no 542c8094600SDag-Erling Smørgrav 5438a384985SDag-Erling Smørgrav # Serve expired responses from cache, with TTL 0 in the response, 5443005e0a3SDag-Erling Smørgrav # and then attempt to fetch the data afresh. 5453005e0a3SDag-Erling Smørgrav # serve-expired: no 546*4c75e3aaSDag-Erling Smørgrav # 547*4c75e3aaSDag-Erling Smørgrav # Limit serving of expired responses to configured seconds after 548*4c75e3aaSDag-Erling Smørgrav # expiration. 0 disables the limit. 549*4c75e3aaSDag-Erling Smørgrav # serve-expired-ttl: 0 550*4c75e3aaSDag-Erling Smørgrav # 551*4c75e3aaSDag-Erling Smørgrav # Set the TTL of expired records to the serve-expired-ttl value after a 552*4c75e3aaSDag-Erling Smørgrav # failed attempt to retrieve the record from upstream. This makes sure 553*4c75e3aaSDag-Erling Smørgrav # that the expired records will be served as long as there are queries 554*4c75e3aaSDag-Erling Smørgrav # for it. 555*4c75e3aaSDag-Erling Smørgrav # serve-expired-ttl-reset: no 5563005e0a3SDag-Erling Smørgrav 557c8094600SDag-Erling Smørgrav # Have the validator log failed validations for your diagnosis. 558c8094600SDag-Erling Smørgrav # 0: off. 1: A line per failed user query. 2: With reason and bad IP. 559c8094600SDag-Erling Smørgrav # val-log-level: 0 560c8094600SDag-Erling Smørgrav 561c8094600SDag-Erling Smørgrav # It is possible to configure NSEC3 maximum iteration counts per 562c8094600SDag-Erling Smørgrav # keysize. Keep this table very short, as linear search is done. 563c8094600SDag-Erling Smørgrav # A message with an NSEC3 with larger count is marked insecure. 564c8094600SDag-Erling Smørgrav # List in ascending order the keysize and count values. 565c8094600SDag-Erling Smørgrav # val-nsec3-keysize-iterations: "1024 150 2048 500 4096 2500" 566c8094600SDag-Erling Smørgrav 567c8094600SDag-Erling Smørgrav # instruct the auto-trust-anchor-file probing to add anchors after ttl. 568c8094600SDag-Erling Smørgrav # add-holddown: 2592000 # 30 days 569c8094600SDag-Erling Smørgrav 570c8094600SDag-Erling Smørgrav # instruct the auto-trust-anchor-file probing to del anchors after ttl. 571c8094600SDag-Erling Smørgrav # del-holddown: 2592000 # 30 days 572c8094600SDag-Erling Smørgrav 573c8094600SDag-Erling Smørgrav # auto-trust-anchor-file probing removes missing anchors after ttl. 574c8094600SDag-Erling Smørgrav # If the value 0 is given, missing anchors are not removed. 575c8094600SDag-Erling Smørgrav # keep-missing: 31622400 # 366 days 576c8094600SDag-Erling Smørgrav 577e2d15004SDag-Erling Smørgrav # debug option that allows very small holddown times for key rollover, 578e2d15004SDag-Erling Smørgrav # otherwise the RFC mandates probe intervals must be at least 1 hour. 579b75612f8SDag-Erling Smørgrav # permit-small-holddown: no 580b75612f8SDag-Erling Smørgrav 581c8094600SDag-Erling Smørgrav # the amount of memory to use for the key cache. 582c8094600SDag-Erling Smørgrav # plain value in bytes or you can append k, m or G. default is "4Mb". 583c8094600SDag-Erling Smørgrav # key-cache-size: 4m 584c8094600SDag-Erling Smørgrav 585c8094600SDag-Erling Smørgrav # the number of slabs to use for the key cache. 586c8094600SDag-Erling Smørgrav # the number of slabs must be a power of 2. 587c8094600SDag-Erling Smørgrav # more slabs reduce lock contention, but fragment memory usage. 588c8094600SDag-Erling Smørgrav # key-cache-slabs: 4 589c8094600SDag-Erling Smørgrav 590c8094600SDag-Erling Smørgrav # the amount of memory to use for the negative cache (used for DLV). 591c8094600SDag-Erling Smørgrav # plain value in bytes or you can append k, m or G. default is "1Mb". 592c8094600SDag-Erling Smørgrav # neg-cache-size: 1m 593c8094600SDag-Erling Smørgrav 594c8094600SDag-Erling Smørgrav # By default, for a number of zones a small default 'nothing here' 595c8094600SDag-Erling Smørgrav # reply is built-in. Query traffic is thus blocked. If you 596c8094600SDag-Erling Smørgrav # wish to serve such zone you can unblock them by uncommenting one 597c8094600SDag-Erling Smørgrav # of the nodefault statements below. 598c8094600SDag-Erling Smørgrav # You may also have to use domain-insecure: zone to make DNSSEC work, 599c8094600SDag-Erling Smørgrav # unless you have your own trust anchors for this zone. 600c8094600SDag-Erling Smørgrav # local-zone: "localhost." nodefault 601c8094600SDag-Erling Smørgrav # local-zone: "127.in-addr.arpa." nodefault 602c8094600SDag-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 603f61ef7f6SDag-Erling Smørgrav # local-zone: "onion." nodefault 604971980c3SDag-Erling Smørgrav # local-zone: "test." nodefault 605971980c3SDag-Erling Smørgrav # local-zone: "invalid." nodefault 606c8094600SDag-Erling Smørgrav # local-zone: "10.in-addr.arpa." nodefault 607c8094600SDag-Erling Smørgrav # local-zone: "16.172.in-addr.arpa." nodefault 608c8094600SDag-Erling Smørgrav # local-zone: "17.172.in-addr.arpa." nodefault 609c8094600SDag-Erling Smørgrav # local-zone: "18.172.in-addr.arpa." nodefault 610c8094600SDag-Erling Smørgrav # local-zone: "19.172.in-addr.arpa." nodefault 611c8094600SDag-Erling Smørgrav # local-zone: "20.172.in-addr.arpa." nodefault 612c8094600SDag-Erling Smørgrav # local-zone: "21.172.in-addr.arpa." nodefault 613c8094600SDag-Erling Smørgrav # local-zone: "22.172.in-addr.arpa." nodefault 614c8094600SDag-Erling Smørgrav # local-zone: "23.172.in-addr.arpa." nodefault 615c8094600SDag-Erling Smørgrav # local-zone: "24.172.in-addr.arpa." nodefault 616c8094600SDag-Erling Smørgrav # local-zone: "25.172.in-addr.arpa." nodefault 617c8094600SDag-Erling Smørgrav # local-zone: "26.172.in-addr.arpa." nodefault 618c8094600SDag-Erling Smørgrav # local-zone: "27.172.in-addr.arpa." nodefault 619c8094600SDag-Erling Smørgrav # local-zone: "28.172.in-addr.arpa." nodefault 620c8094600SDag-Erling Smørgrav # local-zone: "29.172.in-addr.arpa." nodefault 621c8094600SDag-Erling Smørgrav # local-zone: "30.172.in-addr.arpa." nodefault 622c8094600SDag-Erling Smørgrav # local-zone: "31.172.in-addr.arpa." nodefault 623c8094600SDag-Erling Smørgrav # local-zone: "168.192.in-addr.arpa." nodefault 624c8094600SDag-Erling Smørgrav # local-zone: "0.in-addr.arpa." nodefault 625c8094600SDag-Erling Smørgrav # local-zone: "254.169.in-addr.arpa." nodefault 626c8094600SDag-Erling Smørgrav # local-zone: "2.0.192.in-addr.arpa." nodefault 627c8094600SDag-Erling Smørgrav # local-zone: "100.51.198.in-addr.arpa." nodefault 628c8094600SDag-Erling Smørgrav # local-zone: "113.0.203.in-addr.arpa." nodefault 629c8094600SDag-Erling Smørgrav # local-zone: "255.255.255.255.in-addr.arpa." nodefault 630c8094600SDag-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 631c8094600SDag-Erling Smørgrav # local-zone: "d.f.ip6.arpa." nodefault 632c8094600SDag-Erling Smørgrav # local-zone: "8.e.f.ip6.arpa." nodefault 633c8094600SDag-Erling Smørgrav # local-zone: "9.e.f.ip6.arpa." nodefault 634c8094600SDag-Erling Smørgrav # local-zone: "a.e.f.ip6.arpa." nodefault 635c8094600SDag-Erling Smørgrav # local-zone: "b.e.f.ip6.arpa." nodefault 636c8094600SDag-Erling Smørgrav # local-zone: "8.b.d.0.1.0.0.2.ip6.arpa." nodefault 637c8094600SDag-Erling Smørgrav # And for 64.100.in-addr.arpa. to 127.100.in-addr.arpa. 638c8094600SDag-Erling Smørgrav 6390de4f1bfSDag-Erling Smørgrav # If unbound is running service for the local host then it is useful 640c8094600SDag-Erling Smørgrav # to perform lan-wide lookups to the upstream, and unblock the 641c8094600SDag-Erling Smørgrav # long list of local-zones above. If this unbound is a dns server 642c8094600SDag-Erling Smørgrav # for a network of computers, disabled is better and stops information 643c8094600SDag-Erling Smørgrav # leakage of local lan information. 644c8094600SDag-Erling Smørgrav # unblock-lan-zones: no 645c8094600SDag-Erling Smørgrav 6460de4f1bfSDag-Erling Smørgrav # The insecure-lan-zones option disables validation for 6470de4f1bfSDag-Erling Smørgrav # these zones, as if they were all listed as domain-insecure. 6480de4f1bfSDag-Erling Smørgrav # insecure-lan-zones: no 6490de4f1bfSDag-Erling Smørgrav 650c8094600SDag-Erling Smørgrav # a number of locally served zones can be configured. 651c8094600SDag-Erling Smørgrav # local-zone: <zone> <type> 652c8094600SDag-Erling Smørgrav # local-data: "<resource record string>" 653c8094600SDag-Erling Smørgrav # o deny serves local data (if any), else, drops queries. 654c8094600SDag-Erling Smørgrav # o refuse serves local data (if any), else, replies with error. 655c8094600SDag-Erling Smørgrav # o static serves local data, else, nxdomain or nodata answer. 656c8094600SDag-Erling Smørgrav # o transparent gives local data, but resolves normally for other names 657c8094600SDag-Erling Smørgrav # o redirect serves the zone data for any subdomain in the zone. 658c8094600SDag-Erling Smørgrav # o nodefault can be used to normally resolve AS112 zones. 659c8094600SDag-Erling Smørgrav # o typetransparent resolves normally for other types and other names 6603005e0a3SDag-Erling Smørgrav # o inform acts like transparent, but logs client IP address 66109a3aaf3SDag-Erling Smørgrav # o inform_deny drops queries and logs client IP address 662b5663de9SDag-Erling Smørgrav # o always_transparent, always_refuse, always_nxdomain, resolve in 6630fb34990SDag-Erling Smørgrav # that way but ignore local data for that name 66457bddd21SDag-Erling Smørgrav # o noview breaks out of that view towards global local-zones. 665c8094600SDag-Erling Smørgrav # 666c8094600SDag-Erling Smørgrav # defaults are localhost address, reverse for 127.0.0.1 and ::1 667c8094600SDag-Erling Smørgrav # and nxdomain for AS112 zones. If you configure one of these zones 668c8094600SDag-Erling Smørgrav # the default content is omitted, or you can omit it with 'nodefault'. 669c8094600SDag-Erling Smørgrav # 670c8094600SDag-Erling Smørgrav # If you configure local-data without specifying local-zone, by 671c8094600SDag-Erling Smørgrav # default a transparent local-zone is created for the data. 672c8094600SDag-Erling Smørgrav # 673c8094600SDag-Erling Smørgrav # You can add locally served data with 674c8094600SDag-Erling Smørgrav # local-zone: "local." static 675c8094600SDag-Erling Smørgrav # local-data: "mycomputer.local. IN A 192.0.2.51" 676c8094600SDag-Erling Smørgrav # local-data: 'mytext.local TXT "content of text record"' 677c8094600SDag-Erling Smørgrav # 678c8094600SDag-Erling Smørgrav # You can override certain queries with 679c8094600SDag-Erling Smørgrav # local-data: "adserver.example.com A 127.0.0.1" 680c8094600SDag-Erling Smørgrav # 681c8094600SDag-Erling Smørgrav # You can redirect a domain to a fixed address with 682c8094600SDag-Erling Smørgrav # (this makes example.com, www.example.com, etc, all go to 192.0.2.3) 683c8094600SDag-Erling Smørgrav # local-zone: "example.com" redirect 684c8094600SDag-Erling Smørgrav # local-data: "example.com A 192.0.2.3" 685c8094600SDag-Erling Smørgrav # 686c8094600SDag-Erling Smørgrav # Shorthand to make PTR records, "IPv4 name" or "IPv6 name". 687c8094600SDag-Erling Smørgrav # You can also add PTR records using local-data directly, but then 688c8094600SDag-Erling Smørgrav # you need to do the reverse notation yourself. 689c8094600SDag-Erling Smørgrav # local-data-ptr: "192.0.2.3 www.example.com" 690c8094600SDag-Erling Smørgrav 691b5663de9SDag-Erling Smørgrav # tag a localzone with a list of tag names (in "" with spaces between) 692b5663de9SDag-Erling Smørgrav # local-zone-tag: "example.com" "tag2 tag3" 693b5663de9SDag-Erling Smørgrav 694b5663de9SDag-Erling Smørgrav # add a netblock specific override to a localzone, with zone type 695b5663de9SDag-Erling Smørgrav # local-zone-override: "example.com" 192.0.2.0/24 refuse 696b5663de9SDag-Erling Smørgrav 6970fb34990SDag-Erling Smørgrav # service clients over TLS (on the TCP sockets), with plain DNS inside 6980fb34990SDag-Erling Smørgrav # the TLS stream. Give the certificate to use and private key. 699c8094600SDag-Erling Smørgrav # default is "" (disabled). requires restart to take effect. 70057bddd21SDag-Erling Smørgrav # tls-service-key: "path/to/privatekeyfile.key" 70157bddd21SDag-Erling Smørgrav # tls-service-pem: "path/to/publiccertfile.pem" 70257bddd21SDag-Erling Smørgrav # tls-port: 853 703c8094600SDag-Erling Smørgrav 7040fb34990SDag-Erling Smørgrav # request upstream over TLS (with plain DNS inside the TLS stream). 705c8094600SDag-Erling Smørgrav # Default is no. Can be turned on and off with unbound-control. 70657bddd21SDag-Erling Smørgrav # tls-upstream: no 70757bddd21SDag-Erling Smørgrav 70857bddd21SDag-Erling Smørgrav # Certificates used to authenticate connections made upstream. 70957bddd21SDag-Erling Smørgrav # tls-cert-bundle: "" 710c8094600SDag-Erling Smørgrav 7113bd4df0aSDag-Erling Smørgrav # Add system certs to the cert bundle, from the Windows Cert Store 7123bd4df0aSDag-Erling Smørgrav # tls-win-cert: no 7133bd4df0aSDag-Erling Smørgrav 7140fb34990SDag-Erling Smørgrav # Also serve tls on these port numbers (eg. 443, ...), by listing 7157da0adf7SDag-Erling Smørgrav # tls-additional-port: portno for each of the port numbers. 7160fb34990SDag-Erling Smørgrav 717c8094600SDag-Erling Smørgrav # DNS64 prefix. Must be specified when DNS64 is use. 718c8094600SDag-Erling Smørgrav # Enable dns64 in module-config. Used to synthesize IPv6 from IPv4. 719c8094600SDag-Erling Smørgrav # dns64-prefix: 64:ff9b::0/96 720c8094600SDag-Erling Smørgrav 721*4c75e3aaSDag-Erling Smørgrav # DNS64 ignore AAAA records for these domains and use A instead. 722*4c75e3aaSDag-Erling Smørgrav # dns64-ignore-aaaa: "example.com" 723*4c75e3aaSDag-Erling Smørgrav 72409a3aaf3SDag-Erling Smørgrav # ratelimit for uncached, new queries, this limits recursion effort. 72509a3aaf3SDag-Erling Smørgrav # ratelimiting is experimental, and may help against randomqueryflood. 72609a3aaf3SDag-Erling Smørgrav # if 0(default) it is disabled, otherwise state qps allowed per zone. 72709a3aaf3SDag-Erling Smørgrav # ratelimit: 0 72809a3aaf3SDag-Erling Smørgrav 72909a3aaf3SDag-Erling Smørgrav # ratelimits are tracked in a cache, size in bytes of cache (or k,m). 73009a3aaf3SDag-Erling Smørgrav # ratelimit-size: 4m 73109a3aaf3SDag-Erling Smørgrav # ratelimit cache slabs, reduces lock contention if equal to cpucount. 73209a3aaf3SDag-Erling Smørgrav # ratelimit-slabs: 4 73309a3aaf3SDag-Erling Smørgrav 73409a3aaf3SDag-Erling Smørgrav # 0 blocks when ratelimited, otherwise let 1/xth traffic through 73509a3aaf3SDag-Erling Smørgrav # ratelimit-factor: 10 73609a3aaf3SDag-Erling Smørgrav 73709a3aaf3SDag-Erling Smørgrav # override the ratelimit for a specific domain name. 73809a3aaf3SDag-Erling Smørgrav # give this setting multiple times to have multiple overrides. 73909a3aaf3SDag-Erling Smørgrav # ratelimit-for-domain: example.com 1000 74009a3aaf3SDag-Erling Smørgrav # override the ratelimits for all domains below a domain name 74109a3aaf3SDag-Erling Smørgrav # can give this multiple times, the name closest to the zone is used. 742b5663de9SDag-Erling Smørgrav # ratelimit-below-domain: com 1000 74309a3aaf3SDag-Erling Smørgrav 7443005e0a3SDag-Erling Smørgrav # global query ratelimit for all ip addresses. 7453005e0a3SDag-Erling Smørgrav # feature is experimental. 7463005e0a3SDag-Erling Smørgrav # if 0(default) it is disabled, otherwise states qps allowed per ip address 7473005e0a3SDag-Erling Smørgrav # ip-ratelimit: 0 7483005e0a3SDag-Erling Smørgrav 7493005e0a3SDag-Erling Smørgrav # ip ratelimits are tracked in a cache, size in bytes of cache (or k,m). 7503005e0a3SDag-Erling Smørgrav # ip-ratelimit-size: 4m 7513005e0a3SDag-Erling Smørgrav # ip ratelimit cache slabs, reduces lock contention if equal to cpucount. 7523005e0a3SDag-Erling Smørgrav # ip-ratelimit-slabs: 4 7533005e0a3SDag-Erling Smørgrav 7543005e0a3SDag-Erling Smørgrav # 0 blocks when ip is ratelimited, otherwise let 1/xth traffic through 7553005e0a3SDag-Erling Smørgrav # ip-ratelimit-factor: 10 7563005e0a3SDag-Erling Smørgrav 757*4c75e3aaSDag-Erling Smørgrav # Limit the number of connections simultaneous from a netblock 758*4c75e3aaSDag-Erling Smørgrav # tcp-connection-limit: 192.0.2.0/24 12 759*4c75e3aaSDag-Erling Smørgrav 7600fb34990SDag-Erling Smørgrav # what is considered a low rtt (ping time for upstream server), in msec 7610fb34990SDag-Erling Smørgrav # low-rtt: 45 7620fb34990SDag-Erling Smørgrav # select low rtt this many times out of 1000. 0 means the fast server 7630fb34990SDag-Erling Smørgrav # select is disabled. prefetches are not sped up. 7643bd4df0aSDag-Erling Smørgrav # low-rtt-permil: 0 7650fb34990SDag-Erling Smørgrav 766c7f4d7adSDag-Erling Smørgrav # Specific options for ipsecmod. unbound needs to be configured with 767c7f4d7adSDag-Erling Smørgrav # --enable-ipsecmod for these to take effect. 768c7f4d7adSDag-Erling Smørgrav # 769c7f4d7adSDag-Erling Smørgrav # Enable or disable ipsecmod (it still needs to be defined in 770c7f4d7adSDag-Erling Smørgrav # module-config above). Can be used when ipsecmod needs to be 771c7f4d7adSDag-Erling Smørgrav # enabled/disabled via remote-control(below). 772c7f4d7adSDag-Erling Smørgrav # ipsecmod-enabled: yes 773c7f4d7adSDag-Erling Smørgrav # 774c7f4d7adSDag-Erling Smørgrav # Path to executable external hook. It must be defined when ipsecmod is 775c7f4d7adSDag-Erling Smørgrav # listed in module-config (above). 776c7f4d7adSDag-Erling Smørgrav # ipsecmod-hook: "./my_executable" 777c7f4d7adSDag-Erling Smørgrav # 778c7f4d7adSDag-Erling Smørgrav # When enabled unbound will reply with SERVFAIL if the return value of 779c7f4d7adSDag-Erling Smørgrav # the ipsecmod-hook is not 0. 780c7f4d7adSDag-Erling Smørgrav # ipsecmod-strict: no 781c7f4d7adSDag-Erling Smørgrav # 782c7f4d7adSDag-Erling Smørgrav # Maximum time to live (TTL) for cached A/AAAA records with IPSECKEY. 783c7f4d7adSDag-Erling Smørgrav # ipsecmod-max-ttl: 3600 784c7f4d7adSDag-Erling Smørgrav # 785c7f4d7adSDag-Erling Smørgrav # Reply with A/AAAA even if the relevant IPSECKEY is bogus. Mainly used for 786c7f4d7adSDag-Erling Smørgrav # testing. 787c7f4d7adSDag-Erling Smørgrav # ipsecmod-ignore-bogus: no 788c7f4d7adSDag-Erling Smørgrav # 789c7f4d7adSDag-Erling Smørgrav # Domains for which ipsecmod will be triggered. If not defined (default) 790c7f4d7adSDag-Erling Smørgrav # all domains are treated as being whitelisted. 791c7f4d7adSDag-Erling Smørgrav # ipsecmod-whitelist: "example.com" 792c7f4d7adSDag-Erling Smørgrav # ipsecmod-whitelist: "nlnetlabs.nl" 793c7f4d7adSDag-Erling Smørgrav 7943005e0a3SDag-Erling Smørgrav 795c8094600SDag-Erling Smørgrav# Python config section. To enable: 796c8094600SDag-Erling Smørgrav# o use --with-pythonmodule to configure before compiling. 797c8094600SDag-Erling Smørgrav# o list python in the module-config string (above) to enable. 798c8094600SDag-Erling Smørgrav# o and give a python-script to run. 799c8094600SDag-Erling Smørgravpython: 800c8094600SDag-Erling Smørgrav # Script file to load 801c8094600SDag-Erling Smørgrav # python-script: "/var/unbound/ubmodule-tst.py" 802c8094600SDag-Erling Smørgrav 803c8094600SDag-Erling Smørgrav# Remote control config section. 804c8094600SDag-Erling Smørgravremote-control: 805c8094600SDag-Erling Smørgrav # Enable remote control with unbound-control(8) here. 806c8094600SDag-Erling Smørgrav # set up the keys and certificates with unbound-control-setup. 807c8094600SDag-Erling Smørgrav # control-enable: no 808c8094600SDag-Erling Smørgrav 809c8094600SDag-Erling Smørgrav # what interfaces are listened to for remote control. 810c8094600SDag-Erling Smørgrav # give 0.0.0.0 and ::0 to listen to all interfaces. 8117da0adf7SDag-Erling Smørgrav # set to an absolute path to use a unix local name pipe, certificates 8127da0adf7SDag-Erling Smørgrav # are not used for that, so key and cert files need not be present. 813c8094600SDag-Erling Smørgrav # control-interface: 127.0.0.1 814c8094600SDag-Erling Smørgrav # control-interface: ::1 815c8094600SDag-Erling Smørgrav 816c8094600SDag-Erling Smørgrav # port number for remote control operations. 817c8094600SDag-Erling Smørgrav # control-port: 8953 818c8094600SDag-Erling Smørgrav 8197da0adf7SDag-Erling Smørgrav # for localhost, you can disable use of TLS by setting this to "no" 8207da0adf7SDag-Erling Smørgrav # For local sockets this option is ignored, and TLS is not used. 8217da0adf7SDag-Erling Smørgrav # control-use-cert: "yes" 8227da0adf7SDag-Erling Smørgrav 823c8094600SDag-Erling Smørgrav # unbound server key file. 824c8094600SDag-Erling Smørgrav # server-key-file: "/var/unbound/unbound_server.key" 825c8094600SDag-Erling Smørgrav 826c8094600SDag-Erling Smørgrav # unbound server certificate file. 827c8094600SDag-Erling Smørgrav # server-cert-file: "/var/unbound/unbound_server.pem" 828c8094600SDag-Erling Smørgrav 829c8094600SDag-Erling Smørgrav # unbound-control key file. 830c8094600SDag-Erling Smørgrav # control-key-file: "/var/unbound/unbound_control.key" 831c8094600SDag-Erling Smørgrav 832c8094600SDag-Erling Smørgrav # unbound-control certificate file. 833c8094600SDag-Erling Smørgrav # control-cert-file: "/var/unbound/unbound_control.pem" 834c8094600SDag-Erling Smørgrav 835c8094600SDag-Erling Smørgrav# Stub zones. 836c8094600SDag-Erling Smørgrav# Create entries like below, to make all queries for 'example.com' and 837c8094600SDag-Erling Smørgrav# 'example.org' go to the given list of nameservers. list zero or more 838c8094600SDag-Erling Smørgrav# nameservers by hostname or by ipaddress. If you set stub-prime to yes, 839c8094600SDag-Erling Smørgrav# the list is treated as priming hints (default is no). 840c8094600SDag-Erling Smørgrav# With stub-first yes, it attempts without the stub if it fails. 841b75612f8SDag-Erling Smørgrav# Consider adding domain-insecure: name and local-zone: name nodefault 842b75612f8SDag-Erling Smørgrav# to the server: section if the stub is a locally served zone. 843c8094600SDag-Erling Smørgrav# stub-zone: 844c8094600SDag-Erling Smørgrav# name: "example.com" 845c8094600SDag-Erling Smørgrav# stub-addr: 192.0.2.68 846c8094600SDag-Erling Smørgrav# stub-prime: no 847c8094600SDag-Erling Smørgrav# stub-first: no 84857bddd21SDag-Erling Smørgrav# stub-tls-upstream: no 849*4c75e3aaSDag-Erling Smørgrav# stub-no-cache: no 850c8094600SDag-Erling Smørgrav# stub-zone: 851c8094600SDag-Erling Smørgrav# name: "example.org" 852c8094600SDag-Erling Smørgrav# stub-host: ns.example.com. 853c8094600SDag-Erling Smørgrav 854c8094600SDag-Erling Smørgrav# Forward zones 855c8094600SDag-Erling Smørgrav# Create entries like below, to make all queries for 'example.com' and 856c8094600SDag-Erling Smørgrav# 'example.org' go to the given list of servers. These servers have to handle 857c8094600SDag-Erling Smørgrav# recursion to other nameservers. List zero or more nameservers by hostname 858c8094600SDag-Erling Smørgrav# or by ipaddress. Use an entry with name "." to forward all queries. 859c8094600SDag-Erling Smørgrav# If you enable forward-first, it attempts without the forward if it fails. 860c8094600SDag-Erling Smørgrav# forward-zone: 861c8094600SDag-Erling Smørgrav# name: "example.com" 862c8094600SDag-Erling Smørgrav# forward-addr: 192.0.2.68 863c8094600SDag-Erling Smørgrav# forward-addr: 192.0.2.73@5355 # forward to port 5355. 864c8094600SDag-Erling Smørgrav# forward-first: no 86557bddd21SDag-Erling Smørgrav# forward-tls-upstream: no 866*4c75e3aaSDag-Erling Smørgrav# forward-no-cache: no 867c8094600SDag-Erling Smørgrav# forward-zone: 868c8094600SDag-Erling Smørgrav# name: "example.org" 869c8094600SDag-Erling Smørgrav# forward-host: fwd.example.com 8703005e0a3SDag-Erling Smørgrav 87157bddd21SDag-Erling Smørgrav# Authority zones 87257bddd21SDag-Erling Smørgrav# The data for these zones is kept locally, from a file or downloaded. 87357bddd21SDag-Erling Smørgrav# The data can be served to downstream clients, or used instead of the 87457bddd21SDag-Erling Smørgrav# upstream (which saves a lookup to the upstream). The first example 87557bddd21SDag-Erling Smørgrav# has a copy of the root for local usage. The second serves example.org 87657bddd21SDag-Erling Smørgrav# authoritatively. zonefile: reads from file (and writes to it if you also 87757bddd21SDag-Erling Smørgrav# download it), master: fetches with AXFR and IXFR, or url to zonefile. 8780fb34990SDag-Erling Smørgrav# With allow-notify: you can give additional (apart from masters) sources of 8790fb34990SDag-Erling Smørgrav# notifies. 88057bddd21SDag-Erling Smørgrav# auth-zone: 88157bddd21SDag-Erling Smørgrav# name: "." 88257bddd21SDag-Erling Smørgrav# for-downstream: no 88357bddd21SDag-Erling Smørgrav# for-upstream: yes 88457bddd21SDag-Erling Smørgrav# fallback-enabled: yes 88557bddd21SDag-Erling Smørgrav# master: b.root-servers.net 88657bddd21SDag-Erling Smørgrav# master: c.root-servers.net 88757bddd21SDag-Erling Smørgrav# master: e.root-servers.net 88857bddd21SDag-Erling Smørgrav# master: f.root-servers.net 88957bddd21SDag-Erling Smørgrav# master: g.root-servers.net 89057bddd21SDag-Erling Smørgrav# master: k.root-servers.net 89157bddd21SDag-Erling Smørgrav# auth-zone: 89257bddd21SDag-Erling Smørgrav# name: "example.org" 89357bddd21SDag-Erling Smørgrav# for-downstream: yes 89457bddd21SDag-Erling Smørgrav# for-upstream: yes 89557bddd21SDag-Erling Smørgrav# zonefile: "example.org.zone" 89657bddd21SDag-Erling Smørgrav 8973005e0a3SDag-Erling Smørgrav# Views 8983005e0a3SDag-Erling Smørgrav# Create named views. Name must be unique. Map views to requests using 8993005e0a3SDag-Erling Smørgrav# the access-control-view option. Views can contain zero or more local-zone 9003005e0a3SDag-Erling Smørgrav# and local-data options. Options from matching views will override global 9013005e0a3SDag-Erling Smørgrav# options. Global options will be used if no matching view is found. 9023005e0a3SDag-Erling Smørgrav# With view-first yes, it will try to answer using the global local-zone and 9033005e0a3SDag-Erling Smørgrav# local-data elements if there is no view specific match. 9043005e0a3SDag-Erling Smørgrav# view: 9053005e0a3SDag-Erling Smørgrav# name: "viewname" 9063005e0a3SDag-Erling Smørgrav# local-zone: "example.com" redirect 9073005e0a3SDag-Erling Smørgrav# local-data: "example.com A 192.0.2.3" 90865b390aaSDag-Erling Smørgrav# local-data-ptr: "192.0.2.3 www.example.com" 9093005e0a3SDag-Erling Smørgrav# view-first: no 9103005e0a3SDag-Erling Smørgrav# view: 9113005e0a3SDag-Erling Smørgrav# name: "anotherview" 9123005e0a3SDag-Erling Smørgrav# local-zone: "example.com" refuse 91365b390aaSDag-Erling Smørgrav 91465b390aaSDag-Erling Smørgrav# DNSCrypt 91565b390aaSDag-Erling Smørgrav# Caveats: 91665b390aaSDag-Erling Smørgrav# 1. the keys/certs cannot be produced by unbound. You can use dnscrypt-wrapper 91765b390aaSDag-Erling Smørgrav# for this: https://github.com/cofyc/dnscrypt-wrapper/blob/master/README.md#usage 91865b390aaSDag-Erling Smørgrav# 2. dnscrypt channel attaches to an interface. you MUST set interfaces to 91965b390aaSDag-Erling Smørgrav# listen on `dnscrypt-port` with the follo0wing snippet: 92065b390aaSDag-Erling Smørgrav# server: 92165b390aaSDag-Erling Smørgrav# interface: 0.0.0.0@443 92265b390aaSDag-Erling Smørgrav# interface: ::0@443 92365b390aaSDag-Erling Smørgrav# 92465b390aaSDag-Erling Smørgrav# Finally, `dnscrypt` config has its own section. 92565b390aaSDag-Erling Smørgrav# dnscrypt: 92665b390aaSDag-Erling Smørgrav# dnscrypt-enable: yes 92765b390aaSDag-Erling Smørgrav# dnscrypt-port: 443 92865b390aaSDag-Erling Smørgrav# dnscrypt-provider: 2.dnscrypt-cert.example.com. 92965b390aaSDag-Erling Smørgrav# dnscrypt-secret-key: /path/unbound-conf/keys1/1.key 93065b390aaSDag-Erling Smørgrav# dnscrypt-secret-key: /path/unbound-conf/keys2/1.key 93165b390aaSDag-Erling Smørgrav# dnscrypt-provider-cert: /path/unbound-conf/keys1/1.cert 93265b390aaSDag-Erling Smørgrav# dnscrypt-provider-cert: /path/unbound-conf/keys2/1.cert 933971980c3SDag-Erling Smørgrav 934971980c3SDag-Erling Smørgrav# CacheDB 935971980c3SDag-Erling Smørgrav# Enable external backend DB as auxiliary cache. Specify the backend name 936971980c3SDag-Erling Smørgrav# (default is "testframe", which has no use other than for debugging and 937971980c3SDag-Erling Smørgrav# testing) and backend-specific options. The 'cachedb' module must be 938971980c3SDag-Erling Smørgrav# included in module-config. 939971980c3SDag-Erling Smørgrav# cachedb: 940971980c3SDag-Erling Smørgrav# backend: "testframe" 941971980c3SDag-Erling Smørgrav# # secret seed string to calculate hashed keys 942971980c3SDag-Erling Smørgrav# secret-seed: "default" 9430fb34990SDag-Erling Smørgrav# 9440fb34990SDag-Erling Smørgrav# # For "redis" backend: 9450fb34990SDag-Erling Smørgrav# # redis server's IP address or host name 9460fb34990SDag-Erling Smørgrav# redis-server-host: 127.0.0.1 9470fb34990SDag-Erling Smørgrav# # redis server's TCP port 9480fb34990SDag-Erling Smørgrav# redis-server-port: 6379 9490fb34990SDag-Erling Smørgrav# # timeout (in ms) for communication with the redis server 9500fb34990SDag-Erling Smørgrav# redis-timeout: 100 951