# /usr/local/etc/unbound/unbound.conf is not inside chroot



## getopt (Sep 19, 2014)

```
# freebsd-version
10.0-RELEASE-p9

# pkg info unbound
unbound-1.4.22_4
Name           : unbound
Version        : 1.4.22_4
Installed on   : Thu Sep 18 23:08:30 CEST 2014
Origin         : dns/unbound
Architecture   : freebsd:10:x86:64
Prefix         : /usr/local
Categories     : dns
Licenses       : BSD4CLAUSE
Maintainer     : sem@FreeBSD.org
WWW            : http://unbound.net
Comment        : Validating, recursive, and caching DNS resolver
Options        :
        DOCS           : on
        ECDSA          : on
        GOST           : off
        LIBEVENT       : off
        MUNIN          : off
        PYTHON         : off
        THREADS        : on
Shared Libs required:
        libssl.so.8
        libexpat.so.6
        libcrypto.so.8
Shared Libs provided:
        libunbound.so.2
Annotations    :
        repo_type      : binary
        repository     : local
Flat size      : 4.89MiB
```


```
# unbound -h
Version 1.4.22
linked libs: mini-event internal (it uses select), OpenSSL 1.0.1i 6 Aug 2014
linked modules: validator iterator
configured for amd64-portbld-freebsd10.0 on Thu Sep 18 19:10:43 UTC 2014 with options: '--with-ssl=/usr/local' '--with-libexpat=/usr
/local' '--disable-gost' '--with-libevent=no' '--prefix=/usr/local' '--mandir=/usr/local/man' '--infodir=/usr/local/info/' '--build=
amd64-portbld-freebsd10.0'
BSD licensed, see LICENSE in source package for details.
Report bugs to unbound-bugs@nlnetlabs.nl
```


```
# grep unbound /var/log/console.log
Sep 19 14:09:54 mybox kernel: [1411128593] unbound-checkconf[711] fatal error: config file /usr/local/etc/unbound/unbound.conf is not inside chroot /var/unbound
Sep 19 14:09:54 mybox kernel: Starting unbound.
```

What’s wrong that unbound throws a fatal error and is functional despite of that?


----------



## junovitch@ (Sep 19, 2014)

/var/unbound is usually used by the base Unbound.  You probably want to use the following in your config:


```
directory: /usr/local/etc/unbound
        chroot: /usr/local/etc/unbound
```

This will keep the base and port Unbound from every conflicting.  Don't forget to also use the /usr/local/sbin/unbound* commands by full path so you don't run the included Unbound.


----------

