Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
General Discussion
»
Unbound restart when "Register DHCP leases" is checked
« previous
next »
Print
Pages: [
1
]
Author
Topic: Unbound restart when "Register DHCP leases" is checked (Read 900 times)
kevindd992002
Newbie
Posts: 29
Karma: 0
Unbound restart when "Register DHCP leases" is checked
«
on:
June 08, 2024, 11:00:41 am »
I just transitioned from pfsense to opnsense and wondering if this DNS issue is solved in opnsense? When a new device goes through the DHCP process and I have "register DHCP leases" checked in Unbound, does Unbound restart itself? This has been an issue with pfsense until now and I just kept the option disabled which means I can't resolve DHCP devices.
Logged
Patrick M. Hausen
Hero Member
Posts: 6308
Karma: 537
Re: Unbound restart when "Register DHCP leases" is checked
«
Reply #1 on:
June 08, 2024, 11:02:23 pm »
This is necessary for Unbound to read the new host overrides produced by the DHCP leases. There is fundamentally no way around that as far as I know.
A cleaner solution would be proper RFC 2136 integration with BIND, but that also comes with some issues. Like no static entries in the zone you use for the dynamic ones.
I do not register dynamic DHCP leases. What for? Why would I want "Paddy's Macbook Pro" in my DNS? I do register all the static DHCP leases.
To be able to "ping foo", consider installing avahi on the individual machines, if you run e.g. a lot of VMs or containers and want to address them by hostname.
Logged
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do.
(Isaac Asimov)
kevindd992002
Newbie
Posts: 29
Karma: 0
Re: Unbound restart when "Register DHCP leases" is checked
«
Reply #2 on:
June 09, 2024, 08:19:35 pm »
In pfsense, when unbound restarts, it loses all of its cache. I see that in opnsense, that unbound option is set to disabled/unchecked which means that restarts won't really affect them. Is that option there as a workaround for this?
The only reason I want DHCP leases registered in unbound is so that I can see their friendly names in AdguardHome as it is using unbound as a reverse DNS server. I don't care about pinging/reaching the DHCP devices by name.
Logged
franco
Administrator
Hero Member
Posts: 17473
Karma: 1587
Re: Unbound restart when "Register DHCP leases" is checked
«
Reply #3 on:
June 10, 2024, 01:23:33 pm »
The default behaviour in OPNsense is to retain the cache of Unbound across restarts.
But also we don't require an Unbound start for DHCP leases to appear as these are pushed over the Unbound control channel instead.
Cheers,
Franco
Logged
kevindd992002
Newbie
Posts: 29
Karma: 0
Re: Unbound restart when "Register DHCP leases" is checked
«
Reply #4 on:
June 10, 2024, 01:27:35 pm »
Ok. So Patrick's response above is not accurate now? No offense intended. I'm just confused on replies that are a bit contradicting.
Logged
franco
Administrator
Hero Member
Posts: 17473
Karma: 1587
Re: Unbound restart when "Register DHCP leases" is checked
«
Reply #5 on:
June 10, 2024, 01:40:05 pm »
I don't think Patrick means any harm. Implentation details are difficult to keep track of.
Cache flush option (off by default):
https://github.com/opnsense/core/blob/master/src/opnsense/mvc/app/controllers/OPNsense/Unbound/forms/general.xml#L95-L103
Code to bring new dynamic leases to Unbound without a restart:
https://github.com/opnsense/core/blob/master/src/opnsense/scripts/dhcp/unbound_watcher.py#L209-L213
Cheers,
Franco
Logged
kevindd992002
Newbie
Posts: 29
Karma: 0
Re: Unbound restart when "Register DHCP leases" is checked
«
Reply #6 on:
June 10, 2024, 01:51:48 pm »
I completely agree. Patrick has been helpful to a lot of people in this forum. I don't mean any offense with my questions.
Ok, thanks for the confirmation! This is one other thing that I'm glad I switched over from pfsense to opnsense
This issue has been existing for so many years with pfsense now and they don't care at all.
I'm wondering though. Is there a reason why "register DHCP leases" is disabled in the unbound settings by default?
Logged
franco
Administrator
Hero Member
Posts: 17473
Karma: 1587
Re: Unbound restart when "Register DHCP leases" is checked
«
Reply #7 on:
June 10, 2024, 01:54:40 pm »
Legacy defaults and technical debt in the approach (as Patrick noted there are better ways).
We're currently not planning to allow bringing in dynamic leases from Kea, because the same constraints apply and we ideally would like something more robust for the future.
Cheers,
Franco
Logged
kevindd992002
Newbie
Posts: 29
Karma: 0
Re: Unbound restart when "Register DHCP leases" is checked
«
Reply #8 on:
June 10, 2024, 02:00:12 pm »
Are you saying that when Kea becomes the only DHCP server available and ISC gets removed, the "register DHCP lease" option in unbound will be removed?
Logged
franco
Administrator
Hero Member
Posts: 17473
Karma: 1587
Re: Unbound restart when "Register DHCP leases" is checked
«
Reply #9 on:
June 10, 2024, 02:05:30 pm »
I haven't said ISC is going to be removed.
https://forum.opnsense.org/index.php?topic=38215.msg200831#msg200831
Cheers,
Franco
Logged
kevindd992002
Newbie
Posts: 29
Karma: 0
Re: Unbound restart when "Register DHCP leases" is checked
«
Reply #10 on:
June 10, 2024, 02:26:21 pm »
Ahaha, I guess everyone is just assuming it gets deprecated at some point. But yeah, when KEA gets full blown, then I'm ok moving to it even if the register DHCP leases option isn't applicable for it. I'll cross the bridge when we get there.
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
General Discussion
»
Unbound restart when "Register DHCP leases" is checked