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