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