OPNsense Forum

English Forums => Development and Code Review => Topic started by: oneplane on July 31, 2018, 03:19:07 am

Title: Unbound forward-zone instead of stub-zone
Post by: oneplane on July 31, 2018, 03:19:07 am
I already posted it as an issue: https://github.com/opnsense/core/issues/2550

But since resources are probably limited and use cases not very broad, I was thinking I might implement this myself. As far as I can see, Unbound is not MVC-integrated yet, so a good first step would be upgrading that so it's MVC based. Next, I could add a switch or toggle to override entries to select between stub-zone and forward-zone (maybe call it "Authorative server" and "Any server" or something like that), and have the config output print forward-zone and stub-zone depending on the selection.

Looking at the build system and sources, it seems that the PHP (and Python if I need to do something in configd) parts are not that hard to update, but rebuilding a whole image is a lot of work (since it's pretty much building the entire ports tree?) I can spin up a FreeBSD vm for development, but it seems rather overkill for something so small. Is this the only way to develop this? And how would one start with this, just convert some pages, or does it have to be the whole module at once?
Title: Re: Unbound forward-zone instead of stub-zone
Post by: oneplane on August 11, 2018, 08:35:51 pm
So instead of doing the engineering part first, I simply swapped stub for forward: https://github.com/opnsense/core/issues/2550 & https://github.com/opnsense/core/pull/2627

Works a treat in the setups I manage (mostly virtual but a good number of varying physical boxes).