Configuring unbound on FreeBSD 10.x

NOTE: I found out these settings do not persist after a reboot. Annoying. I’ll get back to that soon for a fix.

EDIT 2021-05-05: On more recent FreeBSD, say 12.2, to disable resolvconf.conf, do this, as provided by

[dvl@r720-02:~] $ cat /etc/resolvconf.conf 
[dvl@r720-02:~] $ 

The above is documented in man 8 resolvconf.conf (search for disable).

I now return you to the original article.

Today I was setting up my new server, varm, and I noticed that my local DNS was not being used for resolving. Without that, I won’t be able to resolve any of the hosts in my home lab.

I looked at /etc/resolv.conf, the usual place for this information, but I found this message at the top of the file:

# cat /etc/resolv.conf
# Generated by resolvconf

options edns0

After some work and question asking, I discovered you can achieve my goal in two ways:

  1. local-unbound-setup
  2. Add nameserver entries to /etc/resolv.conf and run local-unbound-setup

Each of those options led to the following entries in /var/unbound/forward.conf:

# This file was generated by local-unbound-setup.
# Modifications will be overwritten.
	name: .

Of note, if I use option 2 above, here is what is in /etc/resolv.conf after running local-unbound-setup:

# Generated by resolvconf

options edns0

# nameserver
# nameserver

With that, local host names started to resolve. Thank you EvilPete.


Here’s the output from option 1:

# local-unbound-setup
/var/unbound/forward.conf created
/var/unbound/lan-zones.conf not modified
/var/unbound/control.conf not modified
original /var/unbound/unbound.conf saved as /var/unbound/unbound.conf.20150720.035316
Stopping local_unbound.
Waiting for PIDS: 567.
Starting local_unbound.
/etc/resolvconf.conf not modified
/etc/resolv.conf not modified
Website Pin Facebook Twitter Myspace Friendfeed Technorati Digg Google StumbleUpon Premium Responsive

Leave a Comment

Scroll to Top