[Dnsmasq-discuss] DNS configuration

Gland Vador glandvador at yahoo.com
Wed Oct 6 07:22:52 BST 2010


  On 04.10.2010 19:14, Simon Kelley wrote:
> Glandvador wrote:
>
>> The only thing I had to do was to also convert all the "cname="
>> statements (in addition to address ones) to entries in /etc/hosts. Is
>> this right?
> I'm not sure exactly what you mean, please could you give a bit more detail?
>

Initially, I had:

/etc/dsnmasq.conf:

no-hosts
address = /mydomain.com/192.168.10.1
address = /mail.mydomain.com/192.168.10.1
cname = www, mydomain.com

In this case pinging mydomain.com, mail.mydomain.com and 
www.mydomain.com worked. But also test.mydomain.com.

Then, on some recommendations :) I changed to:

/etc/dnsmasq.conf:
no-hosts
addn-hosts = /etc/dnsmasq.zones
cname = www, mydomain.com

/etc/dnsmasq.zones
192.168.10.1    mydomain.com
192.168.10.1    mail.mydomain.com

Now, pinging mydomain.com and mail.mydomain.com worked. Correctly,  
test.mydomain.com don't. But also www.mydomain.com didn't respond.

Finally, I have:

/etc/dnsmasq.conf:
no-hosts
addn-hosts = /etc/dnsmasq.zones

/etc/dnsmasq.zones
192.168.10.1    mydomain.com
192.168.10.1    mail.mydomain.com
192.168.10.1    www.mydomain.com

And now, this works like intended.

I had the assumption that addn-hosts file is equivalent to the system 
/etc/hosts file. Maybe I am wrong and putting domains into /etc/hosts 
instead /etc/dnsmasq.zones will make cname work...

Best regards,
Glandvador.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20101006/bfd7534f/attachment.htm 


More information about the Dnsmasq-discuss mailing list