[Dnsmasq-discuss] CNAMEs
Ken Gillett
kengroups at icloud.com
Sun Feb 6 16:02:40 UTC 2022
Any help with the CNAME problem?
Ken G i l l e t t
_/_/_/_/_/_/_/_/
> On 4 Feb 2022, at 20:46, Ken Gillett via Dnsmasq-discuss <dnsmasq-discuss at lists.thekelleys.org.uk> wrote:
>
> 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 :-
>
> host thecname
>
> it returns:-
>
> thecname is an alias for thetarget.
> thetarget has address xx.xx.xx.xxx
>
> So looks good, but…
>
> I now realise that all is not well. If I instead:-
>
> ping thecname
>
> it returns:-
>
> ping: cannot resolve thecname: Unknown host
>
> Which is apparent nonsense as it has just resolved that exact CNAME.
> The problem appears to be that the client Mac performing the query adds the domain name, so DNSmasq needs to resolve thecname.thedomain (which is not cofigured), as if I use:-
>
> ping thecname.
>
> It works.
>
> Previously I used MacOS Server's DNS (BIND) and a CNAME is listed as:-
>
> thecname IN CNAME thetarget.thedomain.
>
> Which works perfectly. However, if I try something similar in DNSmasq, it simply fails.
>
> If instead I create the DNSmasq cname as:-
>
> cname=thecname.thedomain,thetarget
>
> That seems to work. But
>
> Apart from being the inverse of how BIND configures CNAMEs, how can I configure DNSmasq CNAMEs to work without having to add thedomain 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?
>
>
>
> Ken G i l l e t t
>
> _/_/_/_/_/_/_/_/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20220206/44a760d8/attachment.htm>
More information about the Dnsmasq-discuss
mailing list