1b7579f77SDag-Erling Smørgrav# 2b7579f77SDag-Erling Smørgrav# Example configuration file. 3b7579f77SDag-Erling Smørgrav# 4*8f76bb7dSCy Schubert# See unbound.conf(5) man page, version 1.18.0. 5b7579f77SDag-Erling Smørgrav# 6b7579f77SDag-Erling Smørgrav# this is a comment. 7b7579f77SDag-Erling Smørgrav 825039b37SCy Schubert# Use this anywhere in the file to include other text into this file. 9b7579f77SDag-Erling Smørgrav#include: "otherfile.conf" 10b7579f77SDag-Erling Smørgrav 1125039b37SCy Schubert# Use this anywhere in the file to include other text, that explicitly starts a 1225039b37SCy Schubert# clause, into this file. Text after this directive needs to start a clause. 1325039b37SCy Schubert#include-toplevel: "otherfile.conf" 1425039b37SCy Schubert 15b7579f77SDag-Erling Smørgrav# The server clause sets the main parameters. 16b7579f77SDag-Erling Smørgravserver: 17b7579f77SDag-Erling Smørgrav # whitespace is not necessary, but looks cleaner. 18b7579f77SDag-Erling Smørgrav 19b7579f77SDag-Erling Smørgrav # verbosity number, 0 is least verbose. 1 is default. 20865f46b2SCy Schubert # verbosity: 1 21b7579f77SDag-Erling Smørgrav 22b7579f77SDag-Erling Smørgrav # print statistics to the log (for every thread) every N seconds. 23b7579f77SDag-Erling Smørgrav # Set to "" or 0 to disable. Default is disabled. 24b7579f77SDag-Erling Smørgrav # statistics-interval: 0 25b7579f77SDag-Erling Smørgrav 2665b390aaSDag-Erling Smørgrav # enable shm for stats, default no. if you enable also enable 2765b390aaSDag-Erling Smørgrav # statistics-interval, every time it also writes stats to the 2865b390aaSDag-Erling Smørgrav # shared memory segment keyed with shm-key. 2965b390aaSDag-Erling Smørgrav # shm-enable: no 3065b390aaSDag-Erling Smørgrav 3165b390aaSDag-Erling Smørgrav # shm for stats uses this key, and key+1 for the shared mem segment. 3265b390aaSDag-Erling Smørgrav # shm-key: 11777 3365b390aaSDag-Erling Smørgrav 34b7579f77SDag-Erling Smørgrav # enable cumulative statistics, without clearing them after printing. 35b7579f77SDag-Erling Smørgrav # statistics-cumulative: no 36b7579f77SDag-Erling Smørgrav 37b7579f77SDag-Erling Smørgrav # enable extended statistics (query types, answer codes, status) 381838dec3SCy Schubert # printed from unbound-control. Default off, because of speed. 39b7579f77SDag-Erling Smørgrav # extended-statistics: no 40b7579f77SDag-Erling Smørgrav 411838dec3SCy Schubert # Inhibits selected extended statistics (qtype, qclass, qopcode, rcode, 421838dec3SCy Schubert # rpz-actions) from printing if their value is 0. 431838dec3SCy Schubert # Default on. 441838dec3SCy Schubert # statistics-inhibit-zero: yes 451838dec3SCy Schubert 46b7579f77SDag-Erling Smørgrav # number of threads to create. 1 disables threading. 47b7579f77SDag-Erling Smørgrav # num-threads: 1 48b7579f77SDag-Erling Smørgrav 49b7579f77SDag-Erling Smørgrav # specify the interfaces to answer queries from by ip-address. 50b7579f77SDag-Erling Smørgrav # The default is to listen to localhost (127.0.0.1 and ::1). 51b7579f77SDag-Erling Smørgrav # specify 0.0.0.0 and ::0 to bind to all available interfaces. 52b7579f77SDag-Erling Smørgrav # specify every interface[@port] on a new 'interface:' labelled line. 53b7579f77SDag-Erling Smørgrav # The listen interfaces are not changed on reload, only on restart. 54b7579f77SDag-Erling Smørgrav # interface: 192.0.2.153 55b7579f77SDag-Erling Smørgrav # interface: 192.0.2.154 56b7579f77SDag-Erling Smørgrav # interface: 192.0.2.154@5003 57b7579f77SDag-Erling Smørgrav # interface: 2001:DB8::5 58865f46b2SCy Schubert # interface: eth0@5003 59b7579f77SDag-Erling Smørgrav 60b7579f77SDag-Erling Smørgrav # enable this feature to copy the source address of queries to reply. 61b7579f77SDag-Erling Smørgrav # Socket options are not supported on all platforms. experimental. 62b7579f77SDag-Erling Smørgrav # interface-automatic: no 63b7579f77SDag-Erling Smørgrav 64a39a5a69SCy Schubert # instead of the default port, open additional ports separated by 65a39a5a69SCy Schubert # spaces when interface-automatic is enabled, by listing them here. 66a39a5a69SCy Schubert # interface-automatic-ports: "" 67a39a5a69SCy Schubert 68b7579f77SDag-Erling Smørgrav # port to answer queries from 69b7579f77SDag-Erling Smørgrav # port: 53 70b7579f77SDag-Erling Smørgrav 71b7579f77SDag-Erling Smørgrav # specify the interfaces to send outgoing queries to authoritative 72b7579f77SDag-Erling Smørgrav # server from by ip-address. If none, the default (all) interface 73b7579f77SDag-Erling Smørgrav # is used. Specify every interface on a 'outgoing-interface:' line. 74b7579f77SDag-Erling Smørgrav # outgoing-interface: 192.0.2.153 75b7579f77SDag-Erling Smørgrav # outgoing-interface: 2001:DB8::5 76b7579f77SDag-Erling Smørgrav # outgoing-interface: 2001:DB8::6 77b7579f77SDag-Erling Smørgrav 78b5663de9SDag-Erling Smørgrav # Specify a netblock to use remainder 64 bits as random bits for 79b5663de9SDag-Erling Smørgrav # upstream queries. Uses freebind option (Linux). 80b5663de9SDag-Erling Smørgrav # outgoing-interface: 2001:DB8::/64 81b5663de9SDag-Erling Smørgrav # Also (Linux:) ip -6 addr add 2001:db8::/64 dev lo 82b5663de9SDag-Erling Smørgrav # And: ip -6 route add local 2001:db8::/64 dev lo 83b5663de9SDag-Erling Smørgrav # And set prefer-ip6: yes to use the ip6 randomness from a netblock. 84b5663de9SDag-Erling Smørgrav # Set this to yes to prefer ipv6 upstream servers over ipv4. 85b5663de9SDag-Erling Smørgrav # prefer-ip6: no 86b5663de9SDag-Erling Smørgrav 8725039b37SCy Schubert # Prefer ipv4 upstream servers, even if ipv6 is available. 8825039b37SCy Schubert # prefer-ip4: no 8925039b37SCy Schubert 90b7579f77SDag-Erling Smørgrav # number of ports to allocate per thread, determines the size of the 91b7579f77SDag-Erling Smørgrav # port range that can be open simultaneously. About double the 92b7579f77SDag-Erling Smørgrav # num-queries-per-thread, or, use as many as the OS will allow you. 93b7579f77SDag-Erling Smørgrav # outgoing-range: 4096 94b7579f77SDag-Erling Smørgrav 959cf5bc93SCy Schubert # permit Unbound to use this port number or port range for 96b7579f77SDag-Erling Smørgrav # making outgoing queries, using an outgoing interface. 97b7579f77SDag-Erling Smørgrav # outgoing-port-permit: 32768 98b7579f77SDag-Erling Smørgrav 999cf5bc93SCy Schubert # deny Unbound the use this of port number or port range for 100b7579f77SDag-Erling Smørgrav # making outgoing queries, using an outgoing interface. 1019cf5bc93SCy Schubert # Use this to make sure Unbound does not grab a UDP port that some 102b7579f77SDag-Erling Smørgrav # other server on this computer needs. The default is to avoid 103b7579f77SDag-Erling Smørgrav # IANA-assigned port numbers. 1048ed2b524SDag-Erling Smørgrav # If multiple outgoing-port-permit and outgoing-port-avoid options 1058ed2b524SDag-Erling Smørgrav # are present, they are processed in order. 106b7579f77SDag-Erling Smørgrav # outgoing-port-avoid: "3200-3208" 107b7579f77SDag-Erling Smørgrav 108b7579f77SDag-Erling Smørgrav # number of outgoing simultaneous tcp buffers to hold per thread. 109b7579f77SDag-Erling Smørgrav # outgoing-num-tcp: 10 110b7579f77SDag-Erling Smørgrav 111b7579f77SDag-Erling Smørgrav # number of incoming simultaneous tcp buffers to hold per thread. 112b7579f77SDag-Erling Smørgrav # incoming-num-tcp: 10 113b7579f77SDag-Erling Smørgrav 114b7579f77SDag-Erling Smørgrav # buffer size for UDP port 53 incoming (SO_RCVBUF socket option). 115b7579f77SDag-Erling Smørgrav # 0 is system default. Use 4m to catch query spikes for busy servers. 116b7579f77SDag-Erling Smørgrav # so-rcvbuf: 0 117b7579f77SDag-Erling Smørgrav 118b7579f77SDag-Erling Smørgrav # buffer size for UDP port 53 outgoing (SO_SNDBUF socket option). 119b7579f77SDag-Erling Smørgrav # 0 is system default. Use 4m to handle spikes on very busy servers. 120b7579f77SDag-Erling Smørgrav # so-sndbuf: 0 121b7579f77SDag-Erling Smørgrav 122ff825849SDag-Erling Smørgrav # use SO_REUSEPORT to distribute queries over threads. 123e86b9096SDag-Erling Smørgrav # at extreme load it could be better to turn it off to distribute even. 1244c75e3aaSDag-Erling Smørgrav # so-reuseport: yes 12517d15b25SDag-Erling Smørgrav 12609a3aaf3SDag-Erling Smørgrav # use IP_TRANSPARENT so the interface: addresses can be non-local 12709a3aaf3SDag-Erling Smørgrav # and you can config non-existing IPs that are going to work later on 128f61ef7f6SDag-Erling Smørgrav # (uses IP_BINDANY on FreeBSD). 12909a3aaf3SDag-Erling Smørgrav # ip-transparent: no 13009a3aaf3SDag-Erling Smørgrav 131e2d15004SDag-Erling Smørgrav # use IP_FREEBIND so the interface: addresses can be non-local 132e2d15004SDag-Erling Smørgrav # and you can bind to nonexisting IPs and interfaces that are down. 133e2d15004SDag-Erling Smørgrav # Linux only. On Linux you also have ip-transparent that is similar. 134e2d15004SDag-Erling Smørgrav # ip-freebind: no 135e2d15004SDag-Erling Smørgrav 13625039b37SCy Schubert # the value of the Differentiated Services Codepoint (DSCP) 13725039b37SCy Schubert # in the differentiated services field (DS) of the outgoing 13825039b37SCy Schubert # IP packets 13925039b37SCy Schubert # ip-dscp: 0 14025039b37SCy Schubert 141b7579f77SDag-Erling Smørgrav # EDNS reassembly buffer to advertise to UDP peers (the actual buffer 142c0caa2e2SCy Schubert # is set with msg-buffer-size). 143c0caa2e2SCy Schubert # edns-buffer-size: 1232 144b7579f77SDag-Erling Smørgrav 14517d15b25SDag-Erling Smørgrav # Maximum UDP response size (not applied to TCP response). 146*8f76bb7dSCy Schubert # Suggested values are 512 to 4096. Default is 1232. 65536 disables it. 147*8f76bb7dSCy Schubert # max-udp-size: 1232 14817d15b25SDag-Erling Smørgrav 149e86b9096SDag-Erling Smørgrav # max memory to use for stream(tcp and tls) waiting result buffers. 150e86b9096SDag-Erling Smørgrav # stream-wait-size: 4m 151e86b9096SDag-Erling Smørgrav 152b7579f77SDag-Erling Smørgrav # buffer size for handling DNS data. No messages larger than this 153b7579f77SDag-Erling Smørgrav # size can be sent or received, by UDP or TCP. In bytes. 154b7579f77SDag-Erling Smørgrav # msg-buffer-size: 65552 155b7579f77SDag-Erling Smørgrav 156b7579f77SDag-Erling Smørgrav # the amount of memory to use for the message cache. 157b7579f77SDag-Erling Smørgrav # plain value in bytes or you can append k, m or G. default is "4Mb". 158b7579f77SDag-Erling Smørgrav # msg-cache-size: 4m 159b7579f77SDag-Erling Smørgrav 160b7579f77SDag-Erling Smørgrav # the number of slabs to use for the message cache. 161b7579f77SDag-Erling Smørgrav # the number of slabs must be a power of 2. 162b7579f77SDag-Erling Smørgrav # more slabs reduce lock contention, but fragment memory usage. 163b7579f77SDag-Erling Smørgrav # msg-cache-slabs: 4 164b7579f77SDag-Erling Smørgrav 165b7579f77SDag-Erling Smørgrav # the number of queries that a thread gets to service. 166b7579f77SDag-Erling Smørgrav # num-queries-per-thread: 1024 167b7579f77SDag-Erling Smørgrav 168b7579f77SDag-Erling Smørgrav # if very busy, 50% queries run to completion, 50% get timeout in msec 169b7579f77SDag-Erling Smørgrav # jostle-timeout: 200 170b7579f77SDag-Erling Smørgrav 17117d15b25SDag-Erling Smørgrav # msec to wait before close of port on timeout UDP. 0 disables. 17217d15b25SDag-Erling Smørgrav # delay-close: 0 17317d15b25SDag-Erling Smørgrav 174369c6923SCy Schubert # perform connect for UDP sockets to mitigate ICMP side channel. 175369c6923SCy Schubert # udp-connect: yes 176369c6923SCy Schubert 177790c6b24SCy Schubert # The number of retries, per upstream nameserver in a delegation, when 178790c6b24SCy Schubert # a throwaway response (also timeouts) is received. 17924e36522SCy Schubert # outbound-msg-retry: 5 18024e36522SCy Schubert 1811838dec3SCy Schubert # Hard limit on the number of outgoing queries Unbound will make while 1821838dec3SCy Schubert # resolving a name, making sure large NS sets do not loop. 1831838dec3SCy Schubert # It resets on query restarts (e.g., CNAME) and referrals. 1841838dec3SCy Schubert # max-sent-count: 32 1851838dec3SCy Schubert 1861838dec3SCy Schubert # Hard limit on the number of times Unbound is allowed to restart a 1871838dec3SCy Schubert # query upon encountering a CNAME record. 1881838dec3SCy Schubert # max-query-restarts: 11 1891838dec3SCy Schubert 190e86b9096SDag-Erling Smørgrav # msec for waiting for an unknown server to reply. Increase if you 191e86b9096SDag-Erling Smørgrav # are behind a slow satellite link, to eg. 1128. 192e86b9096SDag-Erling Smørgrav # unknown-server-time-limit: 376 193e86b9096SDag-Erling Smørgrav 194b7579f77SDag-Erling Smørgrav # the amount of memory to use for the RRset cache. 195b7579f77SDag-Erling Smørgrav # plain value in bytes or you can append k, m or G. default is "4Mb". 196b7579f77SDag-Erling Smørgrav # rrset-cache-size: 4m 197b7579f77SDag-Erling Smørgrav 198b7579f77SDag-Erling Smørgrav # the number of slabs to use for the RRset cache. 199b7579f77SDag-Erling Smørgrav # the number of slabs must be a power of 2. 200b7579f77SDag-Erling Smørgrav # more slabs reduce lock contention, but fragment memory usage. 201b7579f77SDag-Erling Smørgrav # rrset-cache-slabs: 4 202b7579f77SDag-Erling Smørgrav 203b7579f77SDag-Erling Smørgrav # the time to live (TTL) value lower bound, in seconds. Default 0. 204b7579f77SDag-Erling Smørgrav # If more than an hour could easily give trouble due to stale data. 205b7579f77SDag-Erling Smørgrav # cache-min-ttl: 0 206b7579f77SDag-Erling Smørgrav 207b7579f77SDag-Erling Smørgrav # the time to live (TTL) value cap for RRsets and messages in the 208b7579f77SDag-Erling Smørgrav # cache. Items are not cached for longer. In seconds. 209b7579f77SDag-Erling Smørgrav # cache-max-ttl: 86400 210b7579f77SDag-Erling Smørgrav 21109a3aaf3SDag-Erling Smørgrav # the time to live (TTL) value cap for negative responses in the cache 21209a3aaf3SDag-Erling Smørgrav # cache-max-negative-ttl: 3600 21309a3aaf3SDag-Erling Smørgrav 214b7579f77SDag-Erling Smørgrav # the time to live (TTL) value for cached roundtrip times, lameness and 215b7579f77SDag-Erling Smørgrav # EDNS version information for hosts. In seconds. 216b7579f77SDag-Erling Smørgrav # infra-host-ttl: 900 217b7579f77SDag-Erling Smørgrav 2186480faa8SDag-Erling Smørgrav # minimum wait time for responses, increase if uplink is long. In msec. 2196480faa8SDag-Erling Smørgrav # infra-cache-min-rtt: 50 2206480faa8SDag-Erling Smørgrav 221790c6b24SCy Schubert # maximum wait time for responses. In msec. 222790c6b24SCy Schubert # infra-cache-max-rtt: 120000 223790c6b24SCy Schubert 224369c6923SCy Schubert # enable to make server probe down hosts more frequently. 225369c6923SCy Schubert # infra-keep-probing: no 226369c6923SCy Schubert 227b7579f77SDag-Erling Smørgrav # the number of slabs to use for the Infrastructure cache. 228b7579f77SDag-Erling Smørgrav # the number of slabs must be a power of 2. 229b7579f77SDag-Erling Smørgrav # more slabs reduce lock contention, but fragment memory usage. 230b7579f77SDag-Erling Smørgrav # infra-cache-slabs: 4 231b7579f77SDag-Erling Smørgrav 232b7579f77SDag-Erling Smørgrav # the maximum number of hosts that are cached (roundtrip, EDNS, lame). 233b7579f77SDag-Erling Smørgrav # infra-cache-numhosts: 10000 234b7579f77SDag-Erling Smørgrav 235865f46b2SCy Schubert # define a number of tags here, use with local-zone, access-control, 236865f46b2SCy Schubert # interface-*. 237b5663de9SDag-Erling Smørgrav # repeat the define-tag statement to add additional tags. 238b5663de9SDag-Erling Smørgrav # define-tag: "tag1 tag2 tag3" 239b5663de9SDag-Erling Smørgrav 240b7579f77SDag-Erling Smørgrav # Enable IPv4, "yes" or "no". 241b7579f77SDag-Erling Smørgrav # do-ip4: yes 242b7579f77SDag-Erling Smørgrav 243b7579f77SDag-Erling Smørgrav # Enable IPv6, "yes" or "no". 244b7579f77SDag-Erling Smørgrav # do-ip6: yes 245b7579f77SDag-Erling Smørgrav 246*8f76bb7dSCy Schubert # If running unbound on an IPv6-only host, domains that only have 247*8f76bb7dSCy Schubert # IPv4 servers would become unresolveable. If NAT64 is available in 248*8f76bb7dSCy Schubert # the network, unbound can use NAT64 to reach these servers with 249*8f76bb7dSCy Schubert # the following option. This is NOT needed for enabling DNS64 on a 250*8f76bb7dSCy Schubert # system that has IPv4 connectivity. 251*8f76bb7dSCy Schubert # Consider also enabling prefer-ip6 to prefer native IPv6 connections 252*8f76bb7dSCy Schubert # to nameservers. 253*8f76bb7dSCy Schubert # do-nat64: no 254*8f76bb7dSCy Schubert 255*8f76bb7dSCy Schubert # NAT64 prefix. Defaults to using dns64-prefix value. 256*8f76bb7dSCy Schubert # nat64-prefix: 64:ff9b::0/96 257*8f76bb7dSCy Schubert 258b7579f77SDag-Erling Smørgrav # Enable UDP, "yes" or "no". 259b7579f77SDag-Erling Smørgrav # do-udp: yes 260b7579f77SDag-Erling Smørgrav 261b7579f77SDag-Erling Smørgrav # Enable TCP, "yes" or "no". 262b7579f77SDag-Erling Smørgrav # do-tcp: yes 263b7579f77SDag-Erling Smørgrav 264b7579f77SDag-Erling Smørgrav # upstream connections use TCP only (and no UDP), "yes" or "no" 265b7579f77SDag-Erling Smørgrav # useful for tunneling scenarios, default no. 266b7579f77SDag-Erling Smørgrav # tcp-upstream: no 267b7579f77SDag-Erling Smørgrav 2688a384985SDag-Erling Smørgrav # upstream connections also use UDP (even if do-udp is no). 2698a384985SDag-Erling Smørgrav # useful if if you want UDP upstream, but don't provide UDP downstream. 2708a384985SDag-Erling Smørgrav # udp-upstream-without-downstream: no 2718a384985SDag-Erling Smørgrav 272f61ef7f6SDag-Erling Smørgrav # Maximum segment size (MSS) of TCP socket on which the server 273f61ef7f6SDag-Erling Smørgrav # responds to queries. Default is 0, system default MSS. 274f61ef7f6SDag-Erling Smørgrav # tcp-mss: 0 275f61ef7f6SDag-Erling Smørgrav 276f61ef7f6SDag-Erling Smørgrav # Maximum segment size (MSS) of TCP socket for outgoing queries. 277f61ef7f6SDag-Erling Smørgrav # Default is 0, system default MSS. 278f61ef7f6SDag-Erling Smørgrav # outgoing-tcp-mss: 0 279f61ef7f6SDag-Erling Smørgrav 2804c75e3aaSDag-Erling Smørgrav # Idle TCP timeout, connection closed in milliseconds 2814c75e3aaSDag-Erling Smørgrav # tcp-idle-timeout: 30000 2824c75e3aaSDag-Erling Smørgrav 2834c75e3aaSDag-Erling Smørgrav # Enable EDNS TCP keepalive option. 2844c75e3aaSDag-Erling Smørgrav # edns-tcp-keepalive: no 2854c75e3aaSDag-Erling Smørgrav 2864c75e3aaSDag-Erling Smørgrav # Timeout for EDNS TCP keepalive, in msec. 2874c75e3aaSDag-Erling Smørgrav # edns-tcp-keepalive-timeout: 120000 2884c75e3aaSDag-Erling Smørgrav 289*8f76bb7dSCy Schubert # UDP queries that have waited in the socket buffer for a long time 290*8f76bb7dSCy Schubert # can be dropped. Default is 0, disabled. In seconds, such as 3. 291*8f76bb7dSCy Schubert # sock-queue-timeout: 0 292*8f76bb7dSCy Schubert 2933005e0a3SDag-Erling Smørgrav # Use systemd socket activation for UDP, TCP, and control sockets. 2943005e0a3SDag-Erling Smørgrav # use-systemd: no 2953005e0a3SDag-Erling Smørgrav 296b7579f77SDag-Erling Smørgrav # Detach from the terminal, run in background, "yes" or "no". 2979cf5bc93SCy Schubert # Set the value to "no" when Unbound runs as systemd service. 298b7579f77SDag-Erling Smørgrav # do-daemonize: yes 299b7579f77SDag-Erling Smørgrav 300b7579f77SDag-Erling Smørgrav # control which clients are allowed to make (recursive) queries 301b7579f77SDag-Erling Smørgrav # to this server. Specify classless netblocks with /size and action. 302b7579f77SDag-Erling Smørgrav # By default everything is refused, except for localhost. 303b7579f77SDag-Erling Smørgrav # Choose deny (drop message), refuse (polite error reply), 3043bd4df0aSDag-Erling Smørgrav # allow (recursive ok), allow_setrd (recursive ok, rd bit is forced on), 3053bd4df0aSDag-Erling Smørgrav # allow_snoop (recursive and nonrecursive ok) 30617d15b25SDag-Erling Smørgrav # deny_non_local (drop queries unless can be answered from local-data) 30717d15b25SDag-Erling Smørgrav # refuse_non_local (like deny_non_local but polite error reply). 308b7579f77SDag-Erling Smørgrav # access-control: 127.0.0.0/8 allow 309b7579f77SDag-Erling Smørgrav # access-control: ::1 allow 310b7579f77SDag-Erling Smørgrav # access-control: ::ffff:127.0.0.1 allow 311b7579f77SDag-Erling Smørgrav 312b5663de9SDag-Erling Smørgrav # tag access-control with list of tags (in "" with spaces between) 313b5663de9SDag-Erling Smørgrav # Clients using this access control element use localzones that 314b5663de9SDag-Erling Smørgrav # are tagged with one of these tags. 315b5663de9SDag-Erling Smørgrav # access-control-tag: 192.0.2.0/24 "tag2 tag3" 316b5663de9SDag-Erling Smørgrav 317865f46b2SCy Schubert # set action for particular tag for given access control element. 318b5663de9SDag-Erling Smørgrav # if you have multiple tag values, the tag used to lookup the action 319b5663de9SDag-Erling Smørgrav # is the first tag match between access-control-tag and local-zone-tag 320b5663de9SDag-Erling Smørgrav # where "first" comes from the order of the define-tag values. 321b5663de9SDag-Erling Smørgrav # access-control-tag-action: 192.0.2.0/24 tag3 refuse 322b5663de9SDag-Erling Smørgrav 323b5663de9SDag-Erling Smørgrav # set redirect data for particular tag for access control element 324b5663de9SDag-Erling Smørgrav # access-control-tag-data: 192.0.2.0/24 tag2 "A 127.0.0.1" 325b5663de9SDag-Erling Smørgrav 326bc892140SDag-Erling Smørgrav # Set view for access control element 327bc892140SDag-Erling Smørgrav # access-control-view: 192.0.2.0/24 viewname 328bc892140SDag-Erling Smørgrav 329865f46b2SCy Schubert # Similar to 'access-control:' but for interfaces. 330865f46b2SCy Schubert # Control which listening interfaces are allowed to accept (recursive) 331865f46b2SCy Schubert # queries for this server. 332865f46b2SCy Schubert # The specified interfaces should be the same as the ones specified in 333865f46b2SCy Schubert # 'interface:' followed by the action. 334865f46b2SCy Schubert # The actions are the same as 'access-control:' above. 335865f46b2SCy Schubert # By default all the interfaces configured are refused. 336865f46b2SCy Schubert # Note: any 'access-control*:' setting overrides all 'interface-*:' 337865f46b2SCy Schubert # settings for targeted clients. 338865f46b2SCy Schubert # interface-action: 192.0.2.153 allow 339865f46b2SCy Schubert # interface-action: 192.0.2.154 allow 340865f46b2SCy Schubert # interface-action: 192.0.2.154@5003 allow 341865f46b2SCy Schubert # interface-action: 2001:DB8::5 allow 342865f46b2SCy Schubert # interface-action: eth0@5003 allow 343865f46b2SCy Schubert 344865f46b2SCy Schubert # Similar to 'access-control-tag:' but for interfaces. 345865f46b2SCy Schubert # Tag interfaces with a list of tags (in "" with spaces between). 346865f46b2SCy Schubert # Interfaces using these tags use localzones that are tagged with one 347865f46b2SCy Schubert # of these tags. 348865f46b2SCy Schubert # The specified interfaces should be the same as the ones specified in 349865f46b2SCy Schubert # 'interface:' followed by the list of tags. 350865f46b2SCy Schubert # Note: any 'access-control*:' setting overrides all 'interface-*:' 351865f46b2SCy Schubert # settings for targeted clients. 352865f46b2SCy Schubert # interface-tag: eth0@5003 "tag2 tag3" 353865f46b2SCy Schubert 354865f46b2SCy Schubert # Similar to 'access-control-tag-action:' but for interfaces. 355865f46b2SCy Schubert # Set action for particular tag for a given interface element. 356865f46b2SCy Schubert # If you have multiple tag values, the tag used to lookup the action 357865f46b2SCy Schubert # is the first tag match between interface-tag and local-zone-tag 358865f46b2SCy Schubert # where "first" comes from the order of the define-tag values. 359865f46b2SCy Schubert # The specified interfaces should be the same as the ones specified in 360865f46b2SCy Schubert # 'interface:' followed by the tag and action. 361865f46b2SCy Schubert # Note: any 'access-control*:' setting overrides all 'interface-*:' 362865f46b2SCy Schubert # settings for targeted clients. 363865f46b2SCy Schubert # interface-tag-action: eth0@5003 tag3 refuse 364865f46b2SCy Schubert 365865f46b2SCy Schubert # Similar to 'access-control-tag-data:' but for interfaces. 366865f46b2SCy Schubert # Set redirect data for a particular tag for an interface element. 367865f46b2SCy Schubert # The specified interfaces should be the same as the ones specified in 368865f46b2SCy Schubert # 'interface:' followed by the tag and the redirect data. 369865f46b2SCy Schubert # Note: any 'access-control*:' setting overrides all 'interface-*:' 370865f46b2SCy Schubert # settings for targeted clients. 371865f46b2SCy Schubert # interface-tag-data: eth0@5003 tag2 "A 127.0.0.1" 372865f46b2SCy Schubert 373865f46b2SCy Schubert # Similar to 'access-control-view:' but for interfaces. 374865f46b2SCy Schubert # Set view for an interface element. 375865f46b2SCy Schubert # The specified interfaces should be the same as the ones specified in 376865f46b2SCy Schubert # 'interface:' followed by the view name. 377865f46b2SCy Schubert # Note: any 'access-control*:' setting overrides all 'interface-*:' 378865f46b2SCy Schubert # settings for targeted clients. 379865f46b2SCy Schubert # interface-view: eth0@5003 viewname 380865f46b2SCy Schubert 381b7579f77SDag-Erling Smørgrav # if given, a chroot(2) is done to the given directory. 382b7579f77SDag-Erling Smørgrav # i.e. you can chroot to the working directory, for example, 383b7579f77SDag-Erling Smørgrav # for extra security, but make sure all files are in that directory. 384b7579f77SDag-Erling Smørgrav # 385b7579f77SDag-Erling Smørgrav # If chroot is enabled, you should pass the configfile (from the 386b7579f77SDag-Erling Smørgrav # commandline) as a full path from the original root. After the 387b7579f77SDag-Erling Smørgrav # chroot has been performed the now defunct portion of the config 388b7579f77SDag-Erling Smørgrav # file path is removed to be able to reread the config after a reload. 389b7579f77SDag-Erling Smørgrav # 390b7579f77SDag-Erling Smørgrav # All other file paths (working dir, logfile, roothints, and 391b7579f77SDag-Erling Smørgrav # key files) can be specified in several ways: 392b7579f77SDag-Erling Smørgrav # o as an absolute path relative to the new root. 393b7579f77SDag-Erling Smørgrav # o as a relative path to the working directory. 394b7579f77SDag-Erling Smørgrav # o as an absolute path relative to the original root. 395b7579f77SDag-Erling Smørgrav # In the last case the path is adjusted to remove the unused portion. 396b7579f77SDag-Erling Smørgrav # 397b7579f77SDag-Erling Smørgrav # The pid file can be absolute and outside of the chroot, it is 398b7579f77SDag-Erling Smørgrav # written just prior to performing the chroot and dropping permissions. 399b7579f77SDag-Erling Smørgrav # 4009cf5bc93SCy Schubert # Additionally, Unbound may need to access /dev/urandom (for entropy). 401b7579f77SDag-Erling Smørgrav # How to do this is specific to your OS. 402b7579f77SDag-Erling Smørgrav # 403b7579f77SDag-Erling Smørgrav # If you give "" no chroot is performed. The path must not end in a /. 404b7579f77SDag-Erling Smørgrav # chroot: "@UNBOUND_CHROOT_DIR@" 405b7579f77SDag-Erling Smørgrav 406b7579f77SDag-Erling Smørgrav # if given, user privileges are dropped (after binding port), 407b7579f77SDag-Erling Smørgrav # and the given username is assumed. Default is user "unbound". 408b7579f77SDag-Erling Smørgrav # If you give "" no privileges are dropped. 409b7579f77SDag-Erling Smørgrav # username: "@UNBOUND_USERNAME@" 410b7579f77SDag-Erling Smørgrav 411b7579f77SDag-Erling Smørgrav # the working directory. The relative files in this config are 412b7579f77SDag-Erling Smørgrav # relative to this directory. If you give "" the working directory 413b7579f77SDag-Erling Smørgrav # is not changed. 414b5663de9SDag-Erling Smørgrav # If you give a server: directory: dir before include: file statements 415b5663de9SDag-Erling Smørgrav # then those includes can be relative to the working directory. 416b7579f77SDag-Erling Smørgrav # directory: "@UNBOUND_RUN_DIR@" 417b7579f77SDag-Erling Smørgrav 418b7579f77SDag-Erling Smørgrav # the log file, "" means log to stderr. 419b7579f77SDag-Erling Smørgrav # Use of this option sets use-syslog to "no". 420b7579f77SDag-Erling Smørgrav # logfile: "" 421b7579f77SDag-Erling Smørgrav 422b7579f77SDag-Erling Smørgrav # Log to syslog(3) if yes. The log facility LOG_DAEMON is used to 423bc892140SDag-Erling Smørgrav # log to. If yes, it overrides the logfile. 424b7579f77SDag-Erling Smørgrav # use-syslog: yes 425b7579f77SDag-Erling Smørgrav 426bc892140SDag-Erling Smørgrav # Log identity to report. if empty, defaults to the name of argv[0] 427bc892140SDag-Erling Smørgrav # (usually "unbound"). 428bc892140SDag-Erling Smørgrav # log-identity: "" 429bc892140SDag-Erling Smørgrav 430b7579f77SDag-Erling Smørgrav # print UTC timestamp in ascii to logfile, default is epoch in seconds. 431b7579f77SDag-Erling Smørgrav # log-time-ascii: no 432b7579f77SDag-Erling Smørgrav 433b7579f77SDag-Erling Smørgrav # print one line with time, IP, name, type, class for every query. 434b7579f77SDag-Erling Smørgrav # log-queries: no 435b7579f77SDag-Erling Smørgrav 4363005e0a3SDag-Erling Smørgrav # print one line per reply, with time, IP, name, type, class, rcode, 4373005e0a3SDag-Erling Smørgrav # timetoresolve, fromcache and responsesize. 4383005e0a3SDag-Erling Smørgrav # log-replies: no 4393005e0a3SDag-Erling Smørgrav 440e86b9096SDag-Erling Smørgrav # log with tag 'query' and 'reply' instead of 'info' for 441e86b9096SDag-Erling Smørgrav # filtering log-queries and log-replies from the log. 442e86b9096SDag-Erling Smørgrav # log-tag-queryreply: no 443e86b9096SDag-Erling Smørgrav 4444c75e3aaSDag-Erling Smørgrav # log the local-zone actions, like local-zone type inform is enabled 4454c75e3aaSDag-Erling Smørgrav # also for the other local zone types. 4464c75e3aaSDag-Erling Smørgrav # log-local-actions: no 4474c75e3aaSDag-Erling Smørgrav 4484c75e3aaSDag-Erling Smørgrav # print log lines that say why queries return SERVFAIL to clients. 4494c75e3aaSDag-Erling Smørgrav # log-servfail: no 4504c75e3aaSDag-Erling Smørgrav 451b7579f77SDag-Erling Smørgrav # the pid file. Can be an absolute path outside of chroot/work dir. 452b7579f77SDag-Erling Smørgrav # pidfile: "@UNBOUND_PIDFILE@" 453b7579f77SDag-Erling Smørgrav 454b7579f77SDag-Erling Smørgrav # file to read root hints from. 45505ab2901SDag-Erling Smørgrav # get one from https://www.internic.net/domain/named.cache 456b7579f77SDag-Erling Smørgrav # root-hints: "" 457b7579f77SDag-Erling Smørgrav 458b7579f77SDag-Erling Smørgrav # enable to not answer id.server and hostname.bind queries. 459b7579f77SDag-Erling Smørgrav # hide-identity: no 460b7579f77SDag-Erling Smørgrav 461b7579f77SDag-Erling Smørgrav # enable to not answer version.server and version.bind queries. 462b7579f77SDag-Erling Smørgrav # hide-version: no 463b7579f77SDag-Erling Smørgrav 46465b390aaSDag-Erling Smørgrav # enable to not answer trustanchor.unbound queries. 46565b390aaSDag-Erling Smørgrav # hide-trustanchor: no 46665b390aaSDag-Erling Smørgrav 4675469a995SCy Schubert # enable to not set the User-Agent HTTP header. 4685469a995SCy Schubert # hide-http-user-agent: no 4695469a995SCy Schubert 470b7579f77SDag-Erling Smørgrav # the identity to report. Leave "" or default to return hostname. 471b7579f77SDag-Erling Smørgrav # identity: "" 472b7579f77SDag-Erling Smørgrav 473b7579f77SDag-Erling Smørgrav # the version to report. Leave "" or default to return package version. 474b7579f77SDag-Erling Smørgrav # version: "" 475b7579f77SDag-Erling Smørgrav 476f44e67d1SCy Schubert # NSID identity (hex string, or "ascii_somestring"). default disabled. 477f44e67d1SCy Schubert # nsid: "aabbccdd" 478f44e67d1SCy Schubert 4795469a995SCy Schubert # User-Agent HTTP header to use. Leave "" or default to use package name 4805469a995SCy Schubert # and version. 4815469a995SCy Schubert # http-user-agent: "" 4825469a995SCy Schubert 483b7579f77SDag-Erling Smørgrav # the target fetch policy. 484b7579f77SDag-Erling Smørgrav # series of integers describing the policy per dependency depth. 485b7579f77SDag-Erling Smørgrav # The number of values in the list determines the maximum dependency 486b7579f77SDag-Erling Smørgrav # depth the recursor will pursue before giving up. Each integer means: 487b7579f77SDag-Erling Smørgrav # -1 : fetch all targets opportunistically, 488b7579f77SDag-Erling Smørgrav # 0: fetch on demand, 489b7579f77SDag-Erling Smørgrav # positive value: fetch that many targets opportunistically. 490b7579f77SDag-Erling Smørgrav # Enclose the list of numbers between quotes (""). 491b7579f77SDag-Erling Smørgrav # target-fetch-policy: "3 2 1 0 0" 492b7579f77SDag-Erling Smørgrav 493b7579f77SDag-Erling Smørgrav # Harden against very small EDNS buffer sizes. 494f44e67d1SCy Schubert # harden-short-bufsize: yes 495b7579f77SDag-Erling Smørgrav 496b7579f77SDag-Erling Smørgrav # Harden against unseemly large queries. 497b7579f77SDag-Erling Smørgrav # harden-large-queries: no 498b7579f77SDag-Erling Smørgrav 499b7579f77SDag-Erling Smørgrav # Harden against out of zone rrsets, to avoid spoofing attempts. 500b7579f77SDag-Erling Smørgrav # harden-glue: yes 501b7579f77SDag-Erling Smørgrav 502b7579f77SDag-Erling Smørgrav # Harden against receiving dnssec-stripped data. If you turn it 503b7579f77SDag-Erling Smørgrav # off, failing to validate dnskey data for a trustanchor will 504b7579f77SDag-Erling Smørgrav # trigger insecure mode for that zone (like without a trustanchor). 505b7579f77SDag-Erling Smørgrav # Default on, which insists on dnssec data for trust-anchored zones. 506b7579f77SDag-Erling Smørgrav # harden-dnssec-stripped: yes 507b7579f77SDag-Erling Smørgrav 508b7579f77SDag-Erling Smørgrav # Harden against queries that fall under dnssec-signed nxdomain names. 5094c75e3aaSDag-Erling Smørgrav # harden-below-nxdomain: yes 510b7579f77SDag-Erling Smørgrav 511b7579f77SDag-Erling Smørgrav # Harden the referral path by performing additional queries for 512b7579f77SDag-Erling Smørgrav # infrastructure data. Validates the replies (if possible). 513b7579f77SDag-Erling Smørgrav # Default off, because the lookups burden the server. Experimental 514b7579f77SDag-Erling Smørgrav # implementation of draft-wijngaards-dnsext-resolver-side-mitigation. 515b7579f77SDag-Erling Smørgrav # harden-referral-path: no 516b7579f77SDag-Erling Smørgrav 51709a3aaf3SDag-Erling Smørgrav # Harden against algorithm downgrade when multiple algorithms are 51809a3aaf3SDag-Erling Smørgrav # advertised in the DS record. If no, allows the weakest algorithm 51909a3aaf3SDag-Erling Smørgrav # to validate the zone. 520b75612f8SDag-Erling Smørgrav # harden-algo-downgrade: no 52109a3aaf3SDag-Erling Smørgrav 522*8f76bb7dSCy Schubert # Harden against unknown records in the authority section and the 523*8f76bb7dSCy Schubert # additional section. 524*8f76bb7dSCy Schubert # harden-unknown-additional: no 525*8f76bb7dSCy Schubert 52605ab2901SDag-Erling Smørgrav # Sent minimum amount of information to upstream servers to enhance 52705ab2901SDag-Erling Smørgrav # privacy. Only sent minimum required labels of the QNAME and set QTYPE 52857bddd21SDag-Erling Smørgrav # to A when possible. 5293bd4df0aSDag-Erling Smørgrav # qname-minimisation: yes 53005ab2901SDag-Erling Smørgrav 531bc892140SDag-Erling Smørgrav # QNAME minimisation in strict mode. Do not fall-back to sending full 532bc892140SDag-Erling Smørgrav # QNAME to potentially broken nameservers. A lot of domains will not be 533bc892140SDag-Erling Smørgrav # resolvable when this option in enabled. 534bc892140SDag-Erling Smørgrav # This option only has effect when qname-minimisation is enabled. 535bc892140SDag-Erling Smørgrav # qname-minimisation-strict: no 536bc892140SDag-Erling Smørgrav 53757bddd21SDag-Erling Smørgrav # Aggressive NSEC uses the DNSSEC NSEC chain to synthesize NXDOMAIN 53857bddd21SDag-Erling Smørgrav # and other denials, using information from previous NXDOMAINs answers. 5399cf5bc93SCy Schubert # aggressive-nsec: yes 54057bddd21SDag-Erling Smørgrav 541b7579f77SDag-Erling Smørgrav # Use 0x20-encoded random bits in the query to foil spoof attempts. 542b7579f77SDag-Erling Smørgrav # This feature is an experimental implementation of draft dns-0x20. 543b7579f77SDag-Erling Smørgrav # use-caps-for-id: no 544b7579f77SDag-Erling Smørgrav 54509a3aaf3SDag-Erling Smørgrav # Domains (and domains in them) without support for dns-0x20 and 54609a3aaf3SDag-Erling Smørgrav # the fallback fails because they keep sending different answers. 547c0caa2e2SCy Schubert # caps-exempt: "licdn.com" 548c0caa2e2SCy Schubert # caps-exempt: "senderbase.org" 54909a3aaf3SDag-Erling Smørgrav 550b7579f77SDag-Erling Smørgrav # Enforce privacy of these addresses. Strips them away from answers. 551b7579f77SDag-Erling Smørgrav # It may cause DNSSEC validation to additionally mark it as bogus. 552b7579f77SDag-Erling Smørgrav # Protects against 'DNS Rebinding' (uses browser as network proxy). 553b7579f77SDag-Erling Smørgrav # Only 'private-domain' and 'local-data' names are allowed to have 554b7579f77SDag-Erling Smørgrav # these private addresses. No default. 555b7579f77SDag-Erling Smørgrav # private-address: 10.0.0.0/8 556b7579f77SDag-Erling Smørgrav # private-address: 172.16.0.0/12 557b7579f77SDag-Erling Smørgrav # private-address: 192.168.0.0/16 558b7579f77SDag-Erling Smørgrav # private-address: 169.254.0.0/16 559b7579f77SDag-Erling Smørgrav # private-address: fd00::/8 560b7579f77SDag-Erling Smørgrav # private-address: fe80::/10 56105ab2901SDag-Erling Smørgrav # private-address: ::ffff:0:0/96 562b7579f77SDag-Erling Smørgrav 563b7579f77SDag-Erling Smørgrav # Allow the domain (and its subdomains) to contain private addresses. 564b7579f77SDag-Erling Smørgrav # local-data statements are allowed to contain private addresses too. 565b7579f77SDag-Erling Smørgrav # private-domain: "example.com" 566b7579f77SDag-Erling Smørgrav 567b7579f77SDag-Erling Smørgrav # If nonzero, unwanted replies are not only reported in statistics, 568b7579f77SDag-Erling Smørgrav # but also a running total is kept per thread. If it reaches the 569b7579f77SDag-Erling Smørgrav # threshold, a warning is printed and a defensive action is taken, 570b7579f77SDag-Erling Smørgrav # the cache is cleared to flush potential poison out of it. 571b7579f77SDag-Erling Smørgrav # A suggested value is 10000000, the default is 0 (turned off). 572b7579f77SDag-Erling Smørgrav # unwanted-reply-threshold: 0 573b7579f77SDag-Erling Smørgrav 574b7579f77SDag-Erling Smørgrav # Do not query the following addresses. No DNS queries are sent there. 575b7579f77SDag-Erling Smørgrav # List one address per entry. List classless netblocks with /size, 576b7579f77SDag-Erling Smørgrav # do-not-query-address: 127.0.0.1/8 577b7579f77SDag-Erling Smørgrav # do-not-query-address: ::1 578b7579f77SDag-Erling Smørgrav 579b7579f77SDag-Erling Smørgrav # if yes, the above default do-not-query-address entries are present. 580b7579f77SDag-Erling Smørgrav # if no, localhost can be queried (for testing and debugging). 581b7579f77SDag-Erling Smørgrav # do-not-query-localhost: yes 582b7579f77SDag-Erling Smørgrav 583b7579f77SDag-Erling Smørgrav # if yes, perform prefetching of almost expired message cache entries. 584b7579f77SDag-Erling Smørgrav # prefetch: no 585b7579f77SDag-Erling Smørgrav 586b7579f77SDag-Erling Smørgrav # if yes, perform key lookups adjacent to normal lookups. 587b7579f77SDag-Erling Smørgrav # prefetch-key: no 588b7579f77SDag-Erling Smørgrav 589e86b9096SDag-Erling Smørgrav # deny queries of type ANY with an empty response. 590e86b9096SDag-Erling Smørgrav # deny-any: no 591e86b9096SDag-Erling Smørgrav 592b7579f77SDag-Erling Smørgrav # if yes, Unbound rotates RRSet order in response. 59325039b37SCy Schubert # rrset-roundrobin: yes 594b7579f77SDag-Erling Smørgrav 595b7579f77SDag-Erling Smørgrav # if yes, Unbound doesn't insert authority/additional sections 596b7579f77SDag-Erling Smørgrav # into response messages when those sections are not required. 5974c75e3aaSDag-Erling Smørgrav # minimal-responses: yes 598b7579f77SDag-Erling Smørgrav 599e2d15004SDag-Erling Smørgrav # true to disable DNSSEC lameness check in iterator. 600e2d15004SDag-Erling Smørgrav # disable-dnssec-lame-check: no 601e2d15004SDag-Erling Smørgrav 602b7579f77SDag-Erling Smørgrav # module configuration of the server. A string with identifiers 603ff825849SDag-Erling Smørgrav # separated by spaces. Syntax: "[dns64] [validator] iterator" 604e86b9096SDag-Erling Smørgrav # most modules have to be listed at the beginning of the line, 605e86b9096SDag-Erling Smørgrav # except cachedb(just before iterator), and python (at the beginning, 606e86b9096SDag-Erling Smørgrav # or, just before the iterator). 607b7579f77SDag-Erling Smørgrav # module-config: "validator iterator" 608b7579f77SDag-Erling Smørgrav 609b7579f77SDag-Erling Smørgrav # File with trusted keys, kept uptodate using RFC5011 probes, 610b7579f77SDag-Erling Smørgrav # initial file like trust-anchor-file, then it stores metadata. 611b7579f77SDag-Erling Smørgrav # Use several entries, one per domain name, to track multiple zones. 612b7579f77SDag-Erling Smørgrav # 613b7579f77SDag-Erling Smørgrav # If you want to perform DNSSEC validation, run unbound-anchor before 6149cf5bc93SCy Schubert # you start Unbound (i.e. in the system boot scripts). 6155469a995SCy Schubert # And then enable the auto-trust-anchor-file config item. 616b7579f77SDag-Erling Smørgrav # Please note usage of unbound-anchor root anchor is at your own risk 617b7579f77SDag-Erling Smørgrav # and under the terms of our LICENSE (see that file in the source). 618b7579f77SDag-Erling Smørgrav # auto-trust-anchor-file: "@UNBOUND_ROOTKEY_FILE@" 619b7579f77SDag-Erling Smørgrav 620c7f4d7adSDag-Erling Smørgrav # trust anchor signaling sends a RFC8145 key tag query after priming. 6218a384985SDag-Erling Smørgrav # trust-anchor-signaling: yes 622c7f4d7adSDag-Erling Smørgrav 6230fb34990SDag-Erling Smørgrav # Root key trust anchor sentinel (draft-ietf-dnsop-kskroll-sentinel) 6240fb34990SDag-Erling Smørgrav # root-key-sentinel: yes 6250fb34990SDag-Erling Smørgrav 626b7579f77SDag-Erling Smørgrav # File with trusted keys for validation. Specify more than one file 627b7579f77SDag-Erling Smørgrav # with several entries, one file per entry. 628b7579f77SDag-Erling Smørgrav # Zone file format, with DS and DNSKEY entries. 629b7579f77SDag-Erling Smørgrav # Note this gets out of date, use auto-trust-anchor-file please. 630b7579f77SDag-Erling Smørgrav # trust-anchor-file: "" 631b7579f77SDag-Erling Smørgrav 632b7579f77SDag-Erling Smørgrav # Trusted key for validation. DS or DNSKEY. specify the RR on a 633b7579f77SDag-Erling Smørgrav # single line, surrounded by "". TTL is ignored. class is IN default. 634b7579f77SDag-Erling Smørgrav # Note this gets out of date, use auto-trust-anchor-file please. 635b7579f77SDag-Erling Smørgrav # (These examples are from August 2007 and may not be valid anymore). 636b7579f77SDag-Erling Smørgrav # trust-anchor: "nlnetlabs.nl. DNSKEY 257 3 5 AQPzzTWMz8qSWIQlfRnPckx2BiVmkVN6LPupO3mbz7FhLSnm26n6iG9N Lby97Ji453aWZY3M5/xJBSOS2vWtco2t8C0+xeO1bc/d6ZTy32DHchpW 6rDH1vp86Ll+ha0tmwyy9QP7y2bVw5zSbFCrefk8qCUBgfHm9bHzMG1U BYtEIQ==" 637b7579f77SDag-Erling Smørgrav # trust-anchor: "jelte.nlnetlabs.nl. DS 42860 5 1 14D739EB566D2B1A5E216A0BA4D17FA9B038BE4A" 638b7579f77SDag-Erling Smørgrav 639b7579f77SDag-Erling Smørgrav # File with trusted keys for validation. Specify more than one file 640b7579f77SDag-Erling Smørgrav # with several entries, one file per entry. Like trust-anchor-file 641b7579f77SDag-Erling Smørgrav # but has a different file format. Format is BIND-9 style format, 642b7579f77SDag-Erling Smørgrav # the trusted-keys { name flag proto algo "key"; }; clauses are read. 643b7579f77SDag-Erling Smørgrav # you need external update procedures to track changes in keys. 644b7579f77SDag-Erling Smørgrav # trusted-keys-file: "" 645b7579f77SDag-Erling Smørgrav 646b7579f77SDag-Erling Smørgrav # Ignore chain of trust. Domain is treated as insecure. 647b7579f77SDag-Erling Smørgrav # domain-insecure: "example.com" 648b7579f77SDag-Erling Smørgrav 649b7579f77SDag-Erling Smørgrav # Override the date for validation with a specific fixed date. 650b7579f77SDag-Erling Smørgrav # Do not set this unless you are debugging signature inception 651b7579f77SDag-Erling Smørgrav # and expiration. "" or "0" turns the feature off. -1 ignores date. 652b7579f77SDag-Erling Smørgrav # val-override-date: "" 653b7579f77SDag-Erling Smørgrav 654b7579f77SDag-Erling Smørgrav # The time to live for bogus data, rrsets and messages. This avoids 655b7579f77SDag-Erling Smørgrav # some of the revalidation, until the time interval expires. in secs. 656b7579f77SDag-Erling Smørgrav # val-bogus-ttl: 60 657b7579f77SDag-Erling Smørgrav 658b7579f77SDag-Erling Smørgrav # The signature inception and expiration dates are allowed to be off 659b7579f77SDag-Erling Smørgrav # by 10% of the signature lifetime (expir-incep) from our local clock. 660b7579f77SDag-Erling Smørgrav # This leeway is capped with a minimum and a maximum. In seconds. 661b7579f77SDag-Erling Smørgrav # val-sig-skew-min: 3600 662b7579f77SDag-Erling Smørgrav # val-sig-skew-max: 86400 663b7579f77SDag-Erling Smørgrav 6645469a995SCy Schubert # The maximum number the validator should restart validation with 6655469a995SCy Schubert # another authority in case of failed validation. 6665469a995SCy Schubert # val-max-restart: 5 6675469a995SCy Schubert 668b7579f77SDag-Erling Smørgrav # Should additional section of secure message also be kept clean of 669b7579f77SDag-Erling Smørgrav # unsecure data. Useful to shield the users of this validator from 670b7579f77SDag-Erling Smørgrav # potential bogus data in the additional section. All unsigned data 671b7579f77SDag-Erling Smørgrav # in the additional section is removed from secure messages. 672b7579f77SDag-Erling Smørgrav # val-clean-additional: yes 673b7579f77SDag-Erling Smørgrav 674b7579f77SDag-Erling Smørgrav # Turn permissive mode on to permit bogus messages. Thus, messages 675b7579f77SDag-Erling Smørgrav # for which security checks failed will be returned to clients, 676b7579f77SDag-Erling Smørgrav # instead of SERVFAIL. It still performs the security checks, which 677b7579f77SDag-Erling Smørgrav # result in interesting log files and possibly the AD bit in 678b7579f77SDag-Erling Smørgrav # replies if the message is found secure. The default is off. 679b7579f77SDag-Erling Smørgrav # val-permissive-mode: no 680b7579f77SDag-Erling Smørgrav 681b7579f77SDag-Erling Smørgrav # Ignore the CD flag in incoming queries and refuse them bogus data. 6829cf5bc93SCy Schubert # Enable it if the only clients of Unbound are legacy servers (w2008) 683b7579f77SDag-Erling Smørgrav # that set CD but cannot validate themselves. 684b7579f77SDag-Erling Smørgrav # ignore-cd-flag: no 685b7579f77SDag-Erling Smørgrav 686091e9e46SCy Schubert # Serve expired responses from cache, with serve-expired-reply-ttl in 687091e9e46SCy Schubert # the response, and then attempt to fetch the data afresh. 688bc892140SDag-Erling Smørgrav # serve-expired: no 6894c75e3aaSDag-Erling Smørgrav # 6904c75e3aaSDag-Erling Smørgrav # Limit serving of expired responses to configured seconds after 6914c75e3aaSDag-Erling Smørgrav # expiration. 0 disables the limit. 6924c75e3aaSDag-Erling Smørgrav # serve-expired-ttl: 0 6934c75e3aaSDag-Erling Smørgrav # 6944c75e3aaSDag-Erling Smørgrav # Set the TTL of expired records to the serve-expired-ttl value after a 6954c75e3aaSDag-Erling Smørgrav # failed attempt to retrieve the record from upstream. This makes sure 6964c75e3aaSDag-Erling Smørgrav # that the expired records will be served as long as there are queries 6974c75e3aaSDag-Erling Smørgrav # for it. 6984c75e3aaSDag-Erling Smørgrav # serve-expired-ttl-reset: no 699091e9e46SCy Schubert # 700091e9e46SCy Schubert # TTL value to use when replying with expired data. 701091e9e46SCy Schubert # serve-expired-reply-ttl: 30 702091e9e46SCy Schubert # 703091e9e46SCy Schubert # Time in milliseconds before replying to the client with expired data. 704091e9e46SCy Schubert # This essentially enables the serve-stale behavior as specified in 705c0caa2e2SCy Schubert # RFC 8767 that first tries to resolve before 706091e9e46SCy Schubert # immediately responding with expired data. 0 disables this behavior. 707091e9e46SCy Schubert # A recommended value is 1800. 708091e9e46SCy Schubert # serve-expired-client-timeout: 0 709bc892140SDag-Erling Smørgrav 710f44e67d1SCy Schubert # Return the original TTL as received from the upstream name server rather 711f44e67d1SCy Schubert # than the decrementing TTL as stored in the cache. Enabling this feature 7129cf5bc93SCy Schubert # does not impact cache expiry, it only changes the TTL Unbound embeds in 713f44e67d1SCy Schubert # responses to queries. Note that enabling this feature implicitly disables 714f44e67d1SCy Schubert # enforcement of the configured minimum and maximum TTL. 715f44e67d1SCy Schubert # serve-original-ttl: no 716f44e67d1SCy Schubert 717b7579f77SDag-Erling Smørgrav # Have the validator log failed validations for your diagnosis. 718b7579f77SDag-Erling Smørgrav # 0: off. 1: A line per failed user query. 2: With reason and bad IP. 719b7579f77SDag-Erling Smørgrav # val-log-level: 0 720b7579f77SDag-Erling Smørgrav 721b7579f77SDag-Erling Smørgrav # It is possible to configure NSEC3 maximum iteration counts per 722b7579f77SDag-Erling Smørgrav # keysize. Keep this table very short, as linear search is done. 723b7579f77SDag-Erling Smørgrav # A message with an NSEC3 with larger count is marked insecure. 724b7579f77SDag-Erling Smørgrav # List in ascending order the keysize and count values. 7255469a995SCy Schubert # val-nsec3-keysize-iterations: "1024 150 2048 150 4096 150" 7265469a995SCy Schubert 7275469a995SCy Schubert # if enabled, ZONEMD verification failures do not block the zone. 7285469a995SCy Schubert # zonemd-permissive-mode: no 729b7579f77SDag-Erling Smørgrav 730b7579f77SDag-Erling Smørgrav # instruct the auto-trust-anchor-file probing to add anchors after ttl. 731b7579f77SDag-Erling Smørgrav # add-holddown: 2592000 # 30 days 732b7579f77SDag-Erling Smørgrav 733b7579f77SDag-Erling Smørgrav # instruct the auto-trust-anchor-file probing to del anchors after ttl. 734b7579f77SDag-Erling Smørgrav # del-holddown: 2592000 # 30 days 735b7579f77SDag-Erling Smørgrav 736b7579f77SDag-Erling Smørgrav # auto-trust-anchor-file probing removes missing anchors after ttl. 737b7579f77SDag-Erling Smørgrav # If the value 0 is given, missing anchors are not removed. 738b7579f77SDag-Erling Smørgrav # keep-missing: 31622400 # 366 days 739b7579f77SDag-Erling Smørgrav 740e2d15004SDag-Erling Smørgrav # debug option that allows very small holddown times for key rollover, 741e2d15004SDag-Erling Smørgrav # otherwise the RFC mandates probe intervals must be at least 1 hour. 742b75612f8SDag-Erling Smørgrav # permit-small-holddown: no 743b75612f8SDag-Erling Smørgrav 744b7579f77SDag-Erling Smørgrav # the amount of memory to use for the key cache. 745b7579f77SDag-Erling Smørgrav # plain value in bytes or you can append k, m or G. default is "4Mb". 746b7579f77SDag-Erling Smørgrav # key-cache-size: 4m 747b7579f77SDag-Erling Smørgrav 748b7579f77SDag-Erling Smørgrav # the number of slabs to use for the key cache. 749b7579f77SDag-Erling Smørgrav # the number of slabs must be a power of 2. 750b7579f77SDag-Erling Smørgrav # more slabs reduce lock contention, but fragment memory usage. 751b7579f77SDag-Erling Smørgrav # key-cache-slabs: 4 752b7579f77SDag-Erling Smørgrav 753c0caa2e2SCy Schubert # the amount of memory to use for the negative cache. 754b7579f77SDag-Erling Smørgrav # plain value in bytes or you can append k, m or G. default is "1Mb". 755b7579f77SDag-Erling Smørgrav # neg-cache-size: 1m 756b7579f77SDag-Erling Smørgrav 75717d15b25SDag-Erling Smørgrav # By default, for a number of zones a small default 'nothing here' 75817d15b25SDag-Erling Smørgrav # reply is built-in. Query traffic is thus blocked. If you 75917d15b25SDag-Erling Smørgrav # wish to serve such zone you can unblock them by uncommenting one 76017d15b25SDag-Erling Smørgrav # of the nodefault statements below. 76117d15b25SDag-Erling Smørgrav # You may also have to use domain-insecure: zone to make DNSSEC work, 76217d15b25SDag-Erling Smørgrav # unless you have your own trust anchors for this zone. 76317d15b25SDag-Erling Smørgrav # local-zone: "localhost." nodefault 76417d15b25SDag-Erling Smørgrav # local-zone: "127.in-addr.arpa." nodefault 76517d15b25SDag-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 76624e36522SCy Schubert # local-zone: "home.arpa." nodefault 767f61ef7f6SDag-Erling Smørgrav # local-zone: "onion." nodefault 768971980c3SDag-Erling Smørgrav # local-zone: "test." nodefault 769971980c3SDag-Erling Smørgrav # local-zone: "invalid." nodefault 77017d15b25SDag-Erling Smørgrav # local-zone: "10.in-addr.arpa." nodefault 77117d15b25SDag-Erling Smørgrav # local-zone: "16.172.in-addr.arpa." nodefault 77217d15b25SDag-Erling Smørgrav # local-zone: "17.172.in-addr.arpa." nodefault 77317d15b25SDag-Erling Smørgrav # local-zone: "18.172.in-addr.arpa." nodefault 77417d15b25SDag-Erling Smørgrav # local-zone: "19.172.in-addr.arpa." nodefault 77517d15b25SDag-Erling Smørgrav # local-zone: "20.172.in-addr.arpa." nodefault 77617d15b25SDag-Erling Smørgrav # local-zone: "21.172.in-addr.arpa." nodefault 77717d15b25SDag-Erling Smørgrav # local-zone: "22.172.in-addr.arpa." nodefault 77817d15b25SDag-Erling Smørgrav # local-zone: "23.172.in-addr.arpa." nodefault 77917d15b25SDag-Erling Smørgrav # local-zone: "24.172.in-addr.arpa." nodefault 78017d15b25SDag-Erling Smørgrav # local-zone: "25.172.in-addr.arpa." nodefault 78117d15b25SDag-Erling Smørgrav # local-zone: "26.172.in-addr.arpa." nodefault 78217d15b25SDag-Erling Smørgrav # local-zone: "27.172.in-addr.arpa." nodefault 78317d15b25SDag-Erling Smørgrav # local-zone: "28.172.in-addr.arpa." nodefault 78417d15b25SDag-Erling Smørgrav # local-zone: "29.172.in-addr.arpa." nodefault 78517d15b25SDag-Erling Smørgrav # local-zone: "30.172.in-addr.arpa." nodefault 78617d15b25SDag-Erling Smørgrav # local-zone: "31.172.in-addr.arpa." nodefault 78717d15b25SDag-Erling Smørgrav # local-zone: "168.192.in-addr.arpa." nodefault 78817d15b25SDag-Erling Smørgrav # local-zone: "0.in-addr.arpa." nodefault 78917d15b25SDag-Erling Smørgrav # local-zone: "254.169.in-addr.arpa." nodefault 79017d15b25SDag-Erling Smørgrav # local-zone: "2.0.192.in-addr.arpa." nodefault 79117d15b25SDag-Erling Smørgrav # local-zone: "100.51.198.in-addr.arpa." nodefault 79217d15b25SDag-Erling Smørgrav # local-zone: "113.0.203.in-addr.arpa." nodefault 79317d15b25SDag-Erling Smørgrav # local-zone: "255.255.255.255.in-addr.arpa." nodefault 79417d15b25SDag-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 79517d15b25SDag-Erling Smørgrav # local-zone: "d.f.ip6.arpa." nodefault 79617d15b25SDag-Erling Smørgrav # local-zone: "8.e.f.ip6.arpa." nodefault 79717d15b25SDag-Erling Smørgrav # local-zone: "9.e.f.ip6.arpa." nodefault 79817d15b25SDag-Erling Smørgrav # local-zone: "a.e.f.ip6.arpa." nodefault 79917d15b25SDag-Erling Smørgrav # local-zone: "b.e.f.ip6.arpa." nodefault 80017d15b25SDag-Erling Smørgrav # local-zone: "8.b.d.0.1.0.0.2.ip6.arpa." nodefault 801ff825849SDag-Erling Smørgrav # And for 64.100.in-addr.arpa. to 127.100.in-addr.arpa. 802ff825849SDag-Erling Smørgrav 8030eefd307SCy Schubert # Add example.com into ipset 8040eefd307SCy Schubert # local-zone: "example.com" ipset 8050eefd307SCy Schubert 8069cf5bc93SCy Schubert # If Unbound is running service for the local host then it is useful 807ff825849SDag-Erling Smørgrav # to perform lan-wide lookups to the upstream, and unblock the 8089cf5bc93SCy Schubert # long list of local-zones above. If this Unbound is a dns server 809ff825849SDag-Erling Smørgrav # for a network of computers, disabled is better and stops information 810ff825849SDag-Erling Smørgrav # leakage of local lan information. 811ff825849SDag-Erling Smørgrav # unblock-lan-zones: no 81217d15b25SDag-Erling Smørgrav 8130de4f1bfSDag-Erling Smørgrav # The insecure-lan-zones option disables validation for 8140de4f1bfSDag-Erling Smørgrav # these zones, as if they were all listed as domain-insecure. 8150de4f1bfSDag-Erling Smørgrav # insecure-lan-zones: no 8160de4f1bfSDag-Erling Smørgrav 817b7579f77SDag-Erling Smørgrav # a number of locally served zones can be configured. 818b7579f77SDag-Erling Smørgrav # local-zone: <zone> <type> 819b7579f77SDag-Erling Smørgrav # local-data: "<resource record string>" 820b7579f77SDag-Erling Smørgrav # o deny serves local data (if any), else, drops queries. 821b7579f77SDag-Erling Smørgrav # o refuse serves local data (if any), else, replies with error. 822b7579f77SDag-Erling Smørgrav # o static serves local data, else, nxdomain or nodata answer. 823b7579f77SDag-Erling Smørgrav # o transparent gives local data, but resolves normally for other names 824b7579f77SDag-Erling Smørgrav # o redirect serves the zone data for any subdomain in the zone. 825b7579f77SDag-Erling Smørgrav # o nodefault can be used to normally resolve AS112 zones. 826b7579f77SDag-Erling Smørgrav # o typetransparent resolves normally for other types and other names 827bc892140SDag-Erling Smørgrav # o inform acts like transparent, but logs client IP address 82809a3aaf3SDag-Erling Smørgrav # o inform_deny drops queries and logs client IP address 829e86b9096SDag-Erling Smørgrav # o inform_redirect redirects queries and logs client IP address 830f44e67d1SCy Schubert # o always_transparent, always_refuse, always_nxdomain, always_nodata, 831f44e67d1SCy Schubert # always_deny resolve in that way but ignore local data for 832f44e67d1SCy Schubert # that name 833*8f76bb7dSCy Schubert # o block_a resolves all records normally but returns 834*8f76bb7dSCy Schubert # NODATA for A queries and ignores local data for that name 835f44e67d1SCy Schubert # o always_null returns 0.0.0.0 or ::0 for any name in the zone. 83657bddd21SDag-Erling Smørgrav # o noview breaks out of that view towards global local-zones. 837b7579f77SDag-Erling Smørgrav # 838b7579f77SDag-Erling Smørgrav # defaults are localhost address, reverse for 127.0.0.1 and ::1 839b7579f77SDag-Erling Smørgrav # and nxdomain for AS112 zones. If you configure one of these zones 840b7579f77SDag-Erling Smørgrav # the default content is omitted, or you can omit it with 'nodefault'. 841b7579f77SDag-Erling Smørgrav # 842b7579f77SDag-Erling Smørgrav # If you configure local-data without specifying local-zone, by 843b7579f77SDag-Erling Smørgrav # default a transparent local-zone is created for the data. 844b7579f77SDag-Erling Smørgrav # 845b7579f77SDag-Erling Smørgrav # You can add locally served data with 846b7579f77SDag-Erling Smørgrav # local-zone: "local." static 847b7579f77SDag-Erling Smørgrav # local-data: "mycomputer.local. IN A 192.0.2.51" 848b7579f77SDag-Erling Smørgrav # local-data: 'mytext.local TXT "content of text record"' 849b7579f77SDag-Erling Smørgrav # 850b7579f77SDag-Erling Smørgrav # You can override certain queries with 851b7579f77SDag-Erling Smørgrav # local-data: "adserver.example.com A 127.0.0.1" 852b7579f77SDag-Erling Smørgrav # 853b7579f77SDag-Erling Smørgrav # You can redirect a domain to a fixed address with 854b7579f77SDag-Erling Smørgrav # (this makes example.com, www.example.com, etc, all go to 192.0.2.3) 855b7579f77SDag-Erling Smørgrav # local-zone: "example.com" redirect 856b7579f77SDag-Erling Smørgrav # local-data: "example.com A 192.0.2.3" 857b7579f77SDag-Erling Smørgrav # 858b7579f77SDag-Erling Smørgrav # Shorthand to make PTR records, "IPv4 name" or "IPv6 name". 859b7579f77SDag-Erling Smørgrav # You can also add PTR records using local-data directly, but then 860b7579f77SDag-Erling Smørgrav # you need to do the reverse notation yourself. 861b7579f77SDag-Erling Smørgrav # local-data-ptr: "192.0.2.3 www.example.com" 862b7579f77SDag-Erling Smørgrav 863b5663de9SDag-Erling Smørgrav # tag a localzone with a list of tag names (in "" with spaces between) 864b5663de9SDag-Erling Smørgrav # local-zone-tag: "example.com" "tag2 tag3" 865b5663de9SDag-Erling Smørgrav 866b5663de9SDag-Erling Smørgrav # add a netblock specific override to a localzone, with zone type 867b5663de9SDag-Erling Smørgrav # local-zone-override: "example.com" 192.0.2.0/24 refuse 868b5663de9SDag-Erling Smørgrav 869c0caa2e2SCy Schubert # service clients over TLS (on the TCP sockets) with plain DNS inside 870c0caa2e2SCy Schubert # the TLS stream, and over HTTPS using HTTP/2 as specified in RFC8484. 871c0caa2e2SCy Schubert # Give the certificate to use and private key. 872b7579f77SDag-Erling Smørgrav # default is "" (disabled). requires restart to take effect. 87357bddd21SDag-Erling Smørgrav # tls-service-key: "path/to/privatekeyfile.key" 87457bddd21SDag-Erling Smørgrav # tls-service-pem: "path/to/publiccertfile.pem" 87557bddd21SDag-Erling Smørgrav # tls-port: 853 876c0caa2e2SCy Schubert # https-port: 443 877b7579f77SDag-Erling Smørgrav 878e86b9096SDag-Erling Smørgrav # cipher setting for TLSv1.2 879e86b9096SDag-Erling Smørgrav # tls-ciphers: "DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256" 880e86b9096SDag-Erling Smørgrav # cipher setting for TLSv1.3 881e86b9096SDag-Erling Smørgrav # tls-ciphersuites: "TLS_AES_128_GCM_SHA256:TLS_AES_128_CCM_8_SHA256:TLS_AES_128_CCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256" 882e86b9096SDag-Erling Smørgrav 883f44e67d1SCy Schubert # Pad responses to padded queries received over TLS 884f44e67d1SCy Schubert # pad-responses: yes 885f44e67d1SCy Schubert 886f44e67d1SCy Schubert # Padded responses will be padded to the closest multiple of this size. 887f44e67d1SCy Schubert # pad-responses-block-size: 468 888f44e67d1SCy Schubert 88925039b37SCy Schubert # Use the SNI extension for TLS connections. Default is yes. 89025039b37SCy Schubert # Changing the value requires a reload. 89125039b37SCy Schubert # tls-use-sni: yes 89225039b37SCy Schubert 893e86b9096SDag-Erling Smørgrav # Add the secret file for TLS Session Ticket. 894e86b9096SDag-Erling Smørgrav # Secret file must be 80 bytes of random data. 895e86b9096SDag-Erling Smørgrav # First key use to encrypt and decrypt TLS session tickets. 896e86b9096SDag-Erling Smørgrav # Other keys use to decrypt only. 897e86b9096SDag-Erling Smørgrav # requires restart to take effect. 898e86b9096SDag-Erling Smørgrav # tls-session-ticket-keys: "path/to/secret_file1" 899e86b9096SDag-Erling Smørgrav # tls-session-ticket-keys: "path/to/secret_file2" 900e86b9096SDag-Erling Smørgrav 9010fb34990SDag-Erling Smørgrav # request upstream over TLS (with plain DNS inside the TLS stream). 902b7579f77SDag-Erling Smørgrav # Default is no. Can be turned on and off with unbound-control. 90357bddd21SDag-Erling Smørgrav # tls-upstream: no 90457bddd21SDag-Erling Smørgrav 90557bddd21SDag-Erling Smørgrav # Certificates used to authenticate connections made upstream. 90657bddd21SDag-Erling Smørgrav # tls-cert-bundle: "" 907b7579f77SDag-Erling Smørgrav 9083bd4df0aSDag-Erling Smørgrav # Add system certs to the cert bundle, from the Windows Cert Store 9093bd4df0aSDag-Erling Smørgrav # tls-win-cert: no 910a39a5a69SCy Schubert # and on other systems, the default openssl certificates 911a39a5a69SCy Schubert # tls-system-cert: no 9123bd4df0aSDag-Erling Smørgrav 913f44e67d1SCy Schubert # Pad queries over TLS upstreams 914f44e67d1SCy Schubert # pad-queries: yes 915f44e67d1SCy Schubert 916f44e67d1SCy Schubert # Padded queries will be padded to the closest multiple of this size. 917f44e67d1SCy Schubert # pad-queries-block-size: 128 918f44e67d1SCy Schubert 9190fb34990SDag-Erling Smørgrav # Also serve tls on these port numbers (eg. 443, ...), by listing 9207da0adf7SDag-Erling Smørgrav # tls-additional-port: portno for each of the port numbers. 9210fb34990SDag-Erling Smørgrav 922c0caa2e2SCy Schubert # HTTP endpoint to provide DNS-over-HTTPS service on. 923c0caa2e2SCy Schubert # http-endpoint: "/dns-query" 924c0caa2e2SCy Schubert 925c0caa2e2SCy Schubert # HTTP/2 SETTINGS_MAX_CONCURRENT_STREAMS value to use. 926c0caa2e2SCy Schubert # http-max-streams: 100 927c0caa2e2SCy Schubert 928c0caa2e2SCy Schubert # Maximum number of bytes used for all HTTP/2 query buffers. 929c0caa2e2SCy Schubert # http-query-buffer-size: 4m 930c0caa2e2SCy Schubert 931c0caa2e2SCy Schubert # Maximum number of bytes used for all HTTP/2 response buffers. 932c0caa2e2SCy Schubert # http-response-buffer-size: 4m 933c0caa2e2SCy Schubert 934c0caa2e2SCy Schubert # Set TCP_NODELAY socket option on sockets used for DNS-over-HTTPS 935c0caa2e2SCy Schubert # service. 936c0caa2e2SCy Schubert # http-nodelay: yes 937c0caa2e2SCy Schubert 938369c6923SCy Schubert # Disable TLS for DNS-over-HTTP downstream service. 939369c6923SCy Schubert # http-notls-downstream: no 940369c6923SCy Schubert 941865f46b2SCy Schubert # The interfaces that use these listed port numbers will support and 942865f46b2SCy Schubert # expect PROXYv2. For UDP and TCP/TLS interfaces. 943865f46b2SCy Schubert # proxy-protocol-port: portno for each of the port numbers. 944865f46b2SCy Schubert 945ff825849SDag-Erling Smørgrav # DNS64 prefix. Must be specified when DNS64 is use. 946ff825849SDag-Erling Smørgrav # Enable dns64 in module-config. Used to synthesize IPv6 from IPv4. 947ff825849SDag-Erling Smørgrav # dns64-prefix: 64:ff9b::0/96 948ff825849SDag-Erling Smørgrav 9494c75e3aaSDag-Erling Smørgrav # DNS64 ignore AAAA records for these domains and use A instead. 9504c75e3aaSDag-Erling Smørgrav # dns64-ignore-aaaa: "example.com" 9514c75e3aaSDag-Erling Smørgrav 95209a3aaf3SDag-Erling Smørgrav # ratelimit for uncached, new queries, this limits recursion effort. 95309a3aaf3SDag-Erling Smørgrav # ratelimiting is experimental, and may help against randomqueryflood. 95409a3aaf3SDag-Erling Smørgrav # if 0(default) it is disabled, otherwise state qps allowed per zone. 95509a3aaf3SDag-Erling Smørgrav # ratelimit: 0 95609a3aaf3SDag-Erling Smørgrav 95709a3aaf3SDag-Erling Smørgrav # ratelimits are tracked in a cache, size in bytes of cache (or k,m). 95809a3aaf3SDag-Erling Smørgrav # ratelimit-size: 4m 95909a3aaf3SDag-Erling Smørgrav # ratelimit cache slabs, reduces lock contention if equal to cpucount. 96009a3aaf3SDag-Erling Smørgrav # ratelimit-slabs: 4 96109a3aaf3SDag-Erling Smørgrav 96209a3aaf3SDag-Erling Smørgrav # 0 blocks when ratelimited, otherwise let 1/xth traffic through 96309a3aaf3SDag-Erling Smørgrav # ratelimit-factor: 10 96409a3aaf3SDag-Erling Smørgrav 9659cf5bc93SCy Schubert # Aggressive rate limit when the limit is reached and until demand has 9669cf5bc93SCy Schubert # decreased in a 2 second rate window. 9679cf5bc93SCy Schubert # ratelimit-backoff: no 9689cf5bc93SCy Schubert 96909a3aaf3SDag-Erling Smørgrav # override the ratelimit for a specific domain name. 97009a3aaf3SDag-Erling Smørgrav # give this setting multiple times to have multiple overrides. 97109a3aaf3SDag-Erling Smørgrav # ratelimit-for-domain: example.com 1000 97209a3aaf3SDag-Erling Smørgrav # override the ratelimits for all domains below a domain name 97309a3aaf3SDag-Erling Smørgrav # can give this multiple times, the name closest to the zone is used. 974b5663de9SDag-Erling Smørgrav # ratelimit-below-domain: com 1000 97509a3aaf3SDag-Erling Smørgrav 9763005e0a3SDag-Erling Smørgrav # global query ratelimit for all ip addresses. 9773005e0a3SDag-Erling Smørgrav # feature is experimental. 9783005e0a3SDag-Erling Smørgrav # if 0(default) it is disabled, otherwise states qps allowed per ip address 9793005e0a3SDag-Erling Smørgrav # ip-ratelimit: 0 9803005e0a3SDag-Erling Smørgrav 9813005e0a3SDag-Erling Smørgrav # ip ratelimits are tracked in a cache, size in bytes of cache (or k,m). 9823005e0a3SDag-Erling Smørgrav # ip-ratelimit-size: 4m 9833005e0a3SDag-Erling Smørgrav # ip ratelimit cache slabs, reduces lock contention if equal to cpucount. 9843005e0a3SDag-Erling Smørgrav # ip-ratelimit-slabs: 4 9853005e0a3SDag-Erling Smørgrav 9863005e0a3SDag-Erling Smørgrav # 0 blocks when ip is ratelimited, otherwise let 1/xth traffic through 9873005e0a3SDag-Erling Smørgrav # ip-ratelimit-factor: 10 9883005e0a3SDag-Erling Smørgrav 9899cf5bc93SCy Schubert # Aggressive rate limit when the limit is reached and until demand has 9909cf5bc93SCy Schubert # decreased in a 2 second rate window. 9919cf5bc93SCy Schubert # ip-ratelimit-backoff: no 9929cf5bc93SCy Schubert 9934c75e3aaSDag-Erling Smørgrav # Limit the number of connections simultaneous from a netblock 9944c75e3aaSDag-Erling Smørgrav # tcp-connection-limit: 192.0.2.0/24 12 9954c75e3aaSDag-Erling Smørgrav 996e86b9096SDag-Erling Smørgrav # select from the fastest servers this many times out of 1000. 0 means 997e86b9096SDag-Erling Smørgrav # the fast server select is disabled. prefetches are not sped up. 998e86b9096SDag-Erling Smørgrav # fast-server-permil: 0 999e86b9096SDag-Erling Smørgrav # the number of servers that will be used in the fast server selection. 1000e86b9096SDag-Erling Smørgrav # fast-server-num: 3 10010fb34990SDag-Erling Smørgrav 1002a39a5a69SCy Schubert # Enable to attach Extended DNS Error codes (RFC8914) to responses. 1003a39a5a69SCy Schubert # ede: no 1004a39a5a69SCy Schubert 1005a39a5a69SCy Schubert # Enable to attach an Extended DNS Error (RFC8914) Code 3 - Stale 1006a39a5a69SCy Schubert # Answer as EDNS0 option to expired responses. 1007a39a5a69SCy Schubert # Note that the ede option above needs to be enabled for this to work. 1008a39a5a69SCy Schubert # ede-serve-expired: no 1009a39a5a69SCy Schubert 10109cf5bc93SCy Schubert # Specific options for ipsecmod. Unbound needs to be configured with 1011c7f4d7adSDag-Erling Smørgrav # --enable-ipsecmod for these to take effect. 1012c7f4d7adSDag-Erling Smørgrav # 1013c7f4d7adSDag-Erling Smørgrav # Enable or disable ipsecmod (it still needs to be defined in 1014c7f4d7adSDag-Erling Smørgrav # module-config above). Can be used when ipsecmod needs to be 1015c7f4d7adSDag-Erling Smørgrav # enabled/disabled via remote-control(below). 1016c7f4d7adSDag-Erling Smørgrav # ipsecmod-enabled: yes 1017c7f4d7adSDag-Erling Smørgrav # 1018c7f4d7adSDag-Erling Smørgrav # Path to executable external hook. It must be defined when ipsecmod is 1019c7f4d7adSDag-Erling Smørgrav # listed in module-config (above). 1020c7f4d7adSDag-Erling Smørgrav # ipsecmod-hook: "./my_executable" 1021c7f4d7adSDag-Erling Smørgrav # 10229cf5bc93SCy Schubert # When enabled Unbound will reply with SERVFAIL if the return value of 1023c7f4d7adSDag-Erling Smørgrav # the ipsecmod-hook is not 0. 1024c7f4d7adSDag-Erling Smørgrav # ipsecmod-strict: no 1025c7f4d7adSDag-Erling Smørgrav # 1026c7f4d7adSDag-Erling Smørgrav # Maximum time to live (TTL) for cached A/AAAA records with IPSECKEY. 1027c7f4d7adSDag-Erling Smørgrav # ipsecmod-max-ttl: 3600 1028c7f4d7adSDag-Erling Smørgrav # 1029c7f4d7adSDag-Erling Smørgrav # Reply with A/AAAA even if the relevant IPSECKEY is bogus. Mainly used for 1030c7f4d7adSDag-Erling Smørgrav # testing. 1031c7f4d7adSDag-Erling Smørgrav # ipsecmod-ignore-bogus: no 1032c7f4d7adSDag-Erling Smørgrav # 1033c7f4d7adSDag-Erling Smørgrav # Domains for which ipsecmod will be triggered. If not defined (default) 1034c0caa2e2SCy Schubert # all domains are treated as being allowed. 1035c0caa2e2SCy Schubert # ipsecmod-allow: "example.com" 1036c0caa2e2SCy Schubert # ipsecmod-allow: "nlnetlabs.nl" 1037c7f4d7adSDag-Erling Smørgrav 10385469a995SCy Schubert # Timeout for REUSE entries in milliseconds. 10395469a995SCy Schubert # tcp-reuse-timeout: 60000 10405469a995SCy Schubert # Max number of queries on a reuse connection. 10415469a995SCy Schubert # max-reuse-tcp-queries: 200 10425469a995SCy Schubert # Timeout in milliseconds for TCP queries to auth servers. 10435469a995SCy Schubert # tcp-auth-query-timeout: 3000 10445469a995SCy Schubert 10453005e0a3SDag-Erling Smørgrav 1046b7579f77SDag-Erling Smørgrav# Python config section. To enable: 1047b7579f77SDag-Erling Smørgrav# o use --with-pythonmodule to configure before compiling. 1048b7579f77SDag-Erling Smørgrav# o list python in the module-config string (above) to enable. 1049e86b9096SDag-Erling Smørgrav# It can be at the start, it gets validated results, or just before 1050e86b9096SDag-Erling Smørgrav# the iterator and process before DNSSEC validation. 1051b7579f77SDag-Erling Smørgrav# o and give a python-script to run. 1052b7579f77SDag-Erling Smørgravpython: 1053b7579f77SDag-Erling Smørgrav # Script file to load 1054b7579f77SDag-Erling Smørgrav # python-script: "@UNBOUND_SHARE_DIR@/ubmodule-tst.py" 1055b7579f77SDag-Erling Smørgrav 105625039b37SCy Schubert# Dynamic library config section. To enable: 105725039b37SCy Schubert# o use --with-dynlibmodule to configure before compiling. 105825039b37SCy Schubert# o list dynlib in the module-config string (above) to enable. 105925039b37SCy Schubert# It can be placed anywhere, the dynlib module is only a very thin wrapper 106025039b37SCy Schubert# to load modules dynamically. 106125039b37SCy Schubert# o and give a dynlib-file to run. If more than one dynlib entry is listed in 106225039b37SCy Schubert# the module-config then you need one dynlib-file per instance. 106325039b37SCy Schubertdynlib: 106425039b37SCy Schubert # Script file to load 106525039b37SCy Schubert # dynlib-file: "@UNBOUND_SHARE_DIR@/dynlib.so" 106625039b37SCy Schubert 1067b7579f77SDag-Erling Smørgrav# Remote control config section. 1068b7579f77SDag-Erling Smørgravremote-control: 1069b7579f77SDag-Erling Smørgrav # Enable remote control with unbound-control(8) here. 1070b7579f77SDag-Erling Smørgrav # set up the keys and certificates with unbound-control-setup. 1071b7579f77SDag-Erling Smørgrav # control-enable: no 1072b7579f77SDag-Erling Smørgrav 1073b7579f77SDag-Erling Smørgrav # what interfaces are listened to for remote control. 1074b7579f77SDag-Erling Smørgrav # give 0.0.0.0 and ::0 to listen to all interfaces. 10757da0adf7SDag-Erling Smørgrav # set to an absolute path to use a unix local name pipe, certificates 10767da0adf7SDag-Erling Smørgrav # are not used for that, so key and cert files need not be present. 1077b7579f77SDag-Erling Smørgrav # control-interface: 127.0.0.1 1078b7579f77SDag-Erling Smørgrav # control-interface: ::1 1079b7579f77SDag-Erling Smørgrav 1080b7579f77SDag-Erling Smørgrav # port number for remote control operations. 1081b7579f77SDag-Erling Smørgrav # control-port: 8953 1082b7579f77SDag-Erling Smørgrav 10837da0adf7SDag-Erling Smørgrav # for localhost, you can disable use of TLS by setting this to "no" 10847da0adf7SDag-Erling Smørgrav # For local sockets this option is ignored, and TLS is not used. 10857da0adf7SDag-Erling Smørgrav # control-use-cert: "yes" 10867da0adf7SDag-Erling Smørgrav 10879cf5bc93SCy Schubert # Unbound server key file. 1088b7579f77SDag-Erling Smørgrav # server-key-file: "@UNBOUND_RUN_DIR@/unbound_server.key" 1089b7579f77SDag-Erling Smørgrav 10909cf5bc93SCy Schubert # Unbound server certificate file. 1091b7579f77SDag-Erling Smørgrav # server-cert-file: "@UNBOUND_RUN_DIR@/unbound_server.pem" 1092b7579f77SDag-Erling Smørgrav 1093b7579f77SDag-Erling Smørgrav # unbound-control key file. 1094b7579f77SDag-Erling Smørgrav # control-key-file: "@UNBOUND_RUN_DIR@/unbound_control.key" 1095b7579f77SDag-Erling Smørgrav 1096b7579f77SDag-Erling Smørgrav # unbound-control certificate file. 1097b7579f77SDag-Erling Smørgrav # control-cert-file: "@UNBOUND_RUN_DIR@/unbound_control.pem" 1098b7579f77SDag-Erling Smørgrav 1099b7579f77SDag-Erling Smørgrav# Stub zones. 1100b7579f77SDag-Erling Smørgrav# Create entries like below, to make all queries for 'example.com' and 1101b7579f77SDag-Erling Smørgrav# 'example.org' go to the given list of nameservers. list zero or more 1102b7579f77SDag-Erling Smørgrav# nameservers by hostname or by ipaddress. If you set stub-prime to yes, 1103b7579f77SDag-Erling Smørgrav# the list is treated as priming hints (default is no). 1104b7579f77SDag-Erling Smørgrav# With stub-first yes, it attempts without the stub if it fails. 1105b75612f8SDag-Erling Smørgrav# Consider adding domain-insecure: name and local-zone: name nodefault 1106b75612f8SDag-Erling Smørgrav# to the server: section if the stub is a locally served zone. 1107b7579f77SDag-Erling Smørgrav# stub-zone: 1108b7579f77SDag-Erling Smørgrav# name: "example.com" 1109b7579f77SDag-Erling Smørgrav# stub-addr: 192.0.2.68 1110b7579f77SDag-Erling Smørgrav# stub-prime: no 1111b7579f77SDag-Erling Smørgrav# stub-first: no 111224e36522SCy Schubert# stub-tcp-upstream: no 111357bddd21SDag-Erling Smørgrav# stub-tls-upstream: no 11144c75e3aaSDag-Erling Smørgrav# stub-no-cache: no 1115b7579f77SDag-Erling Smørgrav# stub-zone: 1116b7579f77SDag-Erling Smørgrav# name: "example.org" 1117b7579f77SDag-Erling Smørgrav# stub-host: ns.example.com. 1118b7579f77SDag-Erling Smørgrav 1119b7579f77SDag-Erling Smørgrav# Forward zones 1120b7579f77SDag-Erling Smørgrav# Create entries like below, to make all queries for 'example.com' and 1121b7579f77SDag-Erling Smørgrav# 'example.org' go to the given list of servers. These servers have to handle 1122b7579f77SDag-Erling Smørgrav# recursion to other nameservers. List zero or more nameservers by hostname 1123b7579f77SDag-Erling Smørgrav# or by ipaddress. Use an entry with name "." to forward all queries. 1124b7579f77SDag-Erling Smørgrav# If you enable forward-first, it attempts without the forward if it fails. 1125b7579f77SDag-Erling Smørgrav# forward-zone: 1126b7579f77SDag-Erling Smørgrav# name: "example.com" 1127b7579f77SDag-Erling Smørgrav# forward-addr: 192.0.2.68 1128b7579f77SDag-Erling Smørgrav# forward-addr: 192.0.2.73@5355 # forward to port 5355. 1129b7579f77SDag-Erling Smørgrav# forward-first: no 113024e36522SCy Schubert# forward-tcp-upstream: no 113157bddd21SDag-Erling Smørgrav# forward-tls-upstream: no 11324c75e3aaSDag-Erling Smørgrav# forward-no-cache: no 1133b7579f77SDag-Erling Smørgrav# forward-zone: 1134b7579f77SDag-Erling Smørgrav# name: "example.org" 1135b7579f77SDag-Erling Smørgrav# forward-host: fwd.example.com 1136bc892140SDag-Erling Smørgrav 113757bddd21SDag-Erling Smørgrav# Authority zones 113857bddd21SDag-Erling Smørgrav# The data for these zones is kept locally, from a file or downloaded. 113957bddd21SDag-Erling Smørgrav# The data can be served to downstream clients, or used instead of the 114057bddd21SDag-Erling Smørgrav# upstream (which saves a lookup to the upstream). The first example 114157bddd21SDag-Erling Smørgrav# has a copy of the root for local usage. The second serves example.org 114257bddd21SDag-Erling Smørgrav# authoritatively. zonefile: reads from file (and writes to it if you also 1143c0caa2e2SCy Schubert# download it), primary: fetches with AXFR and IXFR, or url to zonefile. 11440a92a9fcSCy Schubert# With allow-notify: you can give additional (apart from primaries and urls) 11450a92a9fcSCy Schubert# sources of notifies. 114657bddd21SDag-Erling Smørgrav# auth-zone: 114757bddd21SDag-Erling Smørgrav# name: "." 1148c0caa2e2SCy Schubert# primary: 199.9.14.201 # b.root-servers.net 1149c0caa2e2SCy Schubert# primary: 192.33.4.12 # c.root-servers.net 1150c0caa2e2SCy Schubert# primary: 199.7.91.13 # d.root-servers.net 1151c0caa2e2SCy Schubert# primary: 192.5.5.241 # f.root-servers.net 1152c0caa2e2SCy Schubert# primary: 192.112.36.4 # g.root-servers.net 1153c0caa2e2SCy Schubert# primary: 193.0.14.129 # k.root-servers.net 1154c0caa2e2SCy Schubert# primary: 192.0.47.132 # xfr.cjr.dns.icann.org 1155c0caa2e2SCy Schubert# primary: 192.0.32.132 # xfr.lax.dns.icann.org 1156c0caa2e2SCy Schubert# primary: 2001:500:200::b # b.root-servers.net 1157c0caa2e2SCy Schubert# primary: 2001:500:2::c # c.root-servers.net 1158c0caa2e2SCy Schubert# primary: 2001:500:2d::d # d.root-servers.net 1159c0caa2e2SCy Schubert# primary: 2001:500:2f::f # f.root-servers.net 1160c0caa2e2SCy Schubert# primary: 2001:500:12::d0d # g.root-servers.net 1161c0caa2e2SCy Schubert# primary: 2001:7fd::1 # k.root-servers.net 1162c0caa2e2SCy Schubert# primary: 2620:0:2830:202::132 # xfr.cjr.dns.icann.org 1163c0caa2e2SCy Schubert# primary: 2620:0:2d0:202::132 # xfr.lax.dns.icann.org 1164e86b9096SDag-Erling Smørgrav# fallback-enabled: yes 116557bddd21SDag-Erling Smørgrav# for-downstream: no 116657bddd21SDag-Erling Smørgrav# for-upstream: yes 116757bddd21SDag-Erling Smørgrav# auth-zone: 116857bddd21SDag-Erling Smørgrav# name: "example.org" 116957bddd21SDag-Erling Smørgrav# for-downstream: yes 117057bddd21SDag-Erling Smørgrav# for-upstream: yes 11715469a995SCy Schubert# zonemd-check: no 11725469a995SCy Schubert# zonemd-reject-absence: no 117357bddd21SDag-Erling Smørgrav# zonefile: "example.org.zone" 117457bddd21SDag-Erling Smørgrav 1175bc892140SDag-Erling Smørgrav# Views 1176bc892140SDag-Erling Smørgrav# Create named views. Name must be unique. Map views to requests using 1177bc892140SDag-Erling Smørgrav# the access-control-view option. Views can contain zero or more local-zone 1178bc892140SDag-Erling Smørgrav# and local-data options. Options from matching views will override global 1179bc892140SDag-Erling Smørgrav# options. Global options will be used if no matching view is found. 1180bc892140SDag-Erling Smørgrav# With view-first yes, it will try to answer using the global local-zone and 1181bc892140SDag-Erling Smørgrav# local-data elements if there is no view specific match. 1182bc892140SDag-Erling Smørgrav# view: 1183bc892140SDag-Erling Smørgrav# name: "viewname" 1184bc892140SDag-Erling Smørgrav# local-zone: "example.com" redirect 1185bc892140SDag-Erling Smørgrav# local-data: "example.com A 192.0.2.3" 118665b390aaSDag-Erling Smørgrav# local-data-ptr: "192.0.2.3 www.example.com" 1187bc892140SDag-Erling Smørgrav# view-first: no 1188bc892140SDag-Erling Smørgrav# view: 1189bc892140SDag-Erling Smørgrav# name: "anotherview" 1190bc892140SDag-Erling Smørgrav# local-zone: "example.com" refuse 119165b390aaSDag-Erling Smørgrav 119265b390aaSDag-Erling Smørgrav# DNSCrypt 11939cf5bc93SCy Schubert# To enable, use --enable-dnscrypt to configure before compiling. 119465b390aaSDag-Erling Smørgrav# Caveats: 11959cf5bc93SCy Schubert# 1. the keys/certs cannot be produced by Unbound. You can use dnscrypt-wrapper 119665b390aaSDag-Erling Smørgrav# for this: https://github.com/cofyc/dnscrypt-wrapper/blob/master/README.md#usage 119765b390aaSDag-Erling Smørgrav# 2. dnscrypt channel attaches to an interface. you MUST set interfaces to 119865b390aaSDag-Erling Smørgrav# listen on `dnscrypt-port` with the follo0wing snippet: 119965b390aaSDag-Erling Smørgrav# server: 120065b390aaSDag-Erling Smørgrav# interface: 0.0.0.0@443 120165b390aaSDag-Erling Smørgrav# interface: ::0@443 120265b390aaSDag-Erling Smørgrav# 120365b390aaSDag-Erling Smørgrav# Finally, `dnscrypt` config has its own section. 120465b390aaSDag-Erling Smørgrav# dnscrypt: 120565b390aaSDag-Erling Smørgrav# dnscrypt-enable: yes 120665b390aaSDag-Erling Smørgrav# dnscrypt-port: 443 120765b390aaSDag-Erling Smørgrav# dnscrypt-provider: 2.dnscrypt-cert.example.com. 120865b390aaSDag-Erling Smørgrav# dnscrypt-secret-key: /path/unbound-conf/keys1/1.key 120965b390aaSDag-Erling Smørgrav# dnscrypt-secret-key: /path/unbound-conf/keys2/1.key 121065b390aaSDag-Erling Smørgrav# dnscrypt-provider-cert: /path/unbound-conf/keys1/1.cert 121165b390aaSDag-Erling Smørgrav# dnscrypt-provider-cert: /path/unbound-conf/keys2/1.cert 1212971980c3SDag-Erling Smørgrav 1213971980c3SDag-Erling Smørgrav# CacheDB 12149cf5bc93SCy Schubert# External backend DB as auxiliary cache. 12159cf5bc93SCy Schubert# To enable, use --enable-cachedb to configure before compiling. 12169cf5bc93SCy Schubert# Specify the backend name 1217971980c3SDag-Erling Smørgrav# (default is "testframe", which has no use other than for debugging and 1218971980c3SDag-Erling Smørgrav# testing) and backend-specific options. The 'cachedb' module must be 1219e86b9096SDag-Erling Smørgrav# included in module-config, just before the iterator module. 1220971980c3SDag-Erling Smørgrav# cachedb: 1221971980c3SDag-Erling Smørgrav# backend: "testframe" 1222971980c3SDag-Erling Smørgrav# # secret seed string to calculate hashed keys 1223971980c3SDag-Erling Smørgrav# secret-seed: "default" 12240fb34990SDag-Erling Smørgrav# 12250fb34990SDag-Erling Smørgrav# # For "redis" backend: 12269cf5bc93SCy Schubert# # (to enable, use --with-libhiredis to configure before compiling) 12270fb34990SDag-Erling Smørgrav# # redis server's IP address or host name 12280fb34990SDag-Erling Smørgrav# redis-server-host: 127.0.0.1 12290fb34990SDag-Erling Smørgrav# # redis server's TCP port 12300fb34990SDag-Erling Smørgrav# redis-server-port: 6379 1231*8f76bb7dSCy Schubert# # if the server uses a unix socket, set its path, or "" when not used. 1232*8f76bb7dSCy Schubert# # redis-server-path: "/var/lib/redis/redis-server.sock" 1233*8f76bb7dSCy Schubert# # if the server uses an AUTH password, specify here, or "" when not used. 1234*8f76bb7dSCy Schubert# # redis-server-password: "" 12350fb34990SDag-Erling Smørgrav# # timeout (in ms) for communication with the redis server 12360fb34990SDag-Erling Smørgrav# redis-timeout: 100 123725039b37SCy Schubert# # set timeout on redis records based on DNS response TTL 123825039b37SCy Schubert# redis-expire-records: no 12390eefd307SCy Schubert 12400eefd307SCy Schubert# IPSet 12410eefd307SCy Schubert# Add specify domain into set via ipset. 12429cf5bc93SCy Schubert# To enable: 12439cf5bc93SCy Schubert# o use --enable-ipset to configure before compiling; 12449cf5bc93SCy Schubert# o Unbound then needs to run as root user. 12450eefd307SCy Schubert# ipset: 12460eefd307SCy Schubert# # set name for ip v4 addresses 12470eefd307SCy Schubert# name-v4: "list-v4" 12480eefd307SCy Schubert# # set name for ip v6 addresses 12490eefd307SCy Schubert# name-v6: "list-v6" 12500eefd307SCy Schubert# 12510eefd307SCy Schubert 12529cf5bc93SCy Schubert# Dnstap logging support, if compiled in by using --enable-dnstap to configure. 12539cf5bc93SCy Schubert# To enable, set the dnstap-enable to yes and also some of 12549cf5bc93SCy Schubert# dnstap-log-..-messages to yes. And select an upstream log destination, by 12559cf5bc93SCy Schubert# socket path, TCP or TLS destination. 125625039b37SCy Schubert# dnstap: 125725039b37SCy Schubert# dnstap-enable: no 125825039b37SCy Schubert# # if set to yes frame streams will be used in bidirectional mode 125925039b37SCy Schubert# dnstap-bidirectional: yes 126025039b37SCy Schubert# dnstap-socket-path: "@DNSTAP_SOCKET_PATH@" 126125039b37SCy Schubert# # if "" use the unix socket in dnstap-socket-path, otherwise, 126225039b37SCy Schubert# # set it to "IPaddress[@port]" of the destination. 126325039b37SCy Schubert# dnstap-ip: "" 126425039b37SCy Schubert# # if set to yes if you want to use TLS to dnstap-ip, no for TCP. 126525039b37SCy Schubert# dnstap-tls: yes 126625039b37SCy Schubert# # name for authenticating the upstream server. or "" disabled. 126725039b37SCy Schubert# dnstap-tls-server-name: "" 12689cf5bc93SCy Schubert# # if "", it uses the cert bundle from the main Unbound config. 126925039b37SCy Schubert# dnstap-tls-cert-bundle: "" 127025039b37SCy Schubert# # key file for client authentication, or "" disabled. 127125039b37SCy Schubert# dnstap-tls-client-key-file: "" 127225039b37SCy Schubert# # cert file for client authentication, or "" disabled. 127325039b37SCy Schubert# dnstap-tls-client-cert-file: "" 127425039b37SCy Schubert# dnstap-send-identity: no 127525039b37SCy Schubert# dnstap-send-version: no 127625039b37SCy Schubert# # if "" it uses the hostname. 127725039b37SCy Schubert# dnstap-identity: "" 127825039b37SCy Schubert# # if "" it uses the package version. 127925039b37SCy Schubert# dnstap-version: "" 128025039b37SCy Schubert# dnstap-log-resolver-query-messages: no 128125039b37SCy Schubert# dnstap-log-resolver-response-messages: no 128225039b37SCy Schubert# dnstap-log-client-query-messages: no 128325039b37SCy Schubert# dnstap-log-client-response-messages: no 128425039b37SCy Schubert# dnstap-log-forwarder-query-messages: no 128525039b37SCy Schubert# dnstap-log-forwarder-response-messages: no 128625039b37SCy Schubert 1287091e9e46SCy Schubert# Response Policy Zones 128824e36522SCy Schubert# RPZ policies. Applied in order of configuration. QNAME, Response IP 128924e36522SCy Schubert# Address, nsdname, nsip and clientip triggers are supported. Supported 129024e36522SCy Schubert# actions are: NXDOMAIN, NODATA, PASSTHRU, DROP, Local Data, tcp-only 129124e36522SCy Schubert# and drop. Policies can be loaded from a file, or using zone 129224e36522SCy Schubert# transfer, or using HTTP. The respip module needs to be added 1293091e9e46SCy Schubert# to the module-config, e.g.: module-config: "respip validator iterator". 1294091e9e46SCy Schubert# rpz: 1295091e9e46SCy Schubert# name: "rpz.example.com" 1296091e9e46SCy Schubert# zonefile: "rpz.example.com" 1297c0caa2e2SCy Schubert# primary: 192.0.2.0 1298091e9e46SCy Schubert# allow-notify: 192.0.2.0/32 1299091e9e46SCy Schubert# url: http://www.example.com/rpz.example.org.zone 1300091e9e46SCy Schubert# rpz-action-override: cname 1301091e9e46SCy Schubert# rpz-cname-override: www.example.org 1302091e9e46SCy Schubert# rpz-log: yes 1303091e9e46SCy Schubert# rpz-log-name: "example policy" 13049cf5bc93SCy Schubert# rpz-signal-nxdomain-ra: no 13059cf5bc93SCy Schubert# for-downstream: no 1306091e9e46SCy Schubert# tags: "example" 1307