Using encrypted DNS does slow load times but Unbound also caches requests and prefetches; you can use dig to confirm this. You're trading speed for privacy.
More info on DNS privacy https://dnsprivacy.org/wiki/display/DP/ ... he+Problem
If you have manually disabled ipv6 through sysctl make sure 'net.ipv6.conf.lo.disable_ipv6 = 0'
you can issue this command to be sure
Code: Select all
cat /proc/sys/net/ipv6/conf/lo/disable_ipv6
First install the required packages
Code: Select all
sudo apt install unbound openresolv
Code: Select all
sudo systemctl enable unbound.service unbound-resolvconf.service
Code: Select all
sudo systemctl disable systemd-resolved.service
Code: Select all
printf "[main]\ndns=none" | sudo tee /etc/NetworkManager/conf.d/dns.conf
Code: Select all
sudo sed -i 's/^#name_servers=127.0.0.1/name_servers="127.0.0.1 ::1"/' /etc/resolvconf.conf
Code: Select all
sudo nano /etc/unbound/unbound.conf.d/dns-over-tls.conf
Code: Select all
server:
qname-minimisation: yes
harden-below-nxdomain: yes
harden-referral-path: yes
harden-algo-downgrade: no # false positives with improperly configured zones
use-caps-for-id: no # makes lots of queries fail
hide-identity: yes
hide-version: yes
server:
prefetch: yes
prefetch-key: yes
msg-cache-size: 128k
msg-cache-slabs: 2
rrset-cache-size: 8m
rrset-cache-slabs: 2
key-cache-size: 32m
key-cache-slabs: 2
cache-min-ttl: 3600
num-threads: 2
server:
interface: 127.0.0.1
access-control: 0.0.0.0/0 refuse
access-control: 127.0.0.1/32 allow
forward-zone:
name: "."
# Cloudflare DNS
forward-ssl-upstream: yes
forward-addr: 1.1.1.1@853
forward-addr: 1.0.0.1@853
forward-addr: 2606:4700:4700::1111@853
forward-addr: 2606:4700:4700::1001@853
The three big companies that use encrypted DNS are cloudflare, quad9, and Google. I chose cloudflare because it has been the most reliable, doesn't record ip adresses, and dumps logs ever 24hours. I've had reliability issues using quad9. I have not used Google because... well it's Google.
Thanks,
Molly
###############################################################
Don't like the new setup? This is how to go back to using systemd-resolved.
First disable unbound
Code: Select all
sudo systemctl disable unbound.service unbound-resolvconf.service
Code: Select all
sudo systemctl enable systemd-resolved.service
Code: Select all
sudo rm /etc/NetworkManager/conf.d/dns.conf
Also if you'd like you can remove/purge unbound
Code: Select all
sudo apt remove --purge unbound openresolv