Now, someone asks your DNS for the PTR of: 22.0.168.192.in-addr.arpa
The DNS has the SOA for 0.168.192.in-addr.arpa but no RR for 22. If in mydns.conf is defined a "default-ptr-domain" value it will generate a response if the SOA exists but no PTR RR, within this scheme: 192-168-0-22.ip4.my-domain.com

Now, to have the reverse dns working right, the same has to be if someone asks the A RR for: 192-168-0-22.ip4.my-domain.com. The DNS will check if this domain has a SOA. If so, it will check if it has an RR. If SOA exists, but no RR and the SOA is defined as "default-ptr-domain" generate a answer to the IP.
So if someine requests 192-168-0-22.ip4.my-domain.com the generated answer will be 192.168.0.22.

If the RR exists in the data base, it has surely priority and the DNS server will return this one.

Like this, ISPs don't have to generate for all their IP's "standard PTR" entries in the database which saves work and size of the database. Especially for IPv6 this is important. Who wants to put 79.228.162.514.264.337.593.543.950.336 "default PTR records" in the arpa zone and the domain zone just because the LIR has a /32 allocation from the RIR.

I think it's a great feature for those who wants to have "standard PTR's" for their IPs, and almost everyone does this. With this feature you have to enter only used/real PTR's within the zones, which saves a lot of work and entries.

Cheers,
Sven

Additional Information

Tags

No tags attached.

Attached Files

Relationships

Relationships

Notes

(0000211)
jameno123 (administrator)2014-08-07 21:41

Bind has a feature called $GENERATE in the zone files that implements this same style feature. It would be nice to have in mydns some sort of feature to auto-generate records such as this.

The reverse ptr when no record was found would be super easy to implement however the A record lookup on the generated hostname is not as easy. I am going to ponder a way to implement such an auto-generator. I think something along the lines with the wildcard might work.

SOA=168.192.in-addr.arpa.
* IN PTR static-%s.reverse.example.com.

Implementing something along the lines of:
- %s would be turned into "192-168-x-x" for IPv4; returning "static-192-168-0-0.reverse.example.com."
- For IPv6, the same just a longer example.

Definitely an interesting feature that would benefit mydns in the long run though internal caching may be an issue will have to look how that would be implemented.