forked from DigitaleGesellschaft/DNS-Resolver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
unbound.conf
76 lines (58 loc) · 1.65 KB
/
unbound.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# Unbound DNS resolver configuration of the Digital Society Switzerland
# This configuration is in production use.
#
# These optimisations reference was considered:
# https://nlnetlabs.nl/documentation/unbound/howto-optimise/
server:
# We use two cored machines
# cat /proc/cpuinfo
num-threads: 2
# Improve UDP performance to other NS
so-reuseport: yes
# Reduce lock contention
msg-cache-slabs: 2
rrset-cache-slabs: 2
infra-cache-slabs: 2
key-cache-slabs: 2
# Increase cache size
# rrset-cache-size should be the double of msg-cache-size
# total of both should be around half of total physical memory
rrset-cache-size: 1300m
msg-cache-size: 650m
# Set number of ports to open to 462 per core (totally 1024 available)
outgoing-range: 8192
# outpoing-range / amount of cors
num-queries-per-thread: 4096
# Reduce chance of packet drops on traffic spikes
so-rcvbuf: 4m
so-sndbuf: 4m
directory: "/etc/unbound"
pidfile: "/etc/unbound/unbound.pid"
username: unbound
interface: 127.0.0.1
interface: ::0
access-control: 0.0.0.0/0 allow
access-control: ::/64 allow
do-ip4: yes
do-ip6: yes
do-udp: yes
do-tcp: yes
# Unbound runs as systemd service
do-daemonize: no
# Foil spoof attempts
use-caps-for-id: yes
# Prefetch cached data to increase performance and privacy
prefetch: yes
prefetch-key: yes
qname-minimisation: yes
rrset-roundrobin: yes
auto-trust-anchor-file: "/var/lib/unbound/root.key"
hide-identity: yes
hide-version: yes
minimal-responses: yes
use-syslog: yes
statistics-interval: 0
extended-statistics: yes
statistics-cumulative: no
verbosity: 0
incoming-num-tcp: 400