Skip to content
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

Unbound reverse PTR records #5477

Closed
lsbbs opened this issue Jan 15, 2022 · 9 comments
Closed

Unbound reverse PTR records #5477

lsbbs opened this issue Jan 15, 2022 · 9 comments
Labels
help wanted Contributor missing / timeout incomplete Issue template missing info

Comments

@lsbbs
Copy link

lsbbs commented Jan 15, 2022

When I create multiple A records for the same IP address like

name1.example.domain. A 123.123.123.123
name2.example.domain. A 123.123.123.123

For each name also a PTR record is created.

123.123.123.123.in-addr.arpa PTR name1.example.domain.
123.123.123.123.in-addr.arpa PTR name2.example.domain.

There should be only one reverse record for each IP.
A checkbox if a PTR record should be created would be fine solution for this.

OPNsense 21.7.7-amd64 with unbound 1.13.2

@OPNsense-bot
Copy link

Thank you for creating an issue.
Since the ticket doesn't seem to be using one of our templates, we're marking this issue as low priority until further notice.

For more information about the policies for this repository,
please read https://github.com/opnsense/core/blob/master/CONTRIBUTING.md for further details.

The easiest option to gain traction is to close this ticket and open a new one using one of our templates.

@OPNsense-bot OPNsense-bot added the incomplete Issue template missing info label Jan 15, 2022
@Starkstromkonsument
Copy link

@lsbbs Is this a duplicate of #4420 ?

@lsbbs
Copy link
Author

lsbbs commented Feb 4, 2022

Yes, somehow.

@x390
Copy link

x390 commented Jul 3, 2022

Would be nice to see ntopng show the correct address instead of some random alias.

@OPNsense-bot
Copy link

This issue has been automatically timed-out (after 180 days of inactivity).

For more information about the policies for this repository,
please read https://github.com/opnsense/core/blob/master/CONTRIBUTING.md for further details.

If someone wants to step up and work on this issue,
just let us know, so we can reopen the issue and assign an owner to it.

@OPNsense-bot OPNsense-bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 14, 2022
@OPNsense-bot OPNsense-bot added the help wanted Contributor missing / timeout label Jul 14, 2022
@x390
Copy link

x390 commented Jul 23, 2022

@fichtner Is this a intended function?

@maciekb
Copy link

maciekb commented Aug 2, 2022

I strongly support that it should be possible to manually indicate whether a PTR record should be generated for a given override record. The problem is quite trivial, but annoying. Many web services rely on reverse name recognition. The first example that comes to mind is Zenarmor (Sensei), which presents inconsistent data in its reports in the current situation. Multiple PTR records for the same IP address cause the name to be retrieved randomly, causing the reports to show several hosts as the source despite the data coming from a single IP address.
In addition, I noticed that Unbound in OPNsense generates just as many IN A records as both PTR records for the local network gateway IP address. This is a problem if we have vlans, for example, and are trying to access the router by name. If the resolver gets an IP address in response from a vlan address that we don't have access to from the source network, then access is obviously not possible.

@swhite2
Copy link
Member

swhite2 commented Aug 2, 2022

@maciekb While I agree that manual PTR records as a separate type would be ideal; scope, migration and impact all limit the viability of pushing this in the short term. For now I'm proposing #5925 in order to mitigate the issues discussed here. Let me know what you think.

@maciekb
Copy link

maciekb commented Aug 2, 2022

@swhite2 I understand that a more detailed control may require rebuilding more of the internal logic and adapting the user interface to it. It seems to me that the proposed restriction on the generation of PTR records is a reasonable solution for the moment.
Thank you very much for understanding the problem and offering a solution.

swhite2 added a commit that referenced this issue Aug 16, 2022
…and host overrides (#5925)

In order to prevent the unpredictable behaviour of random PTR records being returned, which is not explicitly prohibited in RFC1035, it is best to restrict the creation of PTR records from every single host and alias (except for wildcard entries, no PTR records are created here), to only non-alias overrides (edit: the exception here is an alias whose parent does not create a PTR record, a wildcard entry). We also further restrict it to unique IP addresses so there can be no confusion in how to maintain the entries within the running Unbound instance.

Hopefully this can pave the way for adding PTR records as a separate type instead of generating them under the hood, as is done currently.

This change should at least address inconsistencies regarding random PTR records being returned as mentioned in #5477

A slight refactor of the existing unbound code is also included here for code reduction purposes.
fichtner pushed a commit that referenced this issue Aug 24, 2022
…and host overrides (#5925)

In order to prevent the unpredictable behaviour of random PTR records being returned, which is not explicitly prohibited in RFC1035, it is best to restrict the creation of PTR records from every single host and alias (except for wildcard entries, no PTR records are created here), to only non-alias overrides (edit: the exception here is an alias whose parent does not create a PTR record, a wildcard entry). We also further restrict it to unique IP addresses so there can be no confusion in how to maintain the entries within the running Unbound instance.

Hopefully this can pave the way for adding PTR records as a separate type instead of generating them under the hood, as is done currently.

This change should at least address inconsistencies regarding random PTR records being returned as mentioned in #5477

A slight refactor of the existing unbound code is also included here for code reduction purposes.

(cherry picked from commit 92a5a22)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Contributor missing / timeout incomplete Issue template missing info
Development

No branches or pull requests

6 participants