On Mon, Oct 17, 2022 at 7:52 AM Dominik 'Rathann' Mierzejewski <
dominik(a)greysector.net> wrote:
On Monday, 17 October 2022 at 14:34, Richard Shaw wrote:
> This actually has to do with iptables vs nftables but I need to be able
to
> deal with it here.
>
> iptables wants the port ranges specified using a ":" as a separator but
> nftables wants "-"...
>
> The problem is in the default jail.conf which is:
>
> # Ports to be banned
> # Usually should be overridden in a particular jail
> port = 0:65535
>
> My current thought is to create two sub-packages:
> fail2ban-iptables
> fail2ban-nftables
>
> I was thinking of using %post to do sed substitution for both packages
(if
> it's already correct it would end up being a no-op).
>
> Installing nftables by default since all current releases of Fedora use
it
> by default.
>
> Thoughts?
Sounds good to me as a temporary solution. Have you discussed the move
to nftables with upstream?
They initially made the change upstream but I guess ran into too many
issues with users still using iptables and reverted it. They have
subsequently given up and consider it a firewalld issue.
I think if I include jail.conf in both subpackages %post should work fine
(instead of %posttrans). It will be marked %config(noreplace) for updates
and if the packages are switched out, the sed substitution should work fine
or no-op.
I'll add the nftables package as "Recommends:" to the main package so it
will get installed by default and come up with some kind of virtual require
/ provides for both subpackages to make sure one is installed.
Thanks,
Richard