<div dir="ltr">Sorry for the late answer but I was on holiday. I tested the patch from git and it works as expected. Thank you a lot.</div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Aug 9, 2015 at 6:46 PM, Simon Kelley <span dir="ltr"><<a href="mailto:simon@thekelleys.org.uk" target="_blank">simon@thekelleys.org.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 06/06/15 09:59, Ermanno Scaglione wrote:<br>
</span><span class="">> auth-server=owncloud.local.lan,wan<br>
> host-record=owncloud.local.lan,x.x.x.x<br>
> auth-zone=owncloud.local.lanm,x.x.x.x/32<br>
> address=/owncloud.local.lan/192.168.1.y<br>
><br>
> also hosts inside the lan are answered x.x.x.x when querying for<br>
> owncloud.local.lan, it is like<br>
> the address directive is overriden by the auth-zone one. IMHO this is<br>
> wrong and address=// should<br>
> take precedence over auth-zone if the query comes from an interface<br>
> not listed in the auth-server<br>
> directive.<br>
<br>
</span>OK, I poked around with this a bit more, and the problem is that<br>
<br>
host-record=owncloud.local.lan,x.x.x.x<br>
<br>
overrides<br>
<br>
address=/owncloud.local.lan/192.168.1.y<br>
<br>
This is always true, no auth-zone is required to make it happen and it's<br>
quite sensible, since the --address config is actually a wildcard for<br>
the whole zone.<br>
<br>
host-record=<a href="http://myserver.thekelleys.org.uk" rel="noreferrer" target="_blank">myserver.thekelleys.org.uk</a>,<real IP><br>
address=/<a href="http://thekelleys.org.uk/," rel="noreferrer" target="_blank">thekelleys.org.uk/,</a><wildcard IP><br>
<br>
is a sane and sensible thing to do.<br>
<br>
auth-server=owncloud.local.lan,wan<br>
host-record=owncloud.local.lan,x.x.x.x<br>
host-record=owncloud.local.lan,192.168.1.y<br>
auth-zone=owncloud.local.lan,x.x.x.x/32<br>
<br>
Gives the correct answer to the auth query, since the 192.168.1.y record<br>
is filtered out. It gives the wrong answer to the non-auth query, since<br>
both A records are returned.<br>
<br>
However, if then add<br>
<br>
localise-queries<br>
<br>
to the config, that will filter the x.x.x.x A record in the non-auth<br>
query, as long as 192.168.1.x is on the same subnet as the address to<br>
which the query was sent. This actually needs a little patch to work,<br>
which I've just pushed to the git repo.<br>
<br>
Is that a reasonable solution?<br>
<br>
Cheers,<br>
<br>
Simon.<br>
<br>
<br>
<br>
</blockquote></div><br></div>