Hi, I’m sorry for bothering with perhaps something trivial, but I’ve been banging my head against the wall for many hours now and still can’t figure out what I’m doing wrong.
On my personal server, I want to have a DynDNS.org-like service – that is, a Raspberry Pi can periodically ping the service with the current public IP address assigned to my home network, and the service will keep a record up-to-date, so that no matter how often my home IP address changes, the record will always point to the correct address.
I got such service running at ddns.milanvit.net and set to manage the ns.milanvit.net subdomain (just to be clear – ddns.milanvit.net
is called to update the IP address, and ns.milanvit.net
holds all the dynamic records), so all that was left was to delegate a subdomain to this nameserver. I created the following records:
- Type:
NS
, name:ns
, value:ddns.milanvit.net
- Type:
A
, name:ddns
, value:<ipv4-address-of-my-server>
- Type:
AAAA
, name:ddns
, value:<ipv6-address-of-my-server>
But even after disabling DNSSEC (after things did not work immediately, I suspected that perhaps having apex domain protected by DNSSEC but this particular subdomain not protected would cause issues) and waiting overnight for the records to propagate, I only have partial success. Please have a look:
$ dig @1.1.1.1 +short ns.milanvit.net NS
localhost. # incorrect
$ dig @8.8.8.8 +short ns.milanvit.net NS
localhost. # incorrect
$ dig @1.1.1.1 +short ddns.milanvit.net A
<correct IPv4 address>
$ dig @1.1.1.1 +short ddns.milanvit.net AAAA
<correct IPv6 address>
$ dig @1.1.1.1 +short <subdomain>.ns.milanvit.net
<SOMEHOW correct IPv4 address from my custom DDNS server>
$ dig @8.8.8.8 +short <subdomain>.ns.milanvit.net
<now that I’m writing this, it’s also correct but it definitely wasn’t 5 minutes ago>
So it’s like… the end result works, I suppose, I can query my home IP address by querying the proper subdomain. But I have no idea why the first two dig
queries return localhost
as an answer, I’d expect ddns.milanvit.net
to be the correct answer. What am I doing wrong?
(Apologies for (very poorly) censoring the dig
outputs, I hope that it’s still clear what is the problem and what is correct.)