malmond / rpms / unbound

Forked from rpms/unbound 3 years ago
Clone

Blame SOURCES/unbound.conf

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