malmond / rpms / unbound

Forked from rpms/unbound 3 years ago
Clone

Blame SOURCES/unbound.conf

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