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

Add firewall configuration reset option #5

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

sj213
Copy link
Contributor

@sj213 sj213 commented Jul 24, 2024

One (hopefully, for the time being) last PR for this playbook: Since ansible.posix.firewalld provides no way to reset network or service lists to empty, the playbook fatally ends up only ever adding permissions, not revoking them. E.g. just removing a serivce name from the whitelist for some zone and re-running the playbook will not block access to that service (the playbook has no way to set a value for the entire list, it can only add or remove entries via ansible.posix.firewalld).

To remedy this, a new playbook variable firewall_reset_configuration has been added, that, when set to true (the default is, of course, false) causes the playbook to run firewall-cmd --reset-to-defaults via ansible.builtin.command before applying its own changes.

As use of this option is potentially dangerous, a stern warning regarding it has been added to the README.

Apart from a possibe future implementation for Debian-based systems (which is not on the cards right now), this playbook should now hopefully be feature-complete.

@sj213 sj213 requested a review from mira-miracoli July 25, 2024 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant