[Dnsmasq-discuss] DNS configuration

Simon Kelley simon at thekelleys.org.uk
Wed Oct 6 21:13:42 BST 2010


Gland Vador wrote:
>  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. 

It is.


Maybe I am wrong and putting domains into /etc/hosts
> instead /etc/dnsmasq.zones will make cname work...

cname=www.mydomain.com, mydomain.com

will work OK.


Cheers,

Simon.


> 
> Best regards,
> Glandvador.
> 
> 




More information about the Dnsmasq-discuss mailing list