-
Notifications
You must be signed in to change notification settings - Fork 4
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
Modify Ansible UFW Role to Use iptables-save
Format
#5520
Labels
Comments
12 tasks
kayiwa
added a commit
that referenced
this issue
Nov 20, 2024
the order of rules matters in ufw. We add the new defaults for ssh we create a template file that can allow users to place these rules and have predictable implementation Closes #5520
kayiwa
added a commit
that referenced
this issue
Nov 20, 2024
the order of rules matters in ufw. We add the new defaults for ssh we create a template file that can allow users to place these rules and have predictable implementation Closes #5520
kayiwa
added a commit
that referenced
this issue
Nov 25, 2024
the order of rules matters in ufw. We add the new defaults for ssh we create a template file that can allow users to place these rules and have predictable implementation Closes #5520
kayiwa
added a commit
that referenced
this issue
Nov 26, 2024
the order of rules matters in ufw. We add the new defaults for ssh we create a template file that can allow users to place these rules and have predictable implementation Closes #5520
Closed by this PR #5559 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This issue proposes modifying our Ansible UFW role to manage the firewall configuration using the
iptables-save
format. This will provide a more robust and flexible way to define and maintain firewall rules.Rationale:
Currently, the UFW role may rely on the
ufw
command-line utility to manage rules. While functional, this approach has limitations:ufw
command provides a simplified interface, which can be restrictive when defining complex rules or using advanced features ofiptables
.ufw
can be less transparent and may not provide direct control over the underlyingiptables
configuration.Using the
iptables-save
format in a template offers several advantages:iptables
rule, including those not directly supported byufw
.iptables-save
format is well-structured and easier to read and understand, making it simpler to manage complex firewall configurations.Tasks:
Update the UFW Role:
iptables.j2
) within the role'stemplates
directory.iptables-save
format.template
module to generate theiptables
configuration file from the template.iptables-restore
command.Example
iptables.j2
Template:Example Playbook:
Benefits:
The text was updated successfully, but these errors were encountered: