custom domain names set with dnsmasq won't resolve
I've seen this issue before and supposedly, it was fixed but this my issue:
ASUS Router running merlin in dhcp all my physical devices have a hostname set for example a Raspberry Pi. Also in that pi raspi-config hostname is set to the same
However I also have some custom domains set up in /jffs/configs/dnsmasq.conf.add all these point to my NAS where nginx-proxy-manager is running on port 80/443. This means for all my docker containers I can hit dockercontain.mydomain.net they will be picked up the reverse proxy and then reverse proxied to the nas ip address and port that container is listening on
Have confirmed in my router in /etc/dnsmasq.conf all these custom domains are appended
In the Alpine docker container I can do a ping to my pi at its hostname.mydomain.net
if I do an nslookup on the pi:
Server: xxx.xxx.x.x
Address: xxx.xxx.x.x:53
Name: subdomain.mydomain.net
Address: xxx.xxx.x.xxx
Non-authoritative answer:
However, if I do an nslookup on one my custom domains I get:
Server: xxx.xxx.x.x
Address: xxx.xxx.x.x:53
Name: subdomain.mydomain.net
Address: xxx.xxx.x.xxx
** server can't find subdomain.mydomain.net: NXDOMAIN
So the ip address is actually resolved however if I try to ping this custom domain, I get:
ping: bad address 'subdomain.mydomain.net'
Same if I try to do a curl or ssh cant resolve host
I am running other docker containers on the NAS that use Debian and they work fine to ping these custom domain names however I noted in these debian containers in /etc/resolv.conf they have the following:
whereas in the alpine container, it's set as:
nameserver 127.0.0.11
options ndots:0
nameserver xxx.xxx.x.x
nameserver xxx.xxx.x.x
domain mydomain.net
I tried setting the Alpine container to the same and the nslookup and ping times out. I even tried another suggestion changing ndots to 5 or 1 and didn't help
It's worth noting in my pi's its setup as:
search mydomain.net
nameserver xxx.xxx.x.x
on my nas it's:
nameserver xxx.xxx.x.xxx
options ndots:0
and they work fine to ping the custom domains. These settings don't work though for Alpine
not sure what else I need to try but it's frustrating because I run a lot of docker containers for example radarr and sonarr which use alpine and also overseerr which uses alpine but the overseerr cant connect to my radarr and overseerr by their custom domain. I have to use ip address
Alpine versions on my containers are 3.18.6 and 3.19.1 both have the same issue