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