Topic: RuntimeError: Error flushing action Jail('sshd')/iptables-multiport
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version 1.2.1
- Deployed with the downloadable installer
- Linux/BSD distribution name and version: Ubuntu 18.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): NGINX
- Manage mail accounts with iRedAdmin-Pro? NO
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
I noticed this error in the logs
2020-05-31 19:37:28,383 fail2ban.actions [5058]: NOTICE [sshd] Ban 222.186.180.142
2020-05-31 19:37:29,535 fail2ban.filter [5058]: INFO [sshd] Found 222.186.180.142 - 2020-05-31 19:37:29
2020-05-31 19:40:13,057 fail2ban.server [5058]: INFO Shutdown in progress...
2020-05-31 19:40:13,057 fail2ban.server [5058]: INFO Stopping all jails
2020-05-31 19:40:13,058 fail2ban.filter [5058]: INFO Removed logfile: '/var/log/auth.log'
2020-05-31 19:40:13,259 fail2ban.actions [5058]: NOTICE [sshd] Flush ticket(s) with iptables-multiport
2020-05-31 19:40:13,267 fail2ban.utils [5058]: Level 39 7fa56955c420 -- exec: iptables -w -F f2b-sshd
2020-05-31 19:40:13,267 fail2ban.utils [5058]: ERROR 7fa56955c420 -- stderr: 'iptables: No chain/target/match by that name.'
2020-05-31 19:40:13,267 fail2ban.utils [5058]: ERROR 7fa56955c420 -- returned 1
2020-05-31 19:40:13,268 fail2ban [5058]: CRITICAL Unhandled exception in Fail2Ban:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/fail2ban/server/jailthread.py", line 69, in run_with_except_hook
run(*args, **kwargs)
File "/usr/lib/python3/dist-packages/fail2ban/server/actions.py", line 287, in run
self.__flushBan()
File "/usr/lib/python3/dist-packages/fail2ban/server/actions.py", line 464, in __flushBan
action.flush()
File "/usr/lib/python3/dist-packages/fail2ban/server/action.py", line 475, in flush
return self._executeOperation('<actionflush>', 'flushing', family=family)
File "/usr/lib/python3/dist-packages/fail2ban/server/action.py", line 381, in _executeOperation
raise RuntimeError("Error %s action %s/%s" % (operation, self._jail, self._name,))
RuntimeError: Error flushing action Jail('sshd')/iptables-multiport
2020-05-31 19:40:13,271 fail2ban.jail [5058]: INFO Jail 'sshd' stopped
The service appears to be running:
status fail2ban
● fail2ban.service - Fail2Ban Service
Loaded: loaded (/lib/systemd/system/fail2ban.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2020-05-31 20:19:05 CEST; 5min ago
I opened port 389 to allow my other sites to connect to the LDAP server. I think I added the rules before the error occurred:
ACCEPT tcp -- anywhere anywhere tcp dpt:ldap ctstate NEW,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp spt:ldap ctstate ESTABLISHED
Is this an issue or is fail2ban still working as expected? Thanks
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.