[Dnsmasq-discuss] /etc/hosts question
Simon Kelley
simon at thekelleys.org.uk
Tue Jan 23 19:43:09 GMT 2007
James Cook wrote:
> Hi!
>
> In a quest to consolidate config files on my router box, I'm trying to
> stuff all the knowledge contained in /etc/ethers and /etc/hosts into
> my dnsmasq.conf file. The ethers file is cake but there doesn't seem
> to be any way to add hosts-style alias entries in dnsmasq.conf. I did
> some searching and there was a query about offsite aliasing a while
> ago but nothing about hosts inside a DNSMasq served network. Would it
> be possible to get such a feature added? I generally use CNAMES to
> make for short URLs on the inside network (http://wiki/ or
> http://amd64/ - for PXE reloads and such).
>
The ommission of CNAMEs from dnsmasq's repertoire is deliberate, because
there are many circumstances where they don't work. If the CNAME comes
from dnsmasq but the target of the CNAME is from an upstream server then
there's no way, given the architecture of dnsmasq to get both answers
into the same DNS response packet, which is required to make it work.
In the specific case you are talking about CNAMES would be OK, because
both bits if the CNAME come from dnsmasq but some sort of syntax which
limited the CNAME to that would be needed. That's currently provided
only by the hosts and ethers files.
Cheers,
Simon.
More information about the Dnsmasq-discuss
mailing list