Install Unbound on FreeBSD 10

Below are instructions on how to install Unbound on FreeBSD

Firstly install Unbound from the ports tree:


# cd /usr/ports
# make search name=unbound

Port:   unbound-1.5.7
Path:   /usr/ports/dns/unbound
Info:   Validating, recursive, and caching DNS resolver
Maint:  [email protected]
B-deps: autoconf-2.69 autoconf-wrapper-20131203 automake-1.15_1 automake-wrapper-20131203 expat-2.1.0_3 indexinfo-0.2.4 ldns-1.6.17_5 libtool-2.4.6 m4-1.4.17_1,1 perl5-5.20.3_8
R-deps: expat-2.1.0_3 ldns-1.6.17_5

# cd dns/unbound
# make clean install


Edit the the unbound configuration file:

# vi /usr/local/etc/unbound/unbound.conf

            directory: "/usr/local/etc/unbound"
            username: unbound
             chroot: "/usr/local/etc/unbound"
            logfile: "/usr/local/etc/unbound/unbound.log"  #uncomment to use logfile.
            pidfile: "/usr/local/etc/unbound/"
            interface: ::0
            access-control: allow
            access-control: allow
            verbosity: 1


Enter the  following into rc.conf

# vi /etc/rc.conf
# unbound_enable="YES"


Start Unbound:

# service unbound restart