Jul 192015

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

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
search int.unixathome.org

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
search int.unixathome.org

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 del.icio.us Digg Google StumbleUpon Premium Responsive