Skip to content

Instantly share code, notes, and snippets.

@opentaq
Last active March 29, 2023 20:33
Show Gist options
  • Save opentaq/9cd7544b2b5cc8f6e5289447e3211547 to your computer and use it in GitHub Desktop.
Save opentaq/9cd7544b2b5cc8f6e5289447e3211547 to your computer and use it in GitHub Desktop.
Unbound configuration
server:
interface: 127.0.0.1
port: 5335
# IPv4 / IPv6-settings
do-ip6: no
do-ip4: yes
do-udp: yes
# Set number of threads to use
num-threads: 4
# Hide DNS Server info
hide-identity: yes
hide-version: yes
# Limit DNS Fraud and use DNSSEC
harden-glue: yes
harden-dnssec-stripped: yes
harden-referral-path: yes
use-caps-for-id: yes
harden-algo-downgrade: yes
qname-minimisation: yes
# Add an unwanted reply threshold to clean the cache and avoid when possible a DNS Poisoning
unwanted-reply-threshold: 10000000
# Minimum lifetime of cache entries in seconds
cache-min-ttl: 300
# Maximum lifetime of cached entries
cache-max-ttl: 14400
# Prefetch
prefetch: yes
prefetch-key: yes
# Optimisations
msg-cache-slabs: 8
rrset-cache-slabs: 8
infra-cache-slabs: 8
key-cache-slabs: 8
# Increase memory size of the cache
rrset-cache-size: 256m
msg-cache-size: 128m
# Increase buffer size so that no messages are lost in traffic spikes
so-rcvbuf: 1m
# Private addresses
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: fe80::/10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment