I’ve been running MIAB for a while, and most things are rocking right along. However, I recently realized a new hostname was not resolving even though all other hostnames on all domains seem to be great. Even locally, a dig on this hostname gives a NXDOMAIN while queries to other hostnames resolve normally. I’ve rebooted, ensured all updates are in place, and re-ran the setup. I moved the service I’m trying to stand up to a different domain on the same box, which resolves fine, so I tried doing another new host on the same domain I had an issue with this new one also getting back an NXDOMAIN. So, as far as I can tell, I have one domain that will not take new DNS entries. Within the past 30 days, I have restored my entire MIAB to a new host on a new cloud provider, but again, everything else is working. I am on the latest MIAB code and running on an Ubuntu 22.04.5 server. Not sure what to check, could use some hints and help.
Do you have duplicate records?
Strange Issue with nameservers and subdomains [solved] - #4 by alento
Are the nameservers registered correctly at the domain registrar? What does dig <domain> NS
return?
I don’t see any duplicates, and the nameservers look good to me:
; <<>> DiG 9.18.30-0ubuntu0.22.04.2-Ubuntu <<>> cozyhobbit.com NS
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15125
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 3
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; COOKIE: 70d95e010c521fb00100000068162fc836e8cd2322b9e39c (good)
;; QUESTION SECTION:
;cozyhobbit.com. IN NS
;; ANSWER SECTION:
cozyhobbit.com. 86400 IN NS ns1.mail.cozyhobbit.com.
cozyhobbit.com. 86400 IN NS ns2.mail.cozyhobbit.com.
;; ADDITIONAL SECTION:
ns1.mail.cozyhobbit.com. 156219 IN A 185.165.44.224
ns2.mail.cozyhobbit.com. 156219 IN A 185.165.44.224
;; Query time: 27 msec
;; SERVER: 127.0.0.1#53(127.0.0.1) (UDP)
;; WHEN: Sat May 03 11:01:28 EDT 2025
;; MSG SIZE rcvd: 158
Exactly…everything seems fine, except new host entries ON THAT domain don’t, they end up looking like this:
; <<>> DiG 9.18.30-0ubuntu0.22.04.2-Ubuntu <<>> testhost.cozyhobbit.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 12809
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; COOKIE: 381d500af3e6ab4901000000681637e40ba1a00b8ae92a26 (good)
;; QUESTION SECTION:
;testhost.cozyhobbit.com. IN A
;; AUTHORITY SECTION:
cozyhobbit.com. 10800 IN SOA ns1.mail.cozyhobbit.com. hostmaster.mail.cozyhobbit.com. 2025041606 7200 3600 1209600 86400
;; Query time: 107 msec
;; SERVER: 127.0.0.1#53(127.0.0.1) (UDP)
;; WHEN: Sat May 03 11:36:04 EDT 2025
;; MSG SIZE rcvd: 150
And this is ONLY affecting new hostnames, and as far as I have tested ONLY on this one domain. New hosts on other domains this is the name server for are working great, and older hostnames on this domain are also working fine
There could be an error in your custom dns entries. Check /home/user-data/dns/custom.yaml
for entries you no longer use.
Also, the output of sudo systemctl status mailinabox
might contain a hint.
I definitely have some old stale entries I’ll be cleaning up, but no duplicates, nothing that looks wrong. I’ll have to look for logs related to dns, the service status of malinabox is good.
This is one thing now that I look back at that yaml…all the ones that are not working went in after I added the hostname of the MIAB itself. Since I changed hosts and domains during the migration, that might be significant.
There was an issue in the past involving some entry in the custom.yaml file to cause breakage. I’m not sure it was ever resolved. Try to remove all lines in the custom.yaml file that are no longer used (make a backup copy of the file first)
Did the systemctl command show errors?
Also, when you talk about a hostname, you mean you want to add an A record for a subdomain? E.g. test.cozyhobbit.com?
No errors on the systemctl command, I tried finding the logs for named also, but can’t seem to find them. I will clear out stale entries later to test that. Yes, when I refer to a hostname, I do mean an A record.