• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx

  • We are developing a new feature in Plesk that will help you promote your websites or business on social media. We want to conduct a one-hour online UX test to present the prototype and collect feedback. If you are interested in the feature, please book a meeting via this link.
    Thank you in advance!
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Issue Fail2ban error with Almalinux ¿nf_tables?

Fede Marsell

Basic Pleskian
Server operating system version
AlmaLinux release 8.10 (Cerulean Leopard)
Plesk version and microupdate number
18.0.65 #1
Hello,

After migrating from CentSO to Almalinux, Fail2ban is not working properly. The problem occurs on several servers. Not just one.

The error is that Fail2ban does not create the rules in iptables, and for that reason it gives an error:

2024-11-18 10:19:21,143 fail2ban.actions [1253]: ERROR Failed to flush bans in jail 'plesk-postfix' action 'iptables-multiport': Error flushing action Jail('plesk-postfix')/iptables-multiport: 'Script error'
2024-11-18 10:19:21,148 fail2ban.utils [1253]: ERROR 7f9adb032418 -- exec: for proto in $(echo 'tcp' | sed 's/,/ /g'); do
2024-11-18 10:19:21,148 fail2ban.utils [1253]: ERROR 7f9adb032418 -- stderr: "iptables v1.8.5 (nf_tables): Chain 'f2b-plesk-postfix' does not exist"
2024-11-18 10:19:21,148 fail2ban.utils [1253]: ERROR 7f9adb032418 -- stderr: "Try `iptables -h' or 'iptables --help' for more information."
2024-11-18 10:19:21,148 fail2ban.utils [1253]: ERROR 7f9adb032418 -- returned 2
2024-11-18 10:19:21,149 fail2ban.actions [1253]: ERROR Invariant check failed. Flush is impossible.
2024-11-18 10:19:21,157 fail2ban.utils [1253]: ERROR 7f9add780c90 -- exec: for proto in $(echo 'tcp' | sed 's/,/ /g'); do
2024-11-18 10:19:21,157 fail2ban.utils [1253]: ERROR 7f9add780c90 -- stderr: "iptables v1.8.5 (nf_tables): Chain 'f2b-plesk-postfix' does not exist"
2024-11-18 10:19:21,157 fail2ban.utils [1253]: ERROR 7f9add780c90 -- stderr: "Try `iptables -h' or 'iptables --help' for more information."
2024-11-18 10:19:21,157 fail2ban.utils [1253]: ERROR 7f9add780c90 -- stderr: 'iptables: No chain/target/match by that name.'
2024-11-18 10:19:21,157 fail2ban.utils [1253]: ERROR 7f9add780c90 -- stderr: 'iptables: No chain/target/match by that name.'
2024-11-18 10:19:21,157 fail2ban.utils [1253]: ERROR 7f9add780c90 -- returned 1
2024-11-18 10:19:21,157 fail2ban.actions [1253]: ERROR Failed to stop jail 'plesk-postfix' action 'iptables-multiport': Error stopping action Jail('plesk-postfix')/iptables-multiport: 'Script error'

I have uninstalled Fail2Ban and reinstalled it, but the error persists.

I think the error may be because Almalinux comes with nf_tables instead of iptables. Could this be the cause?

iptables v1.8.5 (nf_tables)

Any solution to get Fail2Ban working again?

Thank you!!

Fede
 
Just to confirm. Can someone check, that Fail2Ban works correctly on AlmaLinux with iptables v1.8.5 (nf_tables) ?

Thank you!

Fede
 
Back
Top