My DNS server used to be the DNS server for a company's domain. However they moved elsewhere. Oddly enough, years later they were still listing my DNS server in their whois record (or, more properly, in their glue records).
Now I'm curious if there are other domains doing the same thing.
Is there a way I can find which domains list my server as their nameserver?
In the old days one could query for "host records" with whois but I don't see a way to do that now
The only (sane) way to identify the domains returning referrals to your nameserver is to log the packets that you're returning a response of REFUSED to, either via nameserver logging options or packet captures. Naturally, this only works if caching services are actively looking up that domain.
There are a few non-trivial methods you can use to harvest what glue is configured at the TLD level, but even these won't tell you which servers have glue records configured from the third level domains onward as that data is not stored on the TLDs at all.