<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I have several CNAMEs set up in DNSmasq on my Mac server that I thought were working. If I use the 'host' command to check a CNAME e.g :-<br class=""><br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>host <i class="">thecname</i><br class=""><br class="">it returns:-<br class=""><br class=""><span class="Apple-tab-span" style="white-space:pre"> </span><i class="">thecname</i> is an alias for <i class="">thetarget</i>.<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>thetarget has address xx.xx.xx.xxx <br class=""><br class="">So looks good, but…<br class=""><br class="">I now realise that all is not well. If I instead:-<br class=""><br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>ping <i class="">thecname</i><br class=""><br class="">it returns:-<br class=""><br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>ping: cannot resolve <i class="">thecname</i>: Unknown host<br class=""><br class=""><div class="">Which is apparent nonsense as it has just resolved that exact CNAME.</div><div class="">The problem appears to be that the client Mac performing the query adds the domain name, so DNSmasq needs to resolve <i class="">thecname.thedomain</i><span style="font-style: normal;" class=""> (whcih is not cofigured) as if I use:-</span></div><div class=""><i class=""><br class=""></i></div><div class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>ping <i class="">thecname.</i><br class=""></div><div class=""><br class="webkit-block-placeholder"></div><div class="">It works.</div><div class=""><br class="webkit-block-placeholder"></div><div class="">Previously I used MacOS Server's DNS (BIND) and a CNAME is listed as:-</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span><i class="">thecname</i> IN CNAME <i class="">thetarget</i>.<i class="">thedomain</i>.</div><div class=""><br class=""></div><div class="">Which works perfectly. However, if I try something similar in DNSmasq, it simply fails.</div><div class=""><br class=""></div><div class="">If instead I create the DNSmasq cname as:-</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>cname=<i class="">thecname</i>.<i class="">thedomain</i>,<i class="">thetarget</i></div><div class=""><br class=""></div><div class=""> That seems to work. But</div><div class=""><br class=""></div><div class="">Apart from being the inverse of how BIND configures CNAMEs, how can I configure DNSmasq CNAMEs to work without having to add <i class="">thedomain</i> to every cname in every CNAME record in DNSmasq? I don't like to hard code things like that as it could change. Is there any way to make DNSmasq deal with this appropriately?</div><div class=""><br class=""></div><div class=""><br class="webkit-block-placeholder"></div><div class=""><br class="">Ken G i l l e t t<br class=""><br class="">_/_/_/_/_/_/_/_/<br class=""><br class=""><br class=""></div><br class=""></body></html>