I have a problem with Fail2ban. In the log I have this:
2021-12-05 00:49:23,968 fail2ban.utils [979765]: ERROR 7f9a6df8cdf0 -- stderr: '/bin/sh: 1: iptables: not found'
2021-12-05 00:49:23,968 fail2ban.utils [979765]: ERROR 7f9a6df8cdf0 -- stderr: '/bin/sh: 2: iptables: not found'
2021-12-05 00:49:23,968 fail2ban.utils [979765]: ERROR 7f9a6df8cdf0 -- stderr: '/bin/sh: 3: iptables: not found'
2021-12-05 00:49:23,968 fail2ban.utils [979765]: ERROR 7f9a6df8cdf0 -- returned 127
2021-12-05 00:49:23,969 fail2ban.utils [979765]: INFO HINT on 127: "Command not found". Make sure that all commands in 'iptables -w -N f2b-nginx-badbots\niptables -w -A f2b-nginx-badbots -j RETURN\niptables -w -I INPUT -p tcp -j f2b-nginx-badbots' are in the PATH of fail2ban-server process (grep -a PATH= /proc/`pidof -x fail2ban-server`/environ). You may want to start "fail2ban-server -f" separately, initiate it with "fail2ban-client reload" in another shell session and observe if additional informative error messages appear in the terminals.
2021-12-05 00:49:23,969 fail2ban.actions [979765]: ERROR Failed to execute ban jail 'nginx-badbots' action 'iptables-allports' info 'ActionInfo({'ip': '81.213.141.194', 'family': 'inet4', 'fid': <function Actions.ActionInfo.<lambda> at 0x7f9a6f56eca0>, 'raw-ticket': <function Actions.ActionInfo.<lambda> at 0x7f9a6f56f3a0>})': Error starting action Jail('nginx-badbots')/iptables-allports: 'Script error'
2021-12-05 00:49:23,969 fail2ban.actions [979765]: NOTICE [nginx-badbots] Restore Ban 82.66.13.48
2021-12-05 00:49:23,976 fail2ban.utils [979765]: ERROR 7f9a6df8cdf0 -- exec: iptables -w -N f2b-nginx-badbots
Can someone enlighten me?
thanks in advance