Skip to content

Instantly share code, notes, and snippets.

@sohag1192
Forked from BigSully/DNS over TLS for unbound
Created October 11, 2023 13:03
Show Gist options
  • Save sohag1192/9ec94e4ecb405a0776ab662ba25efca4 to your computer and use it in GitHub Desktop.
Save sohag1192/9ec94e4ecb405a0776ab662ba25efca4 to your computer and use it in GitHub Desktop.
DNS over TLS configuration for unbound, including Google DNS, Cloudflare DNS and Quad9 DNS
server:
logfile: ""
# verbosity: 2
username: "nobody"
interface: 0.0.0.0
access-control: 0.0.0.0/0 allow
prefetch: yes
# include: "/opt/unbound/local.conf"
# include: "/opt/unbound/customize.conf"
# proxy
local-data: "media.com A 192.168.1.151"
local-data: "proxy.com CNAME media.com"
tls-cert-bundle: "/etc/ssl/cert.pem"
# ---------------------------------------------------------------------------------------------
# DNS over TLS
# ---------------------------------------------------------------------------------------------
forward-zone:
name: .
forward-tls-upstream: yes
## Google
forward-addr: 8.8.8.8@853#dns.google
forward-addr: 8.8.4.4@853#dns.google
forward-addr: 2001:4860:4860::8888@853#dns.google
forward-addr: 2001:4860:4860::8844@853#dns.google
## Cloudflare
forward-addr: 1.1.1.1@853#cloudflare-dns.com
forward-addr: 1.0.0.1@853#cloudflare-dns.com
forward-addr: 2606:4700:4700::1111@853#cloudflare-dns.com
forward-addr: 2606:4700:4700::1001@853#cloudflare-dns.com
## Quad9 ( Slowest, only serve as backup when the faster are temporarily down. )
forward-addr: 9.9.9.9@853#dns.quad9.net
forward-addr: 9.9.9.10@853#dns.quad9.net
forward-addr: 2620:fe::fe@853#dns.quad9.net
forward-addr: 2620:fe::10@853#dns.quad9.net
# ---------------------------------------------------------------------------------------------
# DNS fast
# ---------------------------------------------------------------------------------------------
# forward-zone:
# name: .
# forward-tls-upstream: yes
# forward-addr: 1.1.1.1
# forward-addr: 1.0.0.1
# forward-addr: 8.8.8.8
# forward-addr: 8.8.4.4
@sohag1192
Copy link
Author

dg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment