Re: duplicate local-zone

2018-06-01 Thread Eric Luehrsen via Unbound-users

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 127.0.0.1. Some example entries:

local-zone: "0-act.channel.facebook.com" redirect
local-data: "0-act.channel.facebook.com A 127.0.0.1"
local-zone: "0-edge-chat.facebook.com" redirect
local-data: "0-edge-chat.facebook.com A 127.0.0.1"

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 127.0.0.1"
   local-data: "0-edge-chat.facebook.com A 127.0.0.1"

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.

https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md

good luck adblocking
Eric


Re: duplicate local-zone

2018-06-01 Thread Simon Deziel via Unbound-users
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 127.0.0.1. Some example entries:
> 
> local-zone: "0-act.channel.facebook.com" redirect
> local-data: "0-act.channel.facebook.com A 127.0.0.1"
> local-zone: "0-edge-chat.facebook.com" redirect
> local-data: "0-edge-chat.facebook.com A 127.0.0.1"
> 
> 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 127.0.0.1"
  local-data: "0-edge-chat.facebook.com A 127.0.0.1"

Maybe that will fix the dup zones problem, I don't know.

HTH,
Simon


duplicate local-zone

2018-06-01 Thread Fongaboo via Unbound-users



I've compiled a blacklist of adtracking sites that I'm trying to block by 
redirecting to 127.0.0.1. Some example entries:


local-zone: "0-act.channel.facebook.com" redirect
local-data: "0-act.channel.facebook.com A 127.0.0.1"
local-zone: "0-edge-chat.facebook.com" redirect
local-data: "0-edge-chat.facebook.com A 127.0.0.1"

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.


Stranger still, I get warned about a different line number every time I 
run unbound-checkconf, like so:


/usr/local/etc/unbound # unbound-checkconf 
[1527882258] unbound-checkconf[15369:0] warning: duplicate local-zone

[1527882258] unbound-checkconf[15369:0] error: could not enter zone sites 
redirect
[1527882258] unbound-checkconf[15369:0] fatal error: failed local-zone, 
local-data configuration
/usr/local/etc/unbound # unbound-checkconf
[1527882261] unbound-checkconf[15370:0] warning: duplicate local-zone
[1527882261] unbound-checkconf[15370:0] error: could not enter zone sites 
redirect
[1527882261] unbound-checkconf[15370:0] fatal error: failed local-zone, 
local-data configuration
/usr/local/etc/unbound # unbound-checkconf
[1527882263] unbound-checkconf[15371:0] warning: duplicate local-zone
[1527882263] unbound-checkconf[15371:0] error: could not enter zone sites 
redirect
[1527882263] unbound-checkconf[15371:0] fatal error: failed local-zone, 
local-data configuration


Any idea what is actually going on here?


TIA


FONG


Multiple stub-addr:|master: [Was: Re: Multiple forward-addr: _ order of evaluation?]

2018-06-01 Thread Harry Schmalzbauer via Unbound-users

Am 09.01.2018 um 10:53 schrieb Ralph Dolmans via Unbound-users:

Hi Harry,

Unbound selects forward addresses in the same way as it selects
addresses for normal delegations. That is a random selection over the
list of addresses with an RTT band of 400 msec.


Hello,

is this also true for master: (auth-zone clause) and/or stub-addr: 
(stub-zone clause)?


I mean, is there any way to define the prefered master in case of 
auth-zone clause, and define a second master as fallback in case there 
was no answer within a defined timeout?


If someone has already tried out/ knows the code I'd highly appreciate 
any hints.


Thanks,

-harry