duplicate local-zone

Eric Luehrsen ericluehrsen at gmail.com
Sat Jun 2 04:44:27 UTC 2018

On 06/01/2018 04:05 PM, Simon Deziel via Unbound-users wrote:
> On 2018-06-01 03:48 PM, Fongaboo via Unbound-users wrote:
>> I've compiled a blacklist of adtracking sites that I'm trying to block
>> by redirecting to Some example entries:
>> local-zone: "0-act.channel.facebook.com" redirect
>> local-data: "0-act.channel.facebook.com A"
>> local-zone: "0-edge-chat.facebook.com" redirect
>> local-data: "0-edge-chat.facebook.com A"
>> I've included the file with an include: reference in unbound.conf. But
>> if I run unbound-checkconf, I get warnings about duplicate local-zones,
>> even though I have confirmed there are none in my file.
> Just putting the "local-data" line should automatically create the right
> local-zone implicitly:
> server:
>    local-data: "0-act.channel.facebook.com A"
>    local-data: "0-edge-chat.facebook.com A"
> Maybe that will fix the dup zones problem, I don't know.
> HTH,
> Simon

It could be other domains in your list not shown here. Redirect type 
works on the zone and its subdomains. If you have "local-zone: 
example.com redirect" and you also have "local-zone: adshare.example.com 
redirect", then specific zone is redundant to your more general zone 
entry. If you intend to pin-point specific servers instead of a whole 
domain range, then type static or type transparent with local-data: for 
each server may work better.

An example for a set of scripts that download from known block lists and 
write an unbound.conf insert can be found in OpenWrt "adblock." It uses 
OpenWrt UCI for configuration, but could easily be adapted.

good luck adblocking

More information about the Unbound-users mailing list