Unbound is a validating, recursive, and caching DNS resolver.
Install unbound, and expat which is dependency for DNSSEC:
pacman -S unbound expat
Unbound is easy to configure. Following configuration placed in /etc/unbound/unbound.conf is enough to run on both IPv4 and IPv6 without access restrictions:
server: username: "unbound" directory: "/etc/unbound" use-syslog: yes interface: 0.0.0.0 interface: ::0 verbosity: 1
To use specific servers for default forward zone (all queries will be forwarded to them, and then cached) add this to the configuration file:
forward-zone: name: "." forward-addr: 18.104.22.168 forward-addr: 22.214.171.124
This will make unbound use OpenDNS servers as forward zone.
Adding named to boot process
/etc/rc.conf (See also rc.conf):
DAEMONS=(.. unbound ..)
Place unbound before daemons that require network access.
Set /etc/resolv.conf to use the local DNS server
/etc/resolv.conf (See also resolv.conf):