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 host overrides breaks when adding a wildcard entry #8051

Open
2 tasks done
kriansa opened this issue Nov 10, 2024 · 6 comments
Open
2 tasks done

Unbound host overrides breaks when adding a wildcard entry #8051

kriansa opened this issue Nov 10, 2024 · 6 comments

Comments

@kriansa
Copy link

kriansa commented Nov 10, 2024

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

Describe the bug

Adding a DNS entry named * (wildcard) on a domain with an existing host override will be allowed by UI but will break Unbound initialization, thus making it immediately offline after applying the change.

According to the manual, wildcards should be accepted as host names for host overrides.

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'Services', then 'Unbound DNS', then 'Overrides'
  2. Click on '+' button and add a new override
  3. Set host to "abc", domain to "opnsense.com", type A, IP address 127.0.0.1
  4. Save, then click Apply
  5. Unbound will be still running, validate running a drill @routerip abc.opnsense.com to see that it returns an entry to 127.0.0.1
  6. Click on '+' button and add a new override
  7. Set Host to '*', domain to "opnsense.com", type A, IP address '127.0.0.1'
  8. Save, then click Apply
  9. See that Unbound will stop and won't start again unless you either remove that entry or all entries that are not wildcards for that domain and apply again

Expected behavior

Unbound should stay up, and a subsequent drill xyz.opnsense.com should return an entry to '127.0.0.1'.

Environment

I don't think it's relevant.

@collinthorn
Copy link

I have just recently experienced the same issue. I cannot pinpoint when it started, however, as I have backup DNS that my system reverted to without me knowing. The outcome (Unbound shutting down) is the same if one were to use a different IP address in step #3 listed above.

@AdSchellevis
Copy link
Member

most likely cause is an overlapping entry (e.g. *.my.org and host.my.org assigned), these are difficult to detect upfront and if I remember correctly will break startup.

@fichtner
Copy link
Member

Isn't "*" the reason why domain overrides exist?

@kriansa
Copy link
Author

kriansa commented Nov 15, 2024

most likely cause is an overlapping entry (e.g. *.my.org and host.my.org assigned), these are difficult to detect upfront and if I remember correctly will break startup.

Confirmed, I just tested, and this seems to be the pre-requisite for this issue. I updated the reproducing steps.

@collinthorn
Copy link

I dislike being on an island when it comes to error reporting. In almost every case it means I'm doing something wrong and/or stupid. My wildcard entry on Host Domains is the only entry on my list; no overlapping entries. I just have the one wildcard entry directed to my reverse proxy for keep-it-inside-LAN DNS overrides. (I think this is one application of this Opnsense functionality, yes?) As soon as I hit apply, it thinks for a bit and then Unbound turns off. When I disable it Unbound immediately turns back on.

@AdSchellevis
Copy link
Member

check the logs??

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

No branches or pull requests

4 participants