-
Notifications
You must be signed in to change notification settings - Fork 457
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
Re-Architect Firewall #1100
Comments
In a nutshell, i think:
And if feasible, retain as much of the current hiera structure as possible to ease migration |
Personal opinion:
|
@rtib good point re what's active not necessarily being what's on disk. If templates were used the state could be compared, though you do raise a good consideration there. I get your point about discrete modules, i lean towards modules that manage all facets of a feature, in this case most major firewall options though firewalld is not present here (?). IMO one disadvantage of discrete modules is they can make dependency hell worse. |
Indeed, a module named A module supporting many of the above depends on a common API defining the archetypes of all aspects of firewalls. The type/providers architecture is made for this. |
I think supporting different implementations, like iptables and nftables, in a single type but with multiple providers, is really tricky. This module is fine for managing iptables. for nftables, https://forge.puppet.com/puppet/nftables exists and is fine. Instead of multiple modules implementing nftables, I think we should focus on puppet/nftables. On the long term, puppetlabs/firewall could be archived and people switch to nftables. |
We have systems using I would argue for either:
|
Why do compile times take upwards of 30 minutes? How does using type/provider or templates change that? |
Just to add to the urgency, my understanding is that EL9 systems (e.g. RHEL9) are going to drop iptables in the not-too-distant future. This is enough of an issue that we're looking at switching to firewalld internally. |
while I hate firewalld; we still have a module for it as well: https://forge.puppet.com/modules/puppet/firewalld/readme |
@joshcooper This issue here gives a good explanation of at least one of the modules issues: #1053 ............. no pun was intended |
Just gonna post my current thoughts regarding each point:
|
My two cents: I would vote against a system of managing persistent state and reapplying it in an I'm currently able to define my "normal" firewall ruleset using |
@Jayfrown Thank you for bringing this to my attention. Had missed this bit of existing functionality when going over the module. |
@david22swan are there any new plans? I'm still voting for deprecating the module and putting the effort into puppet/nftables (or puppet/firewalld if people like to use that). |
@bastelfreak Sorry for the late reply, currently working on rewriting the module in the style of the resource_api. |
I completely understand the desire, from a module development and support perspective, to just split these out into separate modules per firewall type. But for those of us who maintain multi-distro/multi-version environments, where we currently have (at least) a mix of iptables and nftables, that's going to result in quite a bit of effort on the user side (i.e. defined types for everything to try and bridge the gap??)... |
Serious question: if I re-wrote the parser in Ruby optparse, would you guys be more happy to see that, or angry to see that? I'm over in PR 1127 making It would probably require re-writing a lot of the current tests just to correct small things like argument order in static test-case strings, but I highly, highly doubt that it would break more things in anyone's environment than the current implementation holds in unknown surprises - for example, did you know that given the right rule, the current design would happily have output you a rule that ends with |
Instead of rewriting the opt parsing, I still think that the time should be invested in existing nftables modules. puppetlabs/firewall is okay for iptables, but iptables is deprecated. nftables is the successor, there are approved and established module for nftables around and I think they should be used instead. |
Okay so I was GOING to say "that cuts off anyone using a RHEL 7 derivative, where the mainline kernel is still 3.10.x," because:
...but then I hopped onto one of my development machines, and there sure does seem to be an |
EL7 is quite old. EL8 and EL9 are available. People sould move on. For those who can't, they can still use the existing firewall module on EL7 :) and yes, nftables is supported in RHEL 7.6 I think |
To anyone who is interested, PR up to convert the module to the resource_api: #1145 |
That's my pr merged in and once the followup rubocop fixes are in they will both be released. |
Hey, just laying this out for everyone so there are no surprises.
As part of a larger discussion, we have decided that the Firewall module is in need of a major restructuring, with more and more issues arising from it and compile times that seem to regularly take upwards of thirty minutes.
In order to try and solve this issue the team is working to put together a plan on how the module should best be restructured to not only resolve the issues currently facing it but to help ensure that similar ones do not occur.
As part of this however we would like to hear the communities feedback and what ideas that they might have on the best way to accomplish this, so that we can reach our goal and provide the best quality module that we can.
As a start there are several questions that must be answered and choices to be made, these including:
Should we keep to the current provider style module or convert it to run with templates?
Converting the module may take more time to accomplish but could help keep the modules run time down and make the module more easily modified and maintained.
Should we refactor the current module or create a fresh one and leave the current one as is?
Depending on the size of the refactor it may be easier to simply start fresh, especially if we convert to a template style, as we can leave the old module as is for people to use until we get the new one fully fleshed out.
As a side note however, this could also be accomplished simply by cutting a major release and informing the community beforehand.
In the event that we create a new module, should we split it into two separate ones, one for iptables and one for ip6tables?
Although there is overlap in how they are managed they are in fact separate and outright keeping them as such may be more convenient for people who simply use on or the other.
Finally, should the module/modules be expanded to include nftables?
Although it has been around for some time now it is only recently that nftables seems to have gained traction, as such it may be best to add support for it to the firewall module/modules to ease people into converting over, as both it and iptables/ip6tables are both maintained by the same organisation, with the prior being actively developed as a successor and poised to take over.
Finally, to anyone worried about the changes coming to the module, know that this is merely an initial investigation and that the actual changes are still some time away. We are well aware of how important this module is and are committed to getting this right.
This message has also been posted in the puppet community slack and the puppet-users@ mailing list.
The text was updated successfully, but these errors were encountered: