server:
# If no logfile is specified, syslog is used
logfile: "/var/lib/unbound/logs/unbound.log"
verbosity: 1
module-config: "subnetcache validator iterator"
#ECS Support
client-subnet-zone: "."
client-subnet-always-forward: yes
send-client-subnet: 0.0.0.0/0
send-client-subnet: ::0/64
edns-tcp-keepalive: yes
port: 5353
do-ip4: yes
do-udp: yes
do-tcp: yes
# May be set to yes if you have IPv6 connectivity
do-ip6: yes
# Use this only when you downloaded the list of primary root servers!
root-hints: "/var/lib/unbound/root.hints"
# Trust glue only if it is within the servers authority
harden-glue: yes
# Require DNSSEC data for trust-anchored zones, if such data is absent, the zone becomes BOGUS
harden-dnssec-stripped: yes
# Don't use Capitalization randomization as it known to cause DNSSEC issues sometimes
# see https://discourse.pi-hole.net/t/unbound-stubby-or-dnscrypt-proxy/9378 for further details
use-caps-for-id: no
# Reduce EDNS reassembly buffer size.
# Suggested by the unbound man page to reduce fragmentation reassembly problems
edns-buffer-size: 1232
# TTL bounds for cache
cache-min-ttl: 0
cache-max-ttl: 172800
# Perform prefetching of close to expired message cache entries
# This only applies to domains that have been frequently queried
prefetch: yes
prefetch-key: yes
# One thread should be sufficient, can be increased on beefy machines. In reality for most users running on small networks or on a single machine it should be unnecessary to seek performance enhancement by increasing num-threads above 1.
num-threads: 1
# Ensure kernel buffer is large enough to not lose messages in traffic spikes
so-rcvbuf: 1m
so-sndbuf: 1m
###PERF STUFF
# Faster UDP with multithreading (only on Linux).
so-reuseport: yes
# more cache memory, rrset=msg*2
msg-cache-size: 100m
rrset-cache-size: 200m
# serve expired entries (but refresh instantly after serving)
serve-expired: yes
# more outgoing connections
# depends on number of cores: 1024/cores - 50
outgoing-range: 450
num-queries-per-thread: 225
# Ensure privacy of local IP ranges
private-address: 192.168.0.0/16
private-address: 169.254.0.0/16
private-address: 172.16.0.0/12
private-address: 10.0.0.0/8
private-address: fd00::/8
private-address: fd11::/8
private-address: fe80::/10
private-address: 2406:da00:ff00::/48
private-address: 2607:fb10::/32
private-address: 2620:0:ef0::/48
private-address: 2a00:86c0::/32
private-address: 2620:108:700f::/48
private-domain: "lan.dmopp.de"
private-domain: "xxx.dmopp.de"
private-domain: "zzz.dmopp.de"
forward-zone:
name: "lan.dmopp.de."
forward-addr: 192.168.1.1