[Dnsmasq-discuss] Local domains and local hosts

Simon Kelley simon at thekelleys.org.uk
Fri Sep 21 14:10:16 BST 2007


Lars Noodén wrote:
> I'm trying out the 'local=' parameter in DNSmasq, but hosts queried
> under the local domain return an error.  For example:
> 
> 	$ host apt-cacher.mysubdomain.mydomain.fi
> 	apt-cacher.mysubdomain.mydomain.fi has address 192.168.123.45
> 	Host apt-cacher.mysubdomain.mydomain.fi not found: 3(NXDOMAIN)
> 
> The machine exists and can be contacted via the net and DNSmasq *does*
> return the correct IPv4 address associated with the host name, but it
> also returns an error.  So, although the response works fine for manual
> queries, scripts are going to treat it as a failure.
> 
> 	$ host apt-cacher.mysubdomain.mydomain.fi || echo flopped
> 	apt-cacher.mysubdomain.mydomain.fi has address 192.168.123.45
> 	Host apt-cacher.mysubdomain.mydomain.fi not found: 3(NXDOMAIN)
> 	flopped
> 
> I have set the 'local' and 'address' lines in apt.conf to include the
> following:
> 
> 	local=/mysubdomain.mydomain.fi/
> 
> 	address=/apt-cacher.mysubdomain.mydomain.fi/192.168.123.45
> 
> What should I adjust to eliminate the error response?
> 
>

Just to be clear, the problem is that

local=/mysubdomain.mydomain.fi/
address=/apt-cacher.mysubdomain.mydomain.fi/192.168.123.45

in /etc/dnsmasq.conf

returns both the correct address and an error, for
apt-cacher.mysubdomain.mydomain.fi.

Please could you repeat the test, using "dig" instead of "host", dig
gives clearer information about exactly what is being returned.


I've tried the above with dnsmasq 2.40, and it seems to work correctly
(no error). I don't recall specifically fixing this, but it might have
been fixed as a side-effect of other work. What version of dnsmasq are
you using?

Cheers,

Simon.





More information about the Dnsmasq-discuss mailing list