geerlingguy / ansible-role-firewall

Ansible Role - iptables Firewall configuration.
https://galaxy.ansible.com/geerlingguy/firewall/
MIT License
524 stars 217 forks source link

Configure OUTPUT rules #96

Closed Encephala closed 11 months ago

Encephala commented 1 year ago

Hello from the Netherlands! Firstly, thanks a lot for your Ansible 101 series! I really enjoyed it and it's made me much more confident messing around in my homelab.

I wanted to use the role to lock down a VM so that it can only access the internet, not any local device. I ran into two problems: first, it is not possible to configure outgoing firewall rules (as the README mentions). Second, I wanted the default policy for outgoing rules to be DROP, but the default policy was hardcoded (note also issue #93).

The latter is rather easy to implement. The prior has no one right way to do it though in a backwards compatible way. Here are some issues I ran into and how I went about it:

https://github.com/Encephala/ansible-role-firewall/blob/670aa337735ba44afc39c5731e31b71fc5f9010b/README.md?plain=1#L28-L30

https://github.com/Encephala/ansible-role-firewall/blob/670aa337735ba44afc39c5731e31b71fc5f9010b/defaults/main.yml#L26-L27

PS: This is my first time really using Ansible (and Git for that matter), so if I've missed any silly things, feel free to point them out and/or ignore part of my changes.

stale[bot] commented 1 year ago

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

Encephala commented 1 year ago

bump

stale[bot] commented 1 year ago

This issue is no longer marked for closure.

github-actions[bot] commented 1 year ago

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

github-actions[bot] commented 11 months ago

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.