-
Notifications
You must be signed in to change notification settings - Fork 27
Purge unmanaged firewall rules #21
Comments
That would be extremely useful, but I don't know, off hand, how to achieve it. |
I came just to say this too. Theoretically we could parse the output of |
At the very least we should make a nice visible warning that rules must be manually purged on the readme. |
Why not use the "ufw reset" function for this? Or would you run this risk of re-applying your rules on every puppet run? |
@netson "ufw reset" does a hard reset so it would run everytime and would leave your system not in the desired state if you dont set the depencies right, which of course we could do in the module...But still...mmm. I am currently looking at how the puppetlabs firewall does this. @igalic i think you might be right and ill have to go down the puppet type route |
Yeah, I figured as much. In addition, if you were to remove all rules not set with puppet, you could create a security risk. Think for example of tools such as Fail2Ban who automatically add rules if unauthorized access is suspected; these rules would then be deleted on each puppet run. I think a more intelligent approach is required. Maybe, as mentioned before, only the allow rules that were not set by puppet could be (optionally) removed by parsing the ouput of |
Hi,
I'm adding parameter to each 'ufw::allow' resource
and this seems to work. Of course this solution will execute |
as you say in your last sentence, a reset should only run when necessary not all the time |
There should be an option to purge ufw rules not managed by this module.
The text was updated successfully, but these errors were encountered: