I have an OpenWRT router with automatic dhcp domains enabled. This way, for host example-host, I automatically get an A record for example-host.lan to 192.168.1.2.
I am trying to setup a wildcard cname for *.example-host.lan. For this, dnsmasq appears to require to be the authoritative dns server for the domain.
The configuration prior to my attempts is below. With it, when pinging example-host.lan it resolves as expected to 192.168.1.2.
dhcp-authoritative
domain-needed
localise-queries
read-ethers
enable-ubus
expand-hosts
bind-dynamic
local-service
domain=lan
server=/lan/
dhcp-leasefile=/tmp/dhcp.leases
resolv-file=/tmp/resolv.conf.auto
dhcp-broadcast=tag:needs-broadcast
addn-hosts=/tmp/hosts
conf-dir=/tmp/dnsmasq.d
user=dnsmasq
group=dnsmasq
dhcp-host=<mac address>,192.168.1.2,example-host,12h
dhcp-ignore-names=tag:dhcp_bogus_hostname
conf-file=/usr/share/dnsmasq/dhcpbogushostname.conf
bogus-priv
conf-file=/usr/share/dnsmasq/rfc6761.conf
dhcp-range=set:lan,192.168.1.100,192.168.1.249,255.255.255.0,12h
no-dhcp-interface=eth1.2
dhcp-range=set:guest,192.168.2.100,192.168.2.249,255.255.255.0,12h
After installing dnsmasq-full (as the default package isn't compiled with the required features), I have tried adding these lines to the beginning, with varying combinations of ip ranges, eth0 or eth1, etc. No matter what I have tried, when these lines are added, the cname is not generated, and the A record also disappears.
cname=*.example-host.lan,example-host.lan
auth-server=example-host.lan,eth1
interface-name=example-host.lan,eth1
auth-zone=example-host.lan,192.168.0.0/16,eth1
I believe this issue arises from just my lack of understanding of Dnsmasq, and it is an enormous program with a manpage that looks like it was written in an alien language to me... Do you have any idea what I might be doing wrong here? Better yet, is there a simple to understand explanation of all of this?