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

Manage nat rules for the inet family instead of the ip family. #16

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

Conversation

FinweVI
Copy link

@FinweVI FinweVI commented Apr 23, 2021

In some cases, you also need the nat table for ipv6 rules.

@FinweVI
Copy link
Author

FinweVI commented Apr 23, 2021

Just added a commit to manage F2B "the systemd way".

@p-rintz
Copy link
Contributor

p-rintz commented Apr 26, 2021

Just as a note:
This would mean that the role only works for Linux Kernels >=5.2, as before that the inet family could not be used for NAT.

@gardouille gardouille self-assigned this Jul 30, 2021
@gardouille
Copy link
Collaborator

Ok, after… pfiiuu "few" months… !

Several things in this PR. I will try to merge some points with the recent PR #19 (at least : fail2ban, systemd target, systemd unit for nftables,).

@gardouille gardouille mentioned this pull request Jul 31, 2021
@gardouille
Copy link
Collaborator

ip to inet family require a deeper look…

Everything else will be manage in PR #20.

For extra info :

  • I kept Protect* systemd options cause i need it in some environment (LXC,…).
  • I kept "nftables reload" because if i use "nftables restart" instead with a bad rule's syntax, it will erase all rules (even with Debian Bullseye).
  • I also kept nftables systemd unit generation to have the same unit on all my hosts (Stretch -> Bullseye). I hope to be able to drop it when i will finally drop Debian Stretch 🤞

If it's ok for you, we can discusse those points in PR #20.

-> Many thanks to point me override.conf file for Fail2ban !

@kravietz
Copy link
Collaborator

kravietz commented Aug 9, 2021

@gardouille This change can be tested with Molecule in all the supported distributions. I don't think anything will break as I've been using inet for everything myself for a long time, but still worth testing for any kind of implied assumptions about ip table.

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.

4 participants