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