NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.58k stars 13.73k forks source link

Add `actions` and `filters` options to Fail2ban module #241321

Open Occhioverde opened 1 year ago

Occhioverde commented 1 year ago

Issue description

As of today, the Fail2ban NixOS module exposes options to generate the config files and to create and setup new jails, but lacks a way to define new actions and filters, rendering the manual creation of files in /etc/fail2ban/action.d and /etc/fail2ban/filter.d via envirnoment.etc the only way to do this operation.

Feature request

Since the Fail2ban already has a jails option that deals with creating new jails, it would be awesome to see an actions and filters ones to do essentially the same thing but with this other kind of objects.

Notify maintainers

@edolstra @lovek323

voidzero commented 9 months ago

Would appreciate a reply from the maintainers on this issue.

SuperSandro2000 commented 8 months ago

filters are already supported but they are not rendered on search.nixos.org https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/security/fail2ban.nix#L271

voidzero commented 8 months ago

Thank you @SuperSandro2000. Maybe the bug can be adjusted to this.