<div dir="ltr"><div><div><div>Hi to everybody, I use dnsmasq on my small home router (and find it great btw), and I am attempting to use it also as an authoritative DNS for a <a href="http://freedns.afraid.org">freedns.afraid.org</a> subdomain I host on my home server. I'd like to configure the dns in a way that the domain resolves to address x.x.x.x when queried over the external interface and to 192.168.1.y when queried over the internal one, this because if I access the home server from inside the lan using the external address x.x.x.x all traffic goes through the nat layer of the small router and will slow down a lot. The home server is running owncloud over a Gbit network so  especially when up/downloading large files it is important to access it using the internal address 192.168.1.y.<br></div>Currently I have an auth-only dns listening only to the external interface that resolves the domain owncloud.local.lan to x.x.x.x, dnsmasq is listening on the bridge and the directive<br>address=/owncloud.local.lan/192.168.1.y<br></div>effectively creates the split-horizon since when internal hosts query the dns for owncloud.local.lan get 192.168.1.y as answer and are able to access the home server at full switch speed while hosts qerying over the external interface get x.x.x.x and I am able to access the home server from outside.<br></div>I had expected the same setup to work using the authoritative dns capabilities of dnsmasq but it doesn't, if I put<br><pre>auth-server=owncloud.local.lan,wan
host-record=owncloud.local.lan,x.x.x.x
auth-zone=owncloud.local.lanm,x.x.x.x/32<b><br></b>address=/owncloud.local.lan/192.168.1.y<br></pre><pre>also hosts inside the lan are answered x.x.x.x when querying for owncloud.local.lan, it is like <br>the address directive is overriden by the auth-zone one. IMHO this is wrong and address=// should <br>take precedence over auth-zone if the query comes from an interface not listed in the auth-server <br>directive.<br><br></pre><pre>Maybe I just doing it wrong and there is  a better way of doing it ..... in that case please tell me.<br></pre></div>