Skip to content

PTR Records could point to IP addresses #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
nkallergis opened this issue Apr 11, 2025 · 0 comments
Open

PTR Records could point to IP addresses #69

nkallergis opened this issue Apr 11, 2025 · 0 comments

Comments

@nkallergis
Copy link
Contributor

Environment

  • Nautobot version: N/A
  • nautobot-dns-models version: N/A

Proposed Functionality

Even though technically this might not be correct, a PTR record practically is bound to an IP address and defines the value of the reverse resolution (e.g. 192.0.2.1 --> srv01.example.com). Creating a Foreign Key from the PTRRecordModel to IPAddress would make this representation much easier. The ptrdname attribute can easily be calculated from the IP address using netutils like this:

from netutils.ip import ipaddress_address
ptrdname = ipaddress_address(ip.host, "reverse_pointer")

Use Case

Right now, there's no easy way to go from a PTR record to its respective IP address. Implementing the above would make this much easier, like with A/AAAA records. I believe it will also facilitate the enforcement of uniqueness - a given IP address within a given DNS Zone should only have one PTR record.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant