Arthur Chance freebsd at qeng-ho.org
Tue Dec 1 17:20:26 UTC 2020

On 01/12/2020 16:35, RW via freebsd-questions wrote:
> On Tue, 1 Dec 2020 12:42:07 +0000
> Arthur Chance wrote:
>>> I'd be interested to know whether it does work because someone once
>>> mentioned that local_unbound only supports forwarding, but I've
>>> never found anything to back that up.  
>> From memory, if you've not set anything up the first time
>> local_unbound runs it reads your /etc/resolv.conf to gather your
>> resolvers and creates an unbound.conf that uses them for forwarding
>> for all domains. 
> It set itself-up with google and opendns caches when I tried it.

That would have been taken from your resolv.conf

>> If you've set things up yourself it just runs with
>> that, but take a look at /etc/rc.d/local_unbound to find out which
>> file(s) it needs to see in order to avoid the default configuration
>> process.
> It's all gets tied-in to dnsconf and the various configuration files
> come with warnings that they are autogenerated and could be
> overwritten. I have no need for dnsconf, so I just installed the
> package version which works recursively by default.
> The question was more about whether the binary supports recursion.
> As I said, someone on the list (from the project) said that it doesn't.
> He may just have meant that they made it awkward to turn-off
> forwarding, but there's clearly something built-out of the local
> version:

It's always better to take a look at the source yourself. If you look at
the shell script


which is what does the autoconfig if you don't have a predefined
unbound.conf, you'll see it can create either a pure forwarding config
or a recursive one if you give it "none" as the forwarders list.

The major differences between local-unbound and the unbound package are
a) the package is updated between releases and b) the package uses a
full kqueue based libevent rather than a select based internal libevent
that isn't as efficient under heavy load. Both are equally capable of
recursive resolution.

The number of people predicting the demise of Moore's Law doubles
every 18 months.

More information about the freebsd-questions mailing list