How to run dnsmasq with a public domain?
I tried some different solutions, but none of them is really satisfying.
Current config that works somewhat...
.... list server '/public.com/ipofnameserver' list server '/public.com/ipofnameserver' .... option domain 'public.com' option local '/public.lan/'
option local to
'/public.com/' breaks external name resolution of public.com
e.g. ping to public.com and all subdomains that are not handled by dnsmasq will fail.
Overwriting with list server '/public.com/ipofnameserver' doesn't seem to work.
They I use the cname option to remap external subdomains to local subdomains.
config cname option cname 'ftp.public.com' option target 'nas.public.com'
The domain options doesn't seem to be a good choice here because it overwrites the primary domain name of the system.
e.g. When doing a reverse lookup, 192.168.0.1 will return ftp.public.com instead of nas.public.com.
And it seems like that this all breaks dns to ipv6 mapping.
Or the odhcpd-update is bugged?
root@openwrt:/usr/sbin# ./odhcpd-update BusyBox v1.31.1 () multi-call binary. Usage: basename FILE [SUFFIX] Strip directory path and .SUFFIX from FILE
root@openwrt:/usr/sbin# cat odhcpd-update #!/bin/sh # Make dnsmasq reread hostfile by sending SIGHUP signal . $IPKG_INSTROOT/lib/functions/procd.sh procd_send_signal dnsmasq
Shouldn't this be:
root@openwrt:/usr/sbin# cat odhcpd-update #!/bin/sh # Make dnsmasq reread hostfile by sending SIGHUP signal . /lib/functions/procd.sh procd_send_signal dnsmasq
nvm dnsmasq reloads fine.
seems like ipv6 name resolution doesn't work because /tmp/hosts/odhcpd isn't added to the jail.
But I have to debug this a bit more...