DNSMASQ Alias -> to cname records

Started by feelx, June 07, 2025, 09:01:30 PM

Previous topic - Next topic
Hello Team, I noticed that if you use DNSMasq and add static Hosts the FQDN alias will also be a host entry for the IPv4 address in the Host file.

Could that be changed into the DNSMAQ CNAME Syntax? That would also allow all IP-Addresses for the host to have the alias.

from DNSMASQ
> --cname=<cname>,[<cname>,]<target>[,<TTL>]
    Return a CNAME record which indicates that <cname> is really <target>. There is a significant limitation on the target; > it must be a DNS record which is known to dnsmasq and NOT a DNS record which comes from an upstream server. The cname must > be unique, but it is permissible to have more than one cname pointing to the same target. Indeed it's possible to declare > > multiple cnames to a target in a single line, like so: --cname=cname1,cname2,target

    If the time-to-live is given, it overrides the default, which is zero or the value of --local-ttl. The value is a positive integer and gives the time-to-live in seconds.