Setup Unbound DNS cache & resolver on Debian Buster

sudo apt install unbound

sudo tee -a /etc/unbound/unbound.conf << EOF > /dev/null

server:
interface: 127.0.0.1
interface: ::1
access-control: 127.0.0.0/8 allow
access-control: ::1/128 allow

# enable remote-control (useful when utilising monitoring tools such as netdata)
remote-control:
    control-enable: yes
EOF
sudo systemctl restart unbound
sudo apt install resolvconf
sudo nano /etc/network/interfaces

change nameservers to 127.0.0.1 for IPv4 & ::1 for IPv6

sudo resolvconf -u

check:

sudo apt install dnsutils
dig pieterhollander.nl
nslookup pieterhollander.nl # Server: 127.0.0.1

Related