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

DNS Resolver - Unbound - Not able to resolve DHCP leases until it is saved #435

Closed
slackadelic opened this issue Oct 16, 2015 · 8 comments
Closed
Assignees
Labels
feature Adding new functionality
Milestone

Comments

@slackadelic
Copy link
Member

So, this odd issue popped up where I was not able to resolve DHCP leases within the DNS Resolver.

What I found was an article speaking about how Unbound is not able to resolve new leases as it doesn't know about them until you 'save' the configuration again.

As a test, I logged into OPNsense, went to the DNS Resolver page, and submitted a save, even though no changes on my side had happened.

Bingo.. once it applied, active DHCP clients were now resolvable on my network.

@fichtner fichtner added bug Production bug help wanted Contributor missing / timeout labels Oct 28, 2015
@fichtner fichtner added this to the 16.1 milestone Oct 28, 2015
@fichtner
Copy link
Member

fichtner commented Dec 9, 2015

@StopTrain reported that not setting up IPv6 unbreaks unbound

@fichtner
Copy link
Member

fichtner commented Jan 9, 2016

@StopTrain hey Matt, close this or investigate further?

@8191
Copy link
Member

8191 commented Jan 9, 2016

Investigating a different issue with this feature I can now tell what's the reason for this one, I'd say:

The DHCP leases are mapped as static host overrides within unbound. The "magic" is done within etc/inc/unbound.inc:560-575, which (afaik) only get's called when applying changes in the DNS Resolver.
@fichtner Is there a mechanism which calls the config scripts regularly?

@fichtner
Copy link
Member

There is quite a bit of complication going on. There is a daemon called dhcpleases, which knows the PID of the DNS daemon so the config can be reloaded using SIGHUP, but I don't know how the host file is regenerated other than probably doing it in the daemon itself, not sure if some code is missing since the GUI code was forked 9 months after the dhcpleases code disappeared...

https://github.com/opnsense/core/blob/master/src/etc/inc/system.inc#L465
https://github.com/opnsense/ports/blob/master/opnsense/dhcpleases/files/dhcpleases.c#L491

I've ran a test with Matt using the newer daemon's code but it was unsuccessful.

@fichtner fichtner removed this from the 16.1 milestone Feb 4, 2016
@fichtner fichtner added this to the Future milestone Feb 16, 2016
@fichtner fichtner removed the bug Production bug label Feb 16, 2016
@fichtner fichtner added feature Adding new functionality and removed help wanted Contributor missing / timeout labels Feb 26, 2016
@fichtner fichtner modified the milestones: 16.7, Future Feb 26, 2016
@fichtner
Copy link
Member

Matt, @AdSchellevis has revorked this for the development version of 16.1.5. I've tested this, looked pretty good now. Can you retest when it's out?

@slackadelic
Copy link
Member Author

I most certainly can.

@fichtner
Copy link
Member

This is in since a while, I'd like to vote for close and worst case opening a new bug. The behaviour of the resolver seems to be better now and original behaviour may not apply. :)

@fichtner
Copy link
Member

timeout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adding new functionality
Development

No branches or pull requests

4 participants