Skip to content

Instantly share code, notes, and snippets.

@lattera
Created April 7, 2021 15:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lattera/dbcf609954047a3b762b09694d14d499 to your computer and use it in GitHub Desktop.
Save lattera/dbcf609954047a3b762b09694d14d499 to your computer and use it in GitHub Desktop.
server:
logfile: "unbound.log"
verbosity: 1
interface: 0.0.0.0
interface: ::0
logfile: "unbound.log"
log-queries: yes
access-control: 192.168.99.0/24 allow
access-control: 2001:470:e1e1::/48 allow
###########################
#### Generic hardening ####
###########################
harden-algo-downgrade: yes
harden-glue: yes
harden-referral-path: yes
harden-short-bufsize: yes
hide-identity: yes
use-caps-for-id: yes
ignore-cd-flag: yes
###################################
#### Validator-based hardening ####
###################################
val-clean-additional: yes
val-permissive-mode: no
#################################################################
#### Prevent DNS rebinding attacks by stripping private IPs #####
#################################################################
private-address: 10.0.0.0/8
private-address: 172.16.0.0/12
private-address: 192.168.0.0/16
private-address: 169.254.0.0/16
private-address: fd00::/8
private-address: fe80::/10
private-address: ::ffff:0:0/96
unwanted-reply-threshold: 10000000
module-config: "validator iterator"
auto-trust-anchor-file: "/usr/local/etc/unbound/root.key"
include: /var/unbound/local-void.zones
# Disable DoH/DoT
local-zone: "use-application-dns.net." static
include: /usr/local/etc/unbound/zones/md.hardenedbsd.net
include: /usr/local/etc/unbound/zones/hawksense.dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment