Skip to main content

DNS: Recursive DNS

Install Unbound

Because DNS is so important in terms of functionality and security it is recommended to use a recursive DNS resolver. This allows DNS resolution without the dependency on external name servers which can help improve speed and security.

$ apt install unbound

Recursive DNS can sometimes sacrifice speed for security so the unbound server is going to be locked down to only serve DNS requests via IPv4 and IPv6 loopback addresses. Everyone else will have to go through a cache to perform DNS queries.

# /etc/unbound/unbound.conf.d/local.conf
+ server:
+ 	interface: 127.0.0.1
+ 	interface: ::1
+ 	access-control: 127.0.0.1 allow
+ 	access-control: ::1 allow

$ systemctl restart unbound