|
|
8ba890 |
#
|
|
|
8ba890 |
# Example configuration file.
|
|
|
8ba890 |
#
|
|
|
8ba890 |
# See unbound.conf(5) man page
|
|
|
8ba890 |
#
|
|
|
8ba890 |
# this is a comment.
|
|
|
8ba890 |
|
|
|
8ba890 |
#Use this to include other text into the file.
|
|
|
8ba890 |
#include: "otherfile.conf"
|
|
|
8ba890 |
|
|
|
8ba890 |
# The server clause sets the main parameters.
|
|
|
8ba890 |
server:
|
|
|
8ba890 |
# whitespace is not necessary, but looks cleaner.
|
|
|
8ba890 |
|
|
|
8ba890 |
# verbosity number, 0 is least verbose. 1 is default.
|
|
|
8ba890 |
verbosity: 1
|
|
|
8ba890 |
|
|
|
8ba890 |
# print statistics to the log (for every thread) every N seconds.
|
|
|
8ba890 |
# Set to "" or 0 to disable. Default is disabled.
|
|
|
8ba890 |
# Needs to be disabled for munin plugin
|
|
|
8ba890 |
statistics-interval: 0
|
|
|
8ba890 |
|
|
|
8ba890 |
# enable shm for stats, default no. if you enable also enable
|
|
|
8ba890 |
# statistics-interval, every time it also writes stats to the
|
|
|
8ba890 |
# shared memory segment keyed with shm-key.
|
|
|
8ba890 |
# shm-enable: no
|
|
|
8ba890 |
|
|
|
8ba890 |
# shm for stats uses this key, and key+1 for the shared mem segment.
|
|
|
8ba890 |
# shm-key: 11777
|
|
|
8ba890 |
|
|
|
8ba890 |
# enable cumulative statistics, without clearing them after printing.
|
|
|
8ba890 |
# Needs to be disabled for munin plugin
|
|
|
8ba890 |
statistics-cumulative: no
|
|
|
8ba890 |
|
|
|
8ba890 |
# enable extended statistics (query types, answer codes, status)
|
|
|
8ba890 |
# printed from unbound-control. default off, because of speed.
|
|
|
8ba890 |
# Needs to be enabled for munin plugin
|
|
|
8ba890 |
extended-statistics: yes
|
|
|
8ba890 |
|
|
|
8ba890 |
# number of threads to create. 1 disables threading.
|
|
|
8ba890 |
num-threads: 4
|
|
|
8ba890 |
|
|
|
8ba890 |
# specify the interfaces to answer queries from by ip-address.
|
|
|
8ba890 |
# The default is to listen to localhost (127.0.0.1 and ::1).
|
|
|
8ba890 |
# specify 0.0.0.0 and ::0 to bind to all available interfaces.
|
|
|
8ba890 |
# specify every interface[@port] on a new 'interface:' labelled line.
|
|
|
8ba890 |
# The listen interfaces are not changed on reload, only on restart.
|
|
|
8ba890 |
# interface: 0.0.0.0
|
|
|
8ba890 |
# interface: ::0
|
|
|
8ba890 |
# interface: 192.0.2.153
|
|
|
8ba890 |
# interface: 192.0.2.154
|
|
|
8ba890 |
# interface: 192.0.2.154@5003
|
|
|
8ba890 |
# interface: 2001:DB8::5
|
|
|
8ba890 |
#
|
|
|
8ba890 |
# for dns over tls and raw dns over port 80
|
|
|
8ba890 |
# interface: 0.0.0.0@443
|
|
|
8ba890 |
# interface: ::0@443
|
|
|
8ba890 |
# interface: 0.0.0.0@80
|
|
|
8ba890 |
# interface: ::0@80
|
|
|
8ba890 |
|
|
|
8ba890 |
# enable this feature to copy the source address of queries to reply.
|
|
|
8ba890 |
# Socket options are not supported on all platforms. experimental.
|
|
|
8ba890 |
# interface-automatic: yes
|
|
|
8ba890 |
#
|
|
|
8ba890 |
# NOTE: Enable this option when specifying interface 0.0.0.0 or ::0
|
|
|
8ba890 |
# NOTE: Disabled per Fedora policy not to listen to * on default install
|
|
|
8ba890 |
# NOTE: If deploying on non-default port, eg 80/443, this needs to be disabled
|
|
|
8ba890 |
interface-automatic: no
|
|
|
8ba890 |
|
|
|
8ba890 |
# port to answer queries from
|
|
|
8ba890 |
# port: 53
|
|
|
8ba890 |
|
|
|
8ba890 |
# specify the interfaces to send outgoing queries to authoritative
|
|
|
8ba890 |
# server from by ip-address. If none, the default (all) interface
|
|
|
8ba890 |
# is used. Specify every interface on a 'outgoing-interface:' line.
|
|
|
8ba890 |
# outgoing-interface: 192.0.2.153
|
|
|
8ba890 |
# outgoing-interface: 2001:DB8::5
|
|
|
8ba890 |
# outgoing-interface: 2001:DB8::6
|
|
|
8ba890 |
|
|
|
8ba890 |
# Specify a netblock to use remainder 64 bits as random bits for
|
|
|
8ba890 |
# upstream queries. Uses freebind option (Linux).
|
|
|
8ba890 |
# outgoing-interface: 2001:DB8::/64
|
|
|
8ba890 |
# Also (Linux:) ip -6 addr add 2001:db8::/64 dev lo
|
|
|
8ba890 |
# And: ip -6 route add local 2001:db8::/64 dev lo
|
|
|
8ba890 |
# And set prefer-ip6: yes to use the ip6 randomness from a netblock.
|
|
|
8ba890 |
# Set this to yes to prefer ipv6 upstream servers over ipv4.
|
|
|
8ba890 |
# prefer-ip6: no
|
|
|
8ba890 |
|
|
|
8ba890 |
# number of ports to allocate per thread, determines the size of the
|
|
|
8ba890 |
# port range that can be open simultaneously. About double the
|
|
|
8ba890 |
# num-queries-per-thread, or, use as many as the OS will allow you.
|
|
|
8ba890 |
# outgoing-range: 4096
|
|
|
8ba890 |
|
|
|
8ba890 |
# permit unbound to use this port number or port range for
|
|
|
8ba890 |
# making outgoing queries, using an outgoing interface.
|
|
|
8ba890 |
# Only ephemeral ports are allowed by SElinux
|
|
|
8ba890 |
outgoing-port-permit: 32768-60999
|
|
|
8ba890 |
|
|
|
8ba890 |
# deny unbound the use this of port number or port range for
|
|
|
8ba890 |
# making outgoing queries, using an outgoing interface.
|
|
|
8ba890 |
# Use this to make sure unbound does not grab a UDP port that some
|
|
|
8ba890 |
# other server on this computer needs. The default is to avoid
|
|
|
8ba890 |
# IANA-assigned port numbers.
|
|
|
8ba890 |
# If multiple outgoing-port-permit and outgoing-port-avoid options
|
|
|
8ba890 |
# are present, they are processed in order.
|
|
|
8ba890 |
# Our SElinux policy does not allow non-ephemeral ports to be used
|
|
|
8ba890 |
outgoing-port-avoid: 0-32767
|
|
|
8ba890 |
|
|
|
8ba890 |
# number of outgoing simultaneous tcp buffers to hold per thread.
|
|
|
8ba890 |
# outgoing-num-tcp: 10
|
|
|
8ba890 |
|
|
|
8ba890 |
# number of incoming simultaneous tcp buffers to hold per thread.
|
|
|
8ba890 |
# incoming-num-tcp: 10
|
|
|
8ba890 |
|
|
|
8ba890 |
# buffer size for UDP port 53 incoming (SO_RCVBUF socket option).
|
|
|
8ba890 |
# 0 is system default. Use 4m to catch query spikes for busy servers.
|
|
|
8ba890 |
# so-rcvbuf: 0
|
|
|
8ba890 |
|
|
|
8ba890 |
# buffer size for UDP port 53 outgoing (SO_SNDBUF socket option).
|
|
|
8ba890 |
# 0 is system default. Use 4m to handle spikes on very busy servers.
|
|
|
8ba890 |
# so-sndbuf: 0
|
|
|
8ba890 |
|
|
|
8ba890 |
# use SO_REUSEPORT to distribute queries over threads.
|
|
|
8ba890 |
so-reuseport: yes
|
|
|
8ba890 |
|
|
|
8ba890 |
# use IP_TRANSPARENT so the interface: addresses can be non-local
|
|
|
8ba890 |
# and you can config non-existing IPs that are going to work later on
|
|
|
8ba890 |
# (uses IP_BINDANY on FreeBSD).
|
|
|
8ba890 |
ip-transparent: yes
|
|
|
8ba890 |
|
|
|
8ba890 |
# use IP_FREEBIND so the interface: addresses can be non-local
|
|
|
8ba890 |
# and you can bind to nonexisting IPs and interfaces that are down.
|
|
|
8ba890 |
# Linux only. On Linux you also have ip-transparent that is similar.
|
|
|
8ba890 |
# ip-freebind: no
|
|
|
8ba890 |
|
|
|
8ba890 |
# EDNS reassembly buffer to advertise to UDP peers (the actual buffer
|
|
|
8ba890 |
# is set with msg-buffer-size). 1472 can solve fragmentation (timeouts).
|
|
|
8ba890 |
# edns-buffer-size: 4096
|
|
|
8ba890 |
|
|
|
8ba890 |
# Maximum UDP response size (not applied to TCP response).
|
|
|
8ba890 |
# Suggested values are 512 to 4096. Default is 4096. 65536 disables it.
|
|
|
8ba890 |
# 3072 causes +dnssec any isc.org queries to need TC=1.
|
|
|
8ba890 |
# Helps mitigating DDOS
|
|
|
8ba890 |
max-udp-size: 3072
|
|
|
8ba890 |
|
|
|
8ba890 |
# buffer size for handling DNS data. No messages larger than this
|
|
|
8ba890 |
# size can be sent or received, by UDP or TCP. In bytes.
|
|
|
8ba890 |
# msg-buffer-size: 65552
|
|
|
8ba890 |
|
|
|
8ba890 |
# the amount of memory to use for the message cache.
|
|
|
8ba890 |
# plain value in bytes or you can append k, m or G. default is "4Mb".
|
|
|
8ba890 |
# msg-cache-size: 4m
|
|
|
8ba890 |
|
|
|
8ba890 |
# the number of slabs to use for the message cache.
|
|
|
8ba890 |
# the number of slabs must be a power of 2.
|
|
|
8ba890 |
# more slabs reduce lock contention, but fragment memory usage.
|
|
|
8ba890 |
# msg-cache-slabs: 4
|
|
|
8ba890 |
|
|
|
8ba890 |
# the number of queries that a thread gets to service.
|
|
|
8ba890 |
# num-queries-per-thread: 1024
|
|
|
8ba890 |
|
|
|
8ba890 |
# if very busy, 50% queries run to completion, 50% get timeout in msec
|
|
|
8ba890 |
# jostle-timeout: 200
|
|
|
8ba890 |
|
|
|
8ba890 |
# msec to wait before close of port on timeout UDP. 0 disables.
|
|
|
8ba890 |
# delay-close: 0
|
|
|
8ba890 |
|
|
|
8ba890 |
# the amount of memory to use for the RRset cache.
|
|
|
8ba890 |
# plain value in bytes or you can append k, m or G. default is "4Mb".
|
|
|
8ba890 |
# rrset-cache-size: 4m
|
|
|
8ba890 |
|
|
|
8ba890 |
# the number of slabs to use for the RRset cache.
|
|
|
8ba890 |
# the number of slabs must be a power of 2.
|
|
|
8ba890 |
# more slabs reduce lock contention, but fragment memory usage.
|
|
|
8ba890 |
# rrset-cache-slabs: 4
|
|
|
8ba890 |
|
|
|
8ba890 |
# the time to live (TTL) value lower bound, in seconds. Default 0.
|
|
|
8ba890 |
# If more than an hour could easily give trouble due to stale data.
|
|
|
8ba890 |
# cache-min-ttl: 0
|
|
|
8ba890 |
|
|
|
8ba890 |
# the time to live (TTL) value cap for RRsets and messages in the
|
|
|
8ba890 |
# cache. Items are not cached for longer. In seconds.
|
|
|
8ba890 |
# cache-max-ttl: 86400
|
|
|
8ba890 |
|
|
|
8ba890 |
# the time to live (TTL) value cap for negative responses in the cache
|
|
|
8ba890 |
# cache-max-negative-ttl: 3600
|
|
|
8ba890 |
|
|
|
8ba890 |
# the time to live (TTL) value for cached roundtrip times, lameness and
|
|
|
8ba890 |
# EDNS version information for hosts. In seconds.
|
|
|
8ba890 |
# infra-host-ttl: 900
|
|
|
8ba890 |
|
|
|
8ba890 |
# minimum wait time for responses, increase if uplink is long. In msec.
|
|
|
8ba890 |
# infra-cache-min-rtt: 50
|
|
|
8ba890 |
|
|
|
8ba890 |
# the number of slabs to use for the Infrastructure cache.
|
|
|
8ba890 |
# the number of slabs must be a power of 2.
|
|
|
8ba890 |
# more slabs reduce lock contention, but fragment memory usage.
|
|
|
8ba890 |
# infra-cache-slabs: 4
|
|
|
8ba890 |
|
|
|
8ba890 |
# the maximum number of hosts that are cached (roundtrip, EDNS, lame).
|
|
|
8ba890 |
# infra-cache-numhosts: 10000
|
|
|
8ba890 |
|
|
|
8ba890 |
# define a number of tags here, use with local-zone, access-control.
|
|
|
8ba890 |
# repeat the define-tag statement to add additional tags.
|
|
|
8ba890 |
# define-tag: "tag1 tag2 tag3"
|
|
|
8ba890 |
|
|
|
8ba890 |
# Enable IPv4, "yes" or "no".
|
|
|
8ba890 |
# do-ip4: yes
|
|
|
8ba890 |
|
|
|
8ba890 |
# Enable IPv6, "yes" or "no".
|
|
|
8ba890 |
# do-ip6: yes
|
|
|
8ba890 |
|
|
|
8ba890 |
# Enable UDP, "yes" or "no".
|
|
|
8ba890 |
# NOTE: if setting up an unbound on tls443 for public use, you might want to
|
|
|
8ba890 |
# disable UDP to avoid being used in DNS amplification attacks.
|
|
|
8ba890 |
# do-udp: yes
|
|
|
8ba890 |
|
|
|
8ba890 |
# Enable TCP, "yes" or "no".
|
|
|
8ba890 |
# do-tcp: yes
|
|
|
8ba890 |
|
|
|
8ba890 |
# upstream connections use TCP only (and no UDP), "yes" or "no"
|
|
|
8ba890 |
# useful for tunneling scenarios, default no.
|
|
|
8ba890 |
# tcp-upstream: no
|
|
|
8ba890 |
|
|
|
8ba890 |
# upstream connections also use UDP (even if do-udp is no).
|
|
|
8ba890 |
# useful if if you want UDP upstream, but don't provide UDP downstream.
|
|
|
8ba890 |
# udp-upstream-without-downstream: no
|
|
|
8ba890 |
|
|
|
8ba890 |
# Maximum segment size (MSS) of TCP socket on which the server
|
|
|
8ba890 |
# responds to queries. Default is 0, system default MSS.
|
|
|
8ba890 |
# tcp-mss: 0
|
|
|
8ba890 |
|
|
|
8ba890 |
# Maximum segment size (MSS) of TCP socket for outgoing queries.
|
|
|
8ba890 |
# Default is 0, system default MSS.
|
|
|
8ba890 |
# outgoing-tcp-mss: 0
|
|
|
8ba890 |
|
|
|
8ba890 |
# Fedora note: do not activate this - can cause a crash
|
|
|
8ba890 |
# Use systemd socket activation for UDP, TCP, and control sockets.
|
|
|
8ba890 |
# use-systemd: no
|
|
|
8ba890 |
|
|
|
8ba890 |
# Detach from the terminal, run in background, "yes" or "no".
|
|
|
8ba890 |
# Set the value to "no" when unbound runs as systemd service.
|
|
|
8ba890 |
# do-daemonize: yes
|
|
|
8ba890 |
|
|
|
8ba890 |
# control which clients are allowed to make (recursive) queries
|
|
|
8ba890 |
# to this server. Specify classless netblocks with /size and action.
|
|
|
8ba890 |
# By default everything is refused, except for localhost.
|
|
|
8ba890 |
# Choose deny (drop message), refuse (polite error reply),
|
|
|
8ba890 |
# allow (recursive ok), allow_setrd (recursive ok, rd bit is forced on),
|
|
|
8ba890 |
# allow_snoop (recursive and nonrecursive ok)
|
|
|
8ba890 |
# deny_non_local (drop queries unless can be answered from local-data)
|
|
|
8ba890 |
# refuse_non_local (like deny_non_local but polite error reply).
|
|
|
8ba890 |
# access-control: 0.0.0.0/0 refuse
|
|
|
8ba890 |
# access-control: 127.0.0.0/8 allow
|
|
|
8ba890 |
# access-control: ::0/0 refuse
|
|
|
8ba890 |
# access-control: ::1 allow
|
|
|
8ba890 |
# access-control: ::ffff:127.0.0.1 allow
|
|
|
8ba890 |
|
|
|
8ba890 |
# tag access-control with list of tags (in "" with spaces between)
|
|
|
8ba890 |
# Clients using this access control element use localzones that
|
|
|
8ba890 |
# are tagged with one of these tags.
|
|
|
8ba890 |
# access-control-tag: 192.0.2.0/24 "tag2 tag3"
|
|
|
8ba890 |
|
|
|
8ba890 |
# set action for particular tag for given access control element
|
|
|
8ba890 |
# if you have multiple tag values, the tag used to lookup the action
|
|
|
8ba890 |
# is the first tag match between access-control-tag and local-zone-tag
|
|
|
8ba890 |
# where "first" comes from the order of the define-tag values.
|
|
|
8ba890 |
# access-control-tag-action: 192.0.2.0/24 tag3 refuse
|
|
|
8ba890 |
|
|
|
8ba890 |
# set redirect data for particular tag for access control element
|
|
|
8ba890 |
# access-control-tag-data: 192.0.2.0/24 tag2 "A 127.0.0.1"
|
|
|
8ba890 |
|
|
|
8ba890 |
# Set view for access control element
|
|
|
8ba890 |
# access-control-view: 192.0.2.0/24 viewname
|
|
|
8ba890 |
|
|
|
8ba890 |
# if given, a chroot(2) is done to the given directory.
|
|
|
8ba890 |
# i.e. you can chroot to the working directory, for example,
|
|
|
8ba890 |
# for extra security, but make sure all files are in that directory.
|
|
|
8ba890 |
#
|
|
|
8ba890 |
# If chroot is enabled, you should pass the configfile (from the
|
|
|
8ba890 |
# commandline) as a full path from the original root. After the
|
|
|
8ba890 |
# chroot has been performed the now defunct portion of the config
|
|
|
8ba890 |
# file path is removed to be able to reread the config after a reload.
|
|
|
8ba890 |
#
|
|
|
8ba890 |
# All other file paths (working dir, logfile, roothints, and
|
|
|
8ba890 |
# key files) can be specified in several ways:
|
|
|
8ba890 |
# o as an absolute path relative to the new root.
|
|
|
8ba890 |
# o as a relative path to the working directory.
|
|
|
8ba890 |
# o as an absolute path relative to the original root.
|
|
|
8ba890 |
# In the last case the path is adjusted to remove the unused portion.
|
|
|
8ba890 |
#
|
|
|
8ba890 |
# The pid file can be absolute and outside of the chroot, it is
|
|
|
8ba890 |
# written just prior to performing the chroot and dropping permissions.
|
|
|
8ba890 |
#
|
|
|
8ba890 |
# Additionally, unbound may need to access /dev/random (for entropy).
|
|
|
8ba890 |
# How to do this is specific to your OS.
|
|
|
8ba890 |
#
|
|
|
8ba890 |
# If you give "" no chroot is performed. The path must not end in a /.
|
|
|
8ba890 |
# chroot: "/var/lib/unbound"
|
|
|
8ba890 |
chroot: ""
|
|
|
8ba890 |
|
|
|
8ba890 |
# if given, user privileges are dropped (after binding port),
|
|
|
8ba890 |
# and the given username is assumed. Default is user "unbound".
|
|
|
8ba890 |
# If you give "" no privileges are dropped.
|
|
|
8ba890 |
username: "unbound"
|
|
|
8ba890 |
|
|
|
8ba890 |
# the working directory. The relative files in this config are
|
|
|
8ba890 |
# relative to this directory. If you give "" the working directory
|
|
|
8ba890 |
# is not changed.
|
|
|
8ba890 |
# If you give a server: directory: dir before include: file statements
|
|
|
8ba890 |
# then those includes can be relative to the working directory.
|
|
|
8ba890 |
directory: "/etc/unbound"
|
|
|
8ba890 |
|
|
|
8ba890 |
# the log file, "" means log to stderr.
|
|
|
8ba890 |
# Use of this option sets use-syslog to "no".
|
|
|
8ba890 |
# logfile: ""
|
|
|
8ba890 |
|
|
|
8ba890 |
# Log to syslog(3) if yes. The log facility LOG_DAEMON is used to
|
|
|
8ba890 |
# log to. If yes, it overrides the logfile.
|
|
|
8ba890 |
# use-syslog: yes
|
|
|
8ba890 |
|
|
|
8ba890 |
# Log identity to report. if empty, defaults to the name of argv[0]
|
|
|
8ba890 |
# (usually "unbound").
|
|
|
8ba890 |
# log-identity: ""
|
|
|
8ba890 |
|
|
|
8ba890 |
# print UTC timestamp in ascii to logfile, default is epoch in seconds.
|
|
|
8ba890 |
log-time-ascii: yes
|
|
|
8ba890 |
|
|
|
8ba890 |
# print one line with time, IP, name, type, class for every query.
|
|
|
8ba890 |
# log-queries: no
|
|
|
8ba890 |
|
|
|
8ba890 |
# print one line per reply, with time, IP, name, type, class, rcode,
|
|
|
8ba890 |
# timetoresolve, fromcache and responsesize.
|
|
|
8ba890 |
# log-replies: no
|
|
|
8ba890 |
|
|
|
8ba890 |
# the pid file. Can be an absolute path outside of chroot/work dir.
|
|
|
8ba890 |
pidfile: "/var/run/unbound/unbound.pid"
|
|
|
8ba890 |
|
|
|
8ba890 |
# file to read root hints from.
|
|
|
8ba890 |
# get one from https://www.internic.net/domain/named.cache
|
|
|
8ba890 |
# root-hints: ""
|
|
|
8ba890 |
|
|
|
8ba890 |
# enable to not answer id.server and hostname.bind queries.
|
|
|
8ba890 |
# hide-identity: no
|
|
|
8ba890 |
|
|
|
8ba890 |
# enable to not answer version.server and version.bind queries.
|
|
|
8ba890 |
# hide-version: no
|
|
|
8ba890 |
|
|
|
8ba890 |
# enable to not answer trustanchor.unbound queries.
|
|
|
8ba890 |
# hide-trustanchor: no
|
|
|
8ba890 |
|
|
|
8ba890 |
# the identity to report. Leave "" or default to return hostname.
|
|
|
8ba890 |
# identity: ""
|
|
|
8ba890 |
|
|
|
8ba890 |
# the version to report. Leave "" or default to return package version.
|
|
|
8ba890 |
# version: ""
|
|
|
8ba890 |
|
|
|
8ba890 |
# the target fetch policy.
|
|
|
8ba890 |
# series of integers describing the policy per dependency depth.
|
|
|
8ba890 |
# The number of values in the list determines the maximum dependency
|
|
|
8ba890 |
# depth the recursor will pursue before giving up. Each integer means:
|
|
|
8ba890 |
# -1 : fetch all targets opportunistically,
|
|
|
8ba890 |
# 0: fetch on demand,
|
|
|
8ba890 |
# positive value: fetch that many targets opportunistically.
|
|
|
8ba890 |
# Enclose the list of numbers between quotes ("").
|
|
|
8ba890 |
# target-fetch-policy: "3 2 1 0 0"
|
|
|
8ba890 |
|
|
|
8ba890 |
# Harden against very small EDNS buffer sizes.
|
|
|
8ba890 |
# harden-short-bufsize: no
|
|
|
8ba890 |
|
|
|
8ba890 |
# Harden against unseemly large queries.
|
|
|
8ba890 |
# harden-large-queries: no
|
|
|
8ba890 |
|
|
|
8ba890 |
# Harden against out of zone rrsets, to avoid spoofing attempts.
|
|
|
8ba890 |
harden-glue: yes
|
|
|
8ba890 |
|
|
|
8ba890 |
# Harden against receiving dnssec-stripped data. If you turn it
|
|
|
8ba890 |
# off, failing to validate dnskey data for a trustanchor will
|
|
|
8ba890 |
# trigger insecure mode for that zone (like without a trustanchor).
|
|
|
8ba890 |
# Default on, which insists on dnssec data for trust-anchored zones.
|
|
|
8ba890 |
harden-dnssec-stripped: yes
|
|
|
8ba890 |
|
|
|
8ba890 |
# Harden against queries that fall under dnssec-signed nxdomain names.
|
|
|
8ba890 |
harden-below-nxdomain: yes
|
|
|
8ba890 |
|
|
|
8ba890 |
# Harden the referral path by performing additional queries for
|
|
|
8ba890 |
# infrastructure data. Validates the replies (if possible).
|
|
|
8ba890 |
# Default off, because the lookups burden the server. Experimental
|
|
|
8ba890 |
# implementation of draft-wijngaards-dnsext-resolver-side-mitigation.
|
|
|
8ba890 |
harden-referral-path: yes
|
|
|
8ba890 |
|
|
|
8ba890 |
# Harden against algorithm downgrade when multiple algorithms are
|
|
|
8ba890 |
# advertised in the DS record. If no, allows the weakest algorithm
|
|
|
8ba890 |
# to validate the zone.
|
|
|
8ba890 |
# harden-algo-downgrade: no
|
|
|
8ba890 |
|
|
|
8ba890 |
# Sent minimum amount of information to upstream servers to enhance
|
|
|
8ba890 |
# privacy. Only sent minimum required labels of the QNAME and set QTYPE
|
|
|
8ba890 |
# to NS when possible.
|
|
|
8ba890 |
qname-minimisation: yes
|
|
|
8ba890 |
|
|
|
8ba890 |
# QNAME minimisation in strict mode. Do not fall-back to sending full
|
|
|
8ba890 |
# QNAME to potentially broken nameservers. A lot of domains will not be
|
|
|
8ba890 |
# resolvable when this option in enabled.
|
|
|
8ba890 |
# This option only has effect when qname-minimisation is enabled.
|
|
|
8ba890 |
# qname-minimisation-strict: no
|
|
|
8ba890 |
|
|
|
8ba890 |
# Aggressive NSEC uses the DNSSEC NSEC chain to synthesize NXDOMAIN
|
|
|
8ba890 |
# and other denials, using information from previous NXDOMAINs answers.
|
|
|
8ba890 |
aggressive-nsec: yes
|
|
|
8ba890 |
|
|
|
8ba890 |
# Use 0x20-encoded random bits in the query to foil spoof attempts.
|
|
|
8ba890 |
# This feature is an experimental implementation of draft dns-0x20.
|
|
|
8ba890 |
# use-caps-for-id: no
|
|
|
8ba890 |
|
|
|
8ba890 |
# Domains (and domains in them) without support for dns-0x20 and
|
|
|
8ba890 |
# the fallback fails because they keep sending different answers.
|
|
|
8ba890 |
# caps-whitelist: "licdn.com"
|
|
|
8ba890 |
# caps-whitelist: "senderbase.org"
|
|
|
8ba890 |
|
|
|
8ba890 |
# Enforce privacy of these addresses. Strips them away from answers.
|
|
|
8ba890 |
# It may cause DNSSEC validation to additionally mark it as bogus.
|
|
|
8ba890 |
# Protects against 'DNS Rebinding' (uses browser as network proxy).
|
|
|
8ba890 |
# Only 'private-domain' and 'local-data' names are allowed to have
|
|
|
8ba890 |
# these private addresses. No default.
|
|
|
8ba890 |
# private-address: 10.0.0.0/8
|
|
|
8ba890 |
# private-address: 172.16.0.0/12
|
|
|
8ba890 |
# private-address: 192.168.0.0/16
|
|
|
8ba890 |
# private-address: 169.254.0.0/16
|
|
|
8ba890 |
# private-address: fd00::/8
|
|
|
8ba890 |
# private-address: fe80::/10
|
|
|
8ba890 |
# private-address: ::ffff:0:0/96
|
|
|
8ba890 |
|
|
|
8ba890 |
# Allow the domain (and its subdomains) to contain private addresses.
|
|
|
8ba890 |
# local-data statements are allowed to contain private addresses too.
|
|
|
8ba890 |
# private-domain: "example.com"
|
|
|
8ba890 |
|
|
|
8ba890 |
# If nonzero, unwanted replies are not only reported in statistics,
|
|
|
8ba890 |
# but also a running total is kept per thread. If it reaches the
|
|
|
8ba890 |
# threshold, a warning is printed and a defensive action is taken,
|
|
|
8ba890 |
# the cache is cleared to flush potential poison out of it.
|
|
|
8ba890 |
# A suggested value is 10000000, the default is 0 (turned off).
|
|
|
8ba890 |
unwanted-reply-threshold: 10000000
|
|
|
8ba890 |
|
|
|
8ba890 |
# Do not query the following addresses. No DNS queries are sent there.
|
|
|
8ba890 |
# List one address per entry. List classless netblocks with /size,
|
|
|
8ba890 |
# do-not-query-address: 127.0.0.1/8
|
|
|
8ba890 |
# do-not-query-address: ::1
|
|
|
8ba890 |
|
|
|
8ba890 |
# if yes, the above default do-not-query-address entries are present.
|
|
|
8ba890 |
# if no, localhost can be queried (for testing and debugging).
|
|
|
8ba890 |
# do-not-query-localhost: yes
|
|
|
8ba890 |
|
|
|
8ba890 |
# if yes, perform prefetching of almost expired message cache entries.
|
|
|
8ba890 |
prefetch: yes
|
|
|
8ba890 |
|
|
|
8ba890 |
# if yes, perform key lookups adjacent to normal lookups.
|
|
|
8ba890 |
prefetch-key: yes
|
|
|
8ba890 |
|
|
|
8ba890 |
# if yes, Unbound rotates RRSet order in response.
|
|
|
8ba890 |
rrset-roundrobin: yes
|
|
|
8ba890 |
|
|
|
8ba890 |
# if yes, Unbound doesn't insert authority/additional sections
|
|
|
8ba890 |
# into response messages when those sections are not required.
|
|
|
8ba890 |
minimal-responses: yes
|
|
|
8ba890 |
|
|
|
8ba890 |
# true to disable DNSSEC lameness check in iterator.
|
|
|
8ba890 |
# disable-dnssec-lame-check: no
|
|
|
8ba890 |
|
|
|
8ba890 |
# module configuration of the server. A string with identifiers
|
|
|
8ba890 |
# separated by spaces. Syntax: "[dns64] [validator] iterator"
|
|
|
8ba890 |
module-config: "ipsecmod validator iterator"
|
|
|
8ba890 |
|
|
|
8ba890 |
# File with trusted keys, kept uptodate using RFC5011 probes,
|
|
|
8ba890 |
# initial file like trust-anchor-file, then it stores metadata.
|
|
|
8ba890 |
# Use several entries, one per domain name, to track multiple zones.
|
|
|
8ba890 |
#
|
|
|
8ba890 |
# If you want to perform DNSSEC validation, run unbound-anchor before
|
|
|
8ba890 |
# you start unbound (i.e. in the system boot scripts). And enable:
|
|
|
8ba890 |
# Please note usage of unbound-anchor root anchor is at your own risk
|
|
|
8ba890 |
# and under the terms of our LICENSE (see that file in the source).
|
|
|
8ba890 |
# auto-trust-anchor-file: "/var/lib/unbound/root.key"
|
|
|
8ba890 |
|
|
|
8ba890 |
# trust anchor signaling sends a RFC8145 key tag query after priming.
|
|
|
8ba890 |
trust-anchor-signaling: yes
|
|
|
8ba890 |
|
|
|
8ba890 |
# Root key trust anchor sentinel (draft-ietf-dnsop-kskroll-sentinel)
|
|
|
8ba890 |
root-key-sentinel: yes
|
|
|
8ba890 |
|
|
|
8ba890 |
# File with DLV trusted keys. Same format as trust-anchor-file.
|
|
|
8ba890 |
# There can be only one DLV configured, it is trusted from root down.
|
|
|
8ba890 |
# DLV is going to be decommissioned. Please do not use it any more.
|
|
|
8ba890 |
# dlv-anchor-file: "dlv.isc.org.key"
|
|
|
8ba890 |
|
|
|
8ba890 |
# File with trusted keys for validation. Specify more than one file
|
|
|
8ba890 |
# with several entries, one file per entry.
|
|
|
8ba890 |
# Zone file format, with DS and DNSKEY entries.
|
|
|
8ba890 |
# Note this gets out of date, use auto-trust-anchor-file please.
|
|
|
8ba890 |
# trust-anchor-file: ""
|
|
|
8ba890 |
|
|
|
8ba890 |
# Trusted key for validation. DS or DNSKEY. specify the RR on a
|
|
|
8ba890 |
# single line, surrounded by "". TTL is ignored. class is IN default.
|
|
|
8ba890 |
# Note this gets out of date, use auto-trust-anchor-file please.
|
|
|
8ba890 |
# (These examples are from August 2007 and may not be valid anymore).
|
|
|
8ba890 |
# trust-anchor: "nlnetlabs.nl. DNSKEY 257 3 5 AQPzzTWMz8qSWIQlfRnPckx2BiVmkVN6LPupO3mbz7FhLSnm26n6iG9N Lby97Ji453aWZY3M5/xJBSOS2vWtco2t8C0+xeO1bc/d6ZTy32DHchpW 6rDH1vp86Ll+ha0tmwyy9QP7y2bVw5zSbFCrefk8qCUBgfHm9bHzMG1U BYtEIQ=="
|
|
|
8ba890 |
# trust-anchor: "jelte.nlnetlabs.nl. DS 42860 5 1 14D739EB566D2B1A5E216A0BA4D17FA9B038BE4A"
|
|
|
8ba890 |
|
|
|
8ba890 |
# File with trusted keys for validation. Specify more than one file
|
|
|
8ba890 |
# with several entries, one file per entry. Like trust-anchor-file
|
|
|
8ba890 |
# but has a different file format. Format is BIND-9 style format,
|
|
|
8ba890 |
# the trusted-keys { name flag proto algo "key"; }; clauses are read.
|
|
|
8ba890 |
# you need external update procedures to track changes in keys.
|
|
|
8ba890 |
# trusted-keys-file: ""
|
|
|
8ba890 |
#
|
|
|
8ba890 |
trusted-keys-file: /etc/unbound/keys.d/*.key
|
|
|
8ba890 |
auto-trust-anchor-file: "/var/lib/unbound/root.key"
|
|
|
8ba890 |
|
|
|
8ba890 |
# Ignore chain of trust. Domain is treated as insecure.
|
|
|
8ba890 |
# domain-insecure: "example.com"
|
|
|
8ba890 |
|
|
|
8ba890 |
# Override the date for validation with a specific fixed date.
|
|
|
8ba890 |
# Do not set this unless you are debugging signature inception
|
|
|
8ba890 |
# and expiration. "" or "0" turns the feature off. -1 ignores date.
|
|
|
8ba890 |
# val-override-date: ""
|
|
|
8ba890 |
|
|
|
8ba890 |
# The time to live for bogus data, rrsets and messages. This avoids
|
|
|
8ba890 |
# some of the revalidation, until the time interval expires. in secs.
|
|
|
8ba890 |
# val-bogus-ttl: 60
|
|
|
8ba890 |
|
|
|
8ba890 |
# The signature inception and expiration dates are allowed to be off
|
|
|
8ba890 |
# by 10% of the signature lifetime (expir-incep) from our local clock.
|
|
|
8ba890 |
# This leeway is capped with a minimum and a maximum. In seconds.
|
|
|
8ba890 |
# val-sig-skew-min: 3600
|
|
|
8ba890 |
# val-sig-skew-max: 86400
|
|
|
8ba890 |
|
|
|
8ba890 |
# Should additional section of secure message also be kept clean of
|
|
|
8ba890 |
# unsecure data. Useful to shield the users of this validator from
|
|
|
8ba890 |
# potential bogus data in the additional section. All unsigned data
|
|
|
8ba890 |
# in the additional section is removed from secure messages.
|
|
|
8ba890 |
val-clean-additional: yes
|
|
|
8ba890 |
|
|
|
8ba890 |
# Turn permissive mode on to permit bogus messages. Thus, messages
|
|
|
8ba890 |
# for which security checks failed will be returned to clients,
|
|
|
8ba890 |
# instead of SERVFAIL. It still performs the security checks, which
|
|
|
8ba890 |
# result in interesting log files and possibly the AD bit in
|
|
|
8ba890 |
# replies if the message is found secure. The default is off.
|
|
|
8ba890 |
# NOTE: TURNING THIS ON DISABLES ALL DNSSEC SECURITY
|
|
|
8ba890 |
val-permissive-mode: no
|
|
|
8ba890 |
|
|
|
8ba890 |
# Ignore the CD flag in incoming queries and refuse them bogus data.
|
|
|
8ba890 |
# Enable it if the only clients of unbound are legacy servers (w2008)
|
|
|
8ba890 |
# that set CD but cannot validate themselves.
|
|
|
8ba890 |
# ignore-cd-flag: no
|
|
|
8ba890 |
|
|
|
8ba890 |
# Serve expired responses from cache, with TTL 0 in the response,
|
|
|
8ba890 |
# and then attempt to fetch the data afresh.
|
|
|
8ba890 |
serve-expired: yes
|
|
|
8ba890 |
|
|
|
8ba890 |
# Have the validator log failed validations for your diagnosis.
|
|
|
8ba890 |
# 0: off. 1: A line per failed user query. 2: With reason and bad IP.
|
|
|
8ba890 |
val-log-level: 1
|
|
|
8ba890 |
|
|
|
8ba890 |
# It is possible to configure NSEC3 maximum iteration counts per
|
|
|
8ba890 |
# keysize. Keep this table very short, as linear search is done.
|
|
|
8ba890 |
# A message with an NSEC3 with larger count is marked insecure.
|
|
|
8ba890 |
# List in ascending order the keysize and count values.
|
|
|
8ba890 |
# val-nsec3-keysize-iterations: "1024 150 2048 500 4096 2500"
|
|
|
8ba890 |
|
|
|
8ba890 |
# instruct the auto-trust-anchor-file probing to add anchors after ttl.
|
|
|
8ba890 |
# add-holddown: 2592000 # 30 days
|
|
|
8ba890 |
|
|
|
8ba890 |
# instruct the auto-trust-anchor-file probing to del anchors after ttl.
|
|
|
8ba890 |
# del-holddown: 2592000 # 30 days
|
|
|
8ba890 |
|
|
|
8ba890 |
# auto-trust-anchor-file probing removes missing anchors after ttl.
|
|
|
8ba890 |
# If the value 0 is given, missing anchors are not removed.
|
|
|
8ba890 |
# keep-missing: 31622400 # 366 days
|
|
|
8ba890 |
|
|
|
8ba890 |
# debug option that allows very small holddown times for key rollover,
|
|
|
8ba890 |
# otherwise the RFC mandates probe intervals must be at least 1 hour.
|
|
|
8ba890 |
# permit-small-holddown: no
|
|
|
8ba890 |
|
|
|
8ba890 |
# the amount of memory to use for the key cache.
|
|
|
8ba890 |
# plain value in bytes or you can append k, m or G. default is "4Mb".
|
|
|
8ba890 |
# key-cache-size: 4m
|
|
|
8ba890 |
|
|
|
8ba890 |
# the number of slabs to use for the key cache.
|
|
|
8ba890 |
# the number of slabs must be a power of 2.
|
|
|
8ba890 |
# more slabs reduce lock contention, but fragment memory usage.
|
|
|
8ba890 |
# key-cache-slabs: 4
|
|
|
8ba890 |
|
|
|
8ba890 |
# the amount of memory to use for the negative cache (used for DLV).
|
|
|
8ba890 |
# plain value in bytes or you can append k, m or G. default is "1Mb".
|
|
|
8ba890 |
# neg-cache-size: 1m
|
|
|
8ba890 |
|
|
|
8ba890 |
# By default, for a number of zones a small default 'nothing here'
|
|
|
8ba890 |
# reply is built-in. Query traffic is thus blocked. If you
|
|
|
8ba890 |
# wish to serve such zone you can unblock them by uncommenting one
|
|
|
8ba890 |
# of the nodefault statements below.
|
|
|
8ba890 |
# You may also have to use domain-insecure: zone to make DNSSEC work,
|
|
|
8ba890 |
# unless you have your own trust anchors for this zone.
|
|
|
8ba890 |
# local-zone: "localhost." nodefault
|
|
|
8ba890 |
# local-zone: "127.in-addr.arpa." nodefault
|
|
|
8ba890 |
# 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
|
|
|
8ba890 |
# local-zone: "onion." nodefault
|
|
|
8ba890 |
# local-zone: "test." nodefault
|
|
|
8ba890 |
# local-zone: "invalid." nodefault
|
|
|
8ba890 |
# local-zone: "10.in-addr.arpa." nodefault
|
|
|
8ba890 |
# local-zone: "16.172.in-addr.arpa." nodefault
|
|
|
8ba890 |
# local-zone: "17.172.in-addr.arpa." nodefault
|
|
|
8ba890 |
# local-zone: "18.172.in-addr.arpa." nodefault
|
|
|
8ba890 |
# local-zone: "19.172.in-addr.arpa." nodefault
|
|
|
8ba890 |
# local-zone: "20.172.in-addr.arpa." nodefault
|
|
|
8ba890 |
# local-zone: "21.172.in-addr.arpa." nodefault
|
|
|
8ba890 |
# local-zone: "22.172.in-addr.arpa." nodefault
|
|
|
8ba890 |
# local-zone: "23.172.in-addr.arpa." nodefault
|
|
|
8ba890 |
# local-zone: "24.172.in-addr.arpa." nodefault
|
|
|
8ba890 |
# local-zone: "25.172.in-addr.arpa." nodefault
|
|
|
8ba890 |
# local-zone: "26.172.in-addr.arpa." nodefault
|
|
|
8ba890 |
# local-zone: "27.172.in-addr.arpa." nodefault
|
|
|
8ba890 |
# local-zone: "28.172.in-addr.arpa." nodefault
|
|
|
8ba890 |
# local-zone: "29.172.in-addr.arpa." nodefault
|
|
|
8ba890 |
# local-zone: "30.172.in-addr.arpa." nodefault
|
|
|
8ba890 |
# local-zone: "31.172.in-addr.arpa." nodefault
|
|
|
8ba890 |
# local-zone: "168.192.in-addr.arpa." nodefault
|
|
|
8ba890 |
# local-zone: "0.in-addr.arpa." nodefault
|
|
|
8ba890 |
# local-zone: "254.169.in-addr.arpa." nodefault
|
|
|
8ba890 |
# local-zone: "2.0.192.in-addr.arpa." nodefault
|
|
|
8ba890 |
# local-zone: "100.51.198.in-addr.arpa." nodefault
|
|
|
8ba890 |
# local-zone: "113.0.203.in-addr.arpa." nodefault
|
|
|
8ba890 |
# local-zone: "255.255.255.255.in-addr.arpa." nodefault
|
|
|
8ba890 |
# 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
|
|
|
8ba890 |
# local-zone: "d.f.ip6.arpa." nodefault
|
|
|
8ba890 |
# local-zone: "8.e.f.ip6.arpa." nodefault
|
|
|
8ba890 |
# local-zone: "9.e.f.ip6.arpa." nodefault
|
|
|
8ba890 |
# local-zone: "a.e.f.ip6.arpa." nodefault
|
|
|
8ba890 |
# local-zone: "b.e.f.ip6.arpa." nodefault
|
|
|
8ba890 |
# local-zone: "8.b.d.0.1.0.0.2.ip6.arpa." nodefault
|
|
|
8ba890 |
# And for 64.100.in-addr.arpa. to 127.100.in-addr.arpa.
|
|
|
8ba890 |
|
|
|
8ba890 |
# If unbound is running service for the local host then it is useful
|
|
|
8ba890 |
# to perform lan-wide lookups to the upstream, and unblock the
|
|
|
8ba890 |
# long list of local-zones above. If this unbound is a dns server
|
|
|
8ba890 |
# for a network of computers, disabled is better and stops information
|
|
|
8ba890 |
# leakage of local lan information.
|
|
|
8ba890 |
# unblock-lan-zones: no
|
|
|
8ba890 |
|
|
|
8ba890 |
# The insecure-lan-zones option disables validation for
|
|
|
8ba890 |
# these zones, as if they were all listed as domain-insecure.
|
|
|
8ba890 |
# insecure-lan-zones: no
|
|
|
8ba890 |
|
|
|
8ba890 |
# a number of locally served zones can be configured.
|
|
|
8ba890 |
# local-zone: <zone> <type>
|
|
|
8ba890 |
# local-data: "<resource record string>"
|
|
|
8ba890 |
# o deny serves local data (if any), else, drops queries.
|
|
|
8ba890 |
# o refuse serves local data (if any), else, replies with error.
|
|
|
8ba890 |
# o static serves local data, else, nxdomain or nodata answer.
|
|
|
8ba890 |
# o transparent gives local data, but resolves normally for other names
|
|
|
8ba890 |
# o redirect serves the zone data for any subdomain in the zone.
|
|
|
8ba890 |
# o nodefault can be used to normally resolve AS112 zones.
|
|
|
8ba890 |
# o typetransparent resolves normally for other types and other names
|
|
|
8ba890 |
# o inform acts like transparent, but logs client IP address
|
|
|
8ba890 |
# o inform_deny drops queries and logs client IP address
|
|
|
8ba890 |
# o always_transparent, always_refuse, always_nxdomain, resolve in
|
|
|
8ba890 |
# that way but ignore local data for that name
|
|
|
8ba890 |
# o noview breaks out of that view towards global local-zones.
|
|
|
8ba890 |
#
|
|
|
8ba890 |
# defaults are localhost address, reverse for 127.0.0.1 and ::1
|
|
|
8ba890 |
# and nxdomain for AS112 zones. If you configure one of these zones
|
|
|
8ba890 |
# the default content is omitted, or you can omit it with 'nodefault'.
|
|
|
8ba890 |
#
|
|
|
8ba890 |
# If you configure local-data without specifying local-zone, by
|
|
|
8ba890 |
# default a transparent local-zone is created for the data.
|
|
|
8ba890 |
#
|
|
|
8ba890 |
# You can add locally served data with
|
|
|
8ba890 |
# local-zone: "local." static
|
|
|
8ba890 |
# local-data: "mycomputer.local. IN A 192.0.2.51"
|
|
|
8ba890 |
# local-data: 'mytext.local TXT "content of text record"'
|
|
|
8ba890 |
#
|
|
|
8ba890 |
# You can override certain queries with
|
|
|
8ba890 |
# local-data: "adserver.example.com A 127.0.0.1"
|
|
|
8ba890 |
#
|
|
|
8ba890 |
# You can redirect a domain to a fixed address with
|
|
|
8ba890 |
# (this makes example.com, www.example.com, etc, all go to 192.0.2.3)
|
|
|
8ba890 |
# local-zone: "example.com" redirect
|
|
|
8ba890 |
# local-data: "example.com A 192.0.2.3"
|
|
|
8ba890 |
#
|
|
|
8ba890 |
# Shorthand to make PTR records, "IPv4 name" or "IPv6 name".
|
|
|
8ba890 |
# You can also add PTR records using local-data directly, but then
|
|
|
8ba890 |
# you need to do the reverse notation yourself.
|
|
|
8ba890 |
# local-data-ptr: "192.0.2.3 www.example.com"
|
|
|
8ba890 |
|
|
|
8ba890 |
include: /etc/unbound/local.d/*.conf
|
|
|
8ba890 |
|
|
|
8ba890 |
# tag a localzone with a list of tag names (in "" with spaces between)
|
|
|
8ba890 |
# local-zone-tag: "example.com" "tag2 tag3"
|
|
|
8ba890 |
|
|
|
8ba890 |
# add a netblock specific override to a localzone, with zone type
|
|
|
8ba890 |
# local-zone-override: "example.com" 192.0.2.0/24 refuse
|
|
|
8ba890 |
|
|
|
8ba890 |
# service clients over SSL (on the TCP sockets), with plain DNS inside
|
|
|
8ba890 |
# the SSL stream. Give the certificate to use and private key.
|
|
|
8ba890 |
# default is "" (disabled). requires restart to take effect.
|
|
|
8ba890 |
# tls-service-key: "/etc/unbound/unbound_server.key"
|
|
|
8ba890 |
# tls-service-pem: "/etc/unbound/unbound_server.pem"
|
|
|
8ba890 |
# tls-port: 853
|
|
|
8ba890 |
#
|
|
|
8ba890 |
# request upstream over SSL (with plain DNS inside the SSL stream).
|
|
|
8ba890 |
# Default is no. Can be turned on and off with unbound-control.
|
|
|
8ba890 |
# tls-upstream: no
|
|
|
8ba890 |
|
|
|
8ba890 |
# Certificates used to authenticate connections made upstream.
|
|
|
8ba890 |
# tls-cert-bundle: ""
|
|
|
8ba890 |
|
|
|
8ba890 |
# Add system certs to the cert bundle, from the Windows Cert Store
|
|
|
8ba890 |
# tls-win-cert: no
|
|
|
8ba890 |
|
|
|
8ba890 |
# Also serve tls on these port numbers (eg. 443, ...), by listing
|
|
|
8ba890 |
# tls-additional-ports: portno for each of the port numbers.
|
|
|
8ba890 |
|
|
|
8ba890 |
# DNS64 prefix. Must be specified when DNS64 is use.
|
|
|
8ba890 |
# Enable dns64 in module-config. Used to synthesize IPv6 from IPv4.
|
|
|
8ba890 |
# dns64-prefix: 64:ff9b::0/96
|
|
|
8ba890 |
|
|
|
8ba890 |
# ratelimit for uncached, new queries, this limits recursion effort.
|
|
|
8ba890 |
# ratelimiting is experimental, and may help against randomqueryflood.
|
|
|
8ba890 |
# if 0(default) it is disabled, otherwise state qps allowed per zone.
|
|
|
8ba890 |
# ratelimit: 0
|
|
|
8ba890 |
|
|
|
8ba890 |
# ratelimits are tracked in a cache, size in bytes of cache (or k,m).
|
|
|
8ba890 |
# ratelimit-size: 4m
|
|
|
8ba890 |
# ratelimit cache slabs, reduces lock contention if equal to cpucount.
|
|
|
8ba890 |
# ratelimit-slabs: 4
|
|
|
8ba890 |
|
|
|
8ba890 |
# 0 blocks when ratelimited, otherwise let 1/xth traffic through
|
|
|
8ba890 |
# ratelimit-factor: 10
|
|
|
8ba890 |
|
|
|
8ba890 |
# what is considered a low rtt (ping time for upstream server), in msec
|
|
|
8ba890 |
# low-rtt: 45
|
|
|
8ba890 |
# select low rtt this many times out of 1000. 0 means the fast server
|
|
|
8ba890 |
# select is disabled. prefetches are not sped up.
|
|
|
8ba890 |
# low-rtt-permil: 0
|
|
|
8ba890 |
|
|
|
8ba890 |
# override the ratelimit for a specific domain name.
|
|
|
8ba890 |
# give this setting multiple times to have multiple overrides.
|
|
|
8ba890 |
# ratelimit-for-domain: example.com 1000
|
|
|
8ba890 |
# override the ratelimits for all domains below a domain name
|
|
|
8ba890 |
# can give this multiple times, the name closest to the zone is used.
|
|
|
8ba890 |
# ratelimit-below-domain: com 1000
|
|
|
8ba890 |
|
|
|
8ba890 |
# global query ratelimit for all ip addresses.
|
|
|
8ba890 |
# feature is experimental.
|
|
|
8ba890 |
# if 0(default) it is disabled, otherwise states qps allowed per ip address
|
|
|
8ba890 |
# ip-ratelimit: 0
|
|
|
8ba890 |
|
|
|
8ba890 |
# ip ratelimits are tracked in a cache, size in bytes of cache (or k,m).
|
|
|
8ba890 |
# ip-ratelimit-size: 4m
|
|
|
8ba890 |
# ip ratelimit cache slabs, reduces lock contention if equal to cpucount.
|
|
|
8ba890 |
# ip-ratelimit-slabs: 4
|
|
|
8ba890 |
|
|
|
8ba890 |
# 0 blocks when ip is ratelimited, otherwise let 1/xth traffic through
|
|
|
8ba890 |
# ip-ratelimit-factor: 10
|
|
|
8ba890 |
|
|
|
8ba890 |
# Specific options for ipsecmod. unbound needs to be configured with
|
|
|
8ba890 |
# --enable-ipsecmod for these to take effect.
|
|
|
8ba890 |
#
|
|
|
8ba890 |
# Enable or disable ipsecmod (it still needs to be defined in
|
|
|
8ba890 |
# module-config above). Can be used when ipsecmod needs to be
|
|
|
8ba890 |
# enabled/disabled via remote-control(below).
|
|
|
8ba890 |
# Fedora: module will be enabled on-demand by libreswan
|
|
|
8ba890 |
ipsecmod-enabled: no
|
|
|
8ba890 |
|
|
|
8ba890 |
# Path to executable external hook. It must be defined when ipsecmod is
|
|
|
8ba890 |
# listed in module-config (above).
|
|
|
8ba890 |
# ipsecmod-hook: "./my_executable"
|
|
|
8ba890 |
ipsecmod-hook:/usr/libexec/ipsec/_unbound-hook
|
|
|
8ba890 |
|
|
|
8ba890 |
# When enabled unbound will reply with SERVFAIL if the return value of
|
|
|
8ba890 |
# the ipsecmod-hook is not 0.
|
|
|
8ba890 |
# ipsecmod-strict: no
|
|
|
8ba890 |
#
|
|
|
8ba890 |
# Maximum time to live (TTL) for cached A/AAAA records with IPSECKEY.
|
|
|
8ba890 |
# ipsecmod-max-ttl: 3600
|
|
|
8ba890 |
#
|
|
|
8ba890 |
# Reply with A/AAAA even if the relevant IPSECKEY is bogus. Mainly used for
|
|
|
8ba890 |
# testing.
|
|
|
8ba890 |
# ipsecmod-ignore-bogus: no
|
|
|
8ba890 |
#
|
|
|
8ba890 |
# Domains for which ipsecmod will be triggered. If not defined (default)
|
|
|
8ba890 |
# all domains are treated as being whitelisted.
|
|
|
8ba890 |
# ipsecmod-whitelist: "libreswan.org"
|
|
|
8ba890 |
# ipsecmod-whitelist: "nlnetlabs.nl"
|
|
|
8ba890 |
|
|
|
8ba890 |
# Python config section. To enable:
|
|
|
8ba890 |
# o use --with-pythonmodule to configure before compiling.
|
|
|
8ba890 |
# o list python in the module-config string (above) to enable.
|
|
|
8ba890 |
# o and give a python-script to run.
|
|
|
8ba890 |
python:
|
|
|
8ba890 |
# Script file to load
|
|
|
8ba890 |
# python-script: "/etc/unbound/ubmodule-tst.py"
|
|
|
8ba890 |
|
|
|
8ba890 |
# Remote control config section.
|
|
|
8ba890 |
remote-control:
|
|
|
8ba890 |
# Enable remote control with unbound-control(8) here.
|
|
|
8ba890 |
# set up the keys and certificates with unbound-control-setup.
|
|
|
8ba890 |
# Note: required for unbound-munin package
|
|
|
8ba890 |
control-enable: yes
|
|
|
8ba890 |
|
|
|
8ba890 |
# Set to no and use an absolute path as control-interface to use
|
|
|
8ba890 |
# a unix local named pipe for unbound-control.
|
|
|
8ba890 |
# control-use-cert: yes
|
|
|
8ba890 |
|
|
|
8ba890 |
# what interfaces are listened to for remote control.
|
|
|
8ba890 |
# give 0.0.0.0 and ::0 to listen to all interfaces.
|
|
|
8ba890 |
# control-interface: 127.0.0.1
|
|
|
8ba890 |
# control-interface: ::1
|
|
|
8ba890 |
|
|
|
8ba890 |
# port number for remote control operations.
|
|
|
8ba890 |
# control-port: 8953
|
|
|
8ba890 |
|
|
|
8ba890 |
# unbound server key file.
|
|
|
8ba890 |
server-key-file: "/etc/unbound/unbound_server.key"
|
|
|
8ba890 |
|
|
|
8ba890 |
# unbound server certificate file.
|
|
|
8ba890 |
server-cert-file: "/etc/unbound/unbound_server.pem"
|
|
|
8ba890 |
|
|
|
8ba890 |
# unbound-control key file.
|
|
|
8ba890 |
control-key-file: "/etc/unbound/unbound_control.key"
|
|
|
8ba890 |
|
|
|
8ba890 |
# unbound-control certificate file.
|
|
|
8ba890 |
control-cert-file: "/etc/unbound/unbound_control.pem"
|
|
|
8ba890 |
|
|
|
8ba890 |
# Stub and Forward zones
|
|
|
8ba890 |
include: /etc/unbound/conf.d/*.conf
|
|
|
8ba890 |
|
|
|
8ba890 |
# Stub zones.
|
|
|
8ba890 |
# Create entries like below, to make all queries for 'example.com' and
|
|
|
8ba890 |
# 'example.org' go to the given list of nameservers. list zero or more
|
|
|
8ba890 |
# nameservers by hostname or by ipaddress. If you set stub-prime to yes,
|
|
|
8ba890 |
# the list is treated as priming hints (default is no).
|
|
|
8ba890 |
# With stub-first yes, it attempts without the stub if it fails.
|
|
|
8ba890 |
# Consider adding domain-insecure: name and local-zone: name nodefault
|
|
|
8ba890 |
# to the server: section if the stub is a locally served zone.
|
|
|
8ba890 |
# stub-zone:
|
|
|
8ba890 |
# name: "example.com"
|
|
|
8ba890 |
# stub-addr: 192.0.2.68
|
|
|
8ba890 |
# stub-prime: no
|
|
|
8ba890 |
# stub-first: no
|
|
|
8ba890 |
# stub-tls-upstream: no
|
|
|
8ba890 |
# stub-zone:
|
|
|
8ba890 |
# name: "example.org"
|
|
|
8ba890 |
# stub-host: ns.example.com.
|
|
|
8ba890 |
|
|
|
8ba890 |
# You can now also dynamically create and delete stub-zone's using
|
|
|
8ba890 |
# unbound-control stub_add domain.com 1.2.3.4 5.6.7.8
|
|
|
8ba890 |
# unbound-control stub_remove domain.com 1.2.3.4 5.6.7.8
|
|
|
8ba890 |
|
|
|
8ba890 |
# Forward zones
|
|
|
8ba890 |
# Create entries like below, to make all queries for 'example.com' and
|
|
|
8ba890 |
# 'example.org' go to the given list of servers. These servers have to handle
|
|
|
8ba890 |
# recursion to other nameservers. List zero or more nameservers by hostname
|
|
|
8ba890 |
# or by ipaddress. Use an entry with name "." to forward all queries.
|
|
|
8ba890 |
# If you enable forward-first, it attempts without the forward if it fails.
|
|
|
8ba890 |
# forward-zone:
|
|
|
8ba890 |
# name: "example.com"
|
|
|
8ba890 |
# forward-addr: 192.0.2.68
|
|
|
8ba890 |
# forward-addr: 192.0.2.73@5355 # forward to port 5355.
|
|
|
8ba890 |
# forward-first: no
|
|
|
8ba890 |
# forward-tls-upstream: no
|
|
|
8ba890 |
# forward-zone:
|
|
|
8ba890 |
# name: "example.org"
|
|
|
8ba890 |
# forward-host: fwd.example.com
|
|
|
8ba890 |
#
|
|
|
8ba890 |
# You can now also dynamically create and delete forward-zone's using
|
|
|
8ba890 |
# unbound-control forward_add domain.com 1.2.3.4 5.6.7.8
|
|
|
8ba890 |
# unbound-control forward_remove domain.com 1.2.3.4 5.6.7.8
|
|
|
8ba890 |
|
|
|
8ba890 |
# Authority zones
|
|
|
8ba890 |
# The data for these zones is kept locally, from a file or downloaded.
|
|
|
8ba890 |
# The data can be served to downstream clients, or used instead of the
|
|
|
8ba890 |
# upstream (which saves a lookup to the upstream). The first example
|
|
|
8ba890 |
# has a copy of the root for local usage. The second serves example.org
|
|
|
8ba890 |
# authoritatively. zonefile: reads from file (and writes to it if you also
|
|
|
8ba890 |
# download it), master: fetches with AXFR and IXFR, or url to zonefile.
|
|
|
8ba890 |
auth-zone:
|
|
|
8ba890 |
name: "."
|
|
|
8ba890 |
for-downstream: no
|
|
|
8ba890 |
for-upstream: yes
|
|
|
8ba890 |
fallback-enabled: yes
|
|
|
8ba890 |
master: b.root-servers.net
|
|
|
8ba890 |
master: c.root-servers.net
|
|
|
8ba890 |
master: e.root-servers.net
|
|
|
8ba890 |
master: f.root-servers.net
|
|
|
8ba890 |
master: g.root-servers.net
|
|
|
8ba890 |
master: k.root-servers.net
|
|
|
8ba890 |
# auth-zone:
|
|
|
8ba890 |
# name: "example.org"
|
|
|
8ba890 |
# for-downstream: yes
|
|
|
8ba890 |
# for-upstream: yes
|
|
|
8ba890 |
# zonefile: "example.org.zone"
|
|
|
8ba890 |
|
|
|
8ba890 |
# Views
|
|
|
8ba890 |
# Create named views. Name must be unique. Map views to requests using
|
|
|
8ba890 |
# the access-control-view option. Views can contain zero or more local-zone
|
|
|
8ba890 |
# and local-data options. Options from matching views will override global
|
|
|
8ba890 |
# options. Global options will be used if no matching view is found.
|
|
|
8ba890 |
# With view-first yes, it will try to answer using the global local-zone and
|
|
|
8ba890 |
# local-data elements if there is no view specific match.
|
|
|
8ba890 |
# view:
|
|
|
8ba890 |
# name: "viewname"
|
|
|
8ba890 |
# local-zone: "example.com" redirect
|
|
|
8ba890 |
# local-data: "example.com A 192.0.2.3"
|
|
|
8ba890 |
# local-data-ptr: "192.0.2.3 www.example.com"
|
|
|
8ba890 |
# view-first: no
|
|
|
8ba890 |
# view:
|
|
|
8ba890 |
# name: "anotherview"
|
|
|
8ba890 |
# local-zone: "example.com" refuse
|
|
|
8ba890 |
|
|
|
8ba890 |
# Fedora: DNSCrypt support not enabled since it requires linking to
|
|
|
8ba890 |
# another crypto library
|
|
|
8ba890 |
#
|
|
|
8ba890 |
# DNSCrypt
|
|
|
8ba890 |
# Caveats:
|
|
|
8ba890 |
# 1. the keys/certs cannot be produced by unbound. You can use dnscrypt-wrapper
|
|
|
8ba890 |
# for this: https://github.com/cofyc/dnscrypt-wrapper/blob/master/README.md#usage
|
|
|
8ba890 |
# 2. dnscrypt channel attaches to an interface. you MUST set interfaces to
|
|
|
8ba890 |
# listen on `dnscrypt-port` with the follo0wing snippet:
|
|
|
8ba890 |
# server:
|
|
|
8ba890 |
# interface: 0.0.0.0@443
|
|
|
8ba890 |
# interface: ::0@443
|
|
|
8ba890 |
#
|
|
|
8ba890 |
# Finally, `dnscrypt` config has its own section.
|
|
|
8ba890 |
# dnscrypt:
|
|
|
8ba890 |
# dnscrypt-enable: yes
|
|
|
8ba890 |
# dnscrypt-port: 443
|
|
|
8ba890 |
# dnscrypt-provider: 2.dnscrypt-cert.example.com.
|
|
|
8ba890 |
# dnscrypt-secret-key: /path/unbound-conf/keys1/1.key
|
|
|
8ba890 |
# dnscrypt-secret-key: /path/unbound-conf/keys2/1.key
|
|
|
8ba890 |
# dnscrypt-provider-cert: /path/unbound-conf/keys1/1.cert
|
|
|
8ba890 |
# dnscrypt-provider-cert: /path/unbound-conf/keys2/1.cert
|
|
|
8ba890 |
|
|
|
8ba890 |
# CacheDB
|
|
|
8ba890 |
# Enable external backend DB as auxiliary cache. Specify the backend name
|
|
|
8ba890 |
# (default is "testframe", which has no use other than for debugging and
|
|
|
8ba890 |
# testing) and backend-specific options. The 'cachedb' module must be
|
|
|
8ba890 |
# included in module-config.
|
|
|
8ba890 |
# cachedb:
|
|
|
8ba890 |
# backend: "testframe"
|
|
|
8ba890 |
# # secret seed string to calculate hashed keys
|
|
|
8ba890 |
# secret-seed: "default"
|
|
|
8ba890 |
# # For "redis" backend:
|
|
|
8ba890 |
# # redis server's IP address or host name
|
|
|
8ba890 |
# redis-server-host: 127.0.0.1
|
|
|
8ba890 |
# # redis server's TCP port
|
|
|
8ba890 |
# redis-server-port: 6379
|
|
|
8ba890 |
# # timeout (in ms) for communication with the redis server
|
|
|
8ba890 |
# redis-timeout: 100
|