Mantis Bugtracker

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000063 [MyDNS-NG] Global feature N/A 2010-11-06 19:33 2014-08-07 21:41
Reporter wiese View Status public  
Assigned To jameno123
Priority normal Resolution open Platform
Status assigned   OS
Projection none   OS Version
ETA none Fixed in Version Product Version
  Target Version 1.2.9 Product Build
Summary 0000063: Default PTR Domain for "reverse dns zones"
Description Hiya,

a very useful feature for almost all ISPs:
Default PTR Domain


Explanation:

You have 2 zones (SOA) created:

my-domain.com
0.168.192.in-addr.arpa

The SOAs have the following RRs:

my-domain.com:
@ IN NS ns1.my-provider.com.
@ IN NS ns2.my-provider.com.
@ IN A 123.123.123.123
www IN A 123.123.123.123
192-168-0-222.ip4 IN A 123.123.123.123


0.168.192.in-addr.arpa:
@ IN NS ns1.my-provider.com.
@ IN NS ns2.my-provider.com.
5 IN PTR my-ptr-host.domain.com.



Within the mydns.conf configuration exists one entry:
default-ptr-domain = my-domain.com



Scenario:
Someone asks your DNS for the PTR of: 123.64.168.192.in-addr.arpa
The DNS will refuse the query because no SOA exists in the data base.

Someone asks your DNS for the PTR of: 5.0.168.192.in-addr.arpa
The DNS will answer "my-ptr-host.domain.com" because SOA and RR found. Default behavior.

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
Steps To Reproduce
Additional Information
Tags No tags attached.
Attached Files

- 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.

- Issue History
Date Modified Username Field Change
2010-11-06 19:33 wiese New Issue
2014-08-07 21:32 jameno123 Status new => assigned
2014-08-07 21:32 jameno123 Assigned To => jameno123
2014-08-07 21:41 jameno123 Note Added: 0000211
2014-08-07 21:41 jameno123 Target Version => 1.2.9


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker