I am using perl to do some DNS manipulation tasks.
I am using NSD as my DNS server.
I want to figure out what the best way is to check whether the names of all Resource Records in a DNS zone file are valid.
There seem to be a couple of possibilities (that I can think of) to do the checking:
- nsd-checkzone
- An already made Perl module https://metacpan.org/pod/Data::Validate::Domain
- Do the checking manually in perl by knowing all the RFCs describing what is a valid name and what is not.
The main problem, in my opinion, arises when special names of Resource Records come into question.
For example: I have seen online that there is a possibility to use a * as a name of a Resource Record:
* IN A 192.168.150.144
This supposedly means return this record if no other record matches.
I have also seen some "special" names of Resource Records (in reverse DNS zones) like in this RFC:
192/26 NS ns.C.domain.
192/26 NS some.other.third.name.server.
0/25 NS ns.A.domain.
0/25 NS some.other.name.server.
I also have an additional question:
- Where can I see all these special names of Resource Records allowed in Forward and Reverse DNS zones and their meaning? (because I want to know them all :) )