1

Topic: iptables went a bit bananas

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.5
- Linux/BSD distribution name and version: CentOS 6
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx):Apache
- Manage mail accounts with iRedAdmin-Pro?no
- Related log if you're reporting an issue: /var/log/messages
====

Hello,

I was enjoying my dinner while my wife complained to me (I use iRedMail for personal use, sorry!) that the email was not working and she couldn't connect even to the website. I had a look and it was true! All of the sudden! So i stopped iptables and now it works. I checked in the logs and i found some strange entries.

Any help would be wonderful!

Thanks.

cat /var/log/messages | grep iptables
Sep 11 18:54:13 vps fail2ban.action[1279]: ERROR iptables  -D INPUT -p tcp -m multiport --dports http,https,smtp,submission,pop3,pop3s,imap,imaps,sieve -j f2b-roundcube#012iptables  -F f2b-roundcube#012iptables  -X f2b-roundcube -- stdout: ''
Sep 11 18:54:13 vps fail2ban.action[1279]: ERROR iptables  -D INPUT -p tcp -m multiport --dports http,https,smtp,submission,pop3,pop3s,imap,imaps,sieve -j f2b-roundcube#012iptables  -F f2b-roundcube#012iptables  -X f2b-roundcube -- stderr: "iptables v1.4.7: Couldn't load target `f2b-roundcube':/lib64/xtables/libipt_f2b-roundcube.so: cannot open shared object file: No such file or directory\n\nTry `iptables -h' or 'iptables --help' for more information.\niptables: No chain/target/match by that name.\niptables: No chain/target/match by that name.\n"
Sep 11 18:54:13 vps fail2ban.action[1279]: ERROR iptables  -D INPUT -p tcp -m multiport --dports http,https,smtp,submission,pop3,pop3s,imap,imaps,sieve -j f2b-roundcube#012iptables  -F f2b-roundcube#012iptables  -X f2b-roundcube -- returned 1
Sep 11 18:54:13 vps fail2ban.actions[1279]: ERROR Failed to stop jail 'roundcube-iredmail' action 'iptables-multiport': Error stopping action
Sep 11 18:54:13 vps fail2ban.action[1279]: ERROR iptables  -D INPUT -p tcp -m multiport --dports 22 -j f2b-sshd#012iptables  -F f2b-sshd#012iptables  -X f2b-sshd -- stdout: ''
Sep 11 18:54:13 vps fail2ban.action[1279]: ERROR iptables  -D INPUT -p tcp -m multiport --dports 22 -j f2b-sshd#012iptables  -F f2b-sshd#012iptables  -X f2b-sshd -- stderr: "iptables v1.4.7: Couldn't load target `f2b-sshd':/lib64/xtables/libipt_f2b-sshd.so: cannot open shared object file: No such file or directory\n\nTry `iptables -h' or 'iptables --help' for more information.\niptables: No chain/target/match by that name.\niptables: No chain/target/match by that name.\n"
Sep 11 18:54:13 vps fail2ban.action[1279]: ERROR iptables  -D INPUT -p tcp -m multiport --dports 22 -j f2b-sshd#012iptables  -F f2b-sshd#012iptables  -X f2b-sshd -- returned 1
Sep 11 18:54:13 vps fail2ban.actions[1279]: ERROR Failed to stop jail 'sshd' action 'iptables-multiport': Error stopping action
Sep 11 18:54:14 vps fail2ban.action[1279]: ERROR iptables  -D INPUT -p tcp -m multiport --dports http,https,smtp,submission,pop3,pop3s,imap,imaps,sieve -j f2b-sogo#012iptables  -F f2b-sogo#012iptables  -X f2b-sogo -- stdout: ''
Sep 11 18:54:14 vps fail2ban.action[1279]: ERROR iptables  -D INPUT -p tcp -m multiport --dports http,https,smtp,submission,pop3,pop3s,imap,imaps,sieve -j f2b-sogo#012iptables  -F f2b-sogo#012iptables  -X f2b-sogo -- stderr: "iptables v1.4.7: Couldn't load target `f2b-sogo':/lib64/xtables/libipt_f2b-sogo.so: cannot open shared object file: No such file or directory\n\nTry `iptables -h' or 'iptables --help' for more information.\niptables: No chain/target/match by that name.\niptables: No chain/target/match by that name.\n"
Sep 11 18:54:14 vps fail2ban.action[1279]: ERROR iptables  -D INPUT -p tcp -m multiport --dports http,https,smtp,submission,pop3,pop3s,imap,imaps,sieve -j f2b-sogo#012iptables  -F f2b-sogo#012iptables  -X f2b-sogo -- returned 1
Sep 11 18:54:14 vps fail2ban.actions[1279]: ERROR Failed to stop jail 'sogo-iredmail' action 'iptables-multiport': Error stopping action
Sep 11 18:54:15 vps fail2ban.action[1279]: ERROR iptables  -D INPUT -p tcp -m multiport --dports http,https,smtp,submission,pop3,pop3s,imap,imaps,sieve -j f2b-postfix#012iptables  -F f2b-postfix#012iptables  -X f2b-postfix -- stdout: ''
Sep 11 18:54:15 vps fail2ban.action[1279]: ERROR iptables  -D INPUT -p tcp -m multiport --dports http,https,smtp,submission,pop3,pop3s,imap,imaps,sieve -j f2b-postfix#012iptables  -F f2b-postfix#012iptables  -X f2b-postfix -- stderr: "iptables v1.4.7: Couldn't load target `f2b-postfix':/lib64/xtables/libipt_f2b-postfix.so: cannot open shared object file: No such file or directory\n\nTry `iptables -h' or 'iptables --help' for more information.\niptables: No chain/target/match by that name.\niptables: No chain/target/match by that name.\n"
Sep 11 18:54:15 vps fail2ban.action[1279]: ERROR iptables  -D INPUT -p tcp -m multiport --dports http,https,smtp,submission,pop3,pop3s,imap,imaps,sieve -j f2b-postfix#012iptables  -F f2b-postfix#012iptables  -X f2b-postfix -- returned 1
Sep 11 18:54:15 vps fail2ban.actions[1279]: ERROR Failed to stop jail 'postfix-iredmail' action 'iptables-multiport': Error stopping action
Sep 11 18:54:16 vps fail2ban.action[1279]: ERROR iptables  -D INPUT -p tcp -m multiport --dports http,https,smtp,submission,pop3,pop3s,imap,imaps,sieve -j f2b-dovecot#012iptables  -F f2b-dovecot#012iptables  -X f2b-dovecot -- stdout: ''
Sep 11 18:54:16 vps fail2ban.action[1279]: ERROR iptables  -D INPUT -p tcp -m multiport --dports http,https,smtp,submission,pop3,pop3s,imap,imaps,sieve -j f2b-dovecot#012iptables  -F f2b-dovecot#012iptables  -X f2b-dovecot -- stderr: "iptables v1.4.7: Couldn't load target `f2b-dovecot':/lib64/xtables/libipt_f2b-dovecot.so: cannot open shared object file: No such file or directory\n\nTry `iptables -h' or 'iptables --help' for more information.\niptables: No chain/target/match by that name.\niptables: No chain/target/match by that name.\n"
Sep 11 18:54:16 vps fail2ban.action[1279]: ERROR iptables  -D INPUT -p tcp -m multiport --dports http,https,smtp,submission,pop3,pop3s,imap,imaps,sieve -j f2b-dovecot#012iptables  -F f2b-dovecot#012iptables  -X f2b-dovecot -- returned 1
Sep 11 18:54:16 vps fail2ban.actions[1279]: ERROR Failed to stop jail 'dovecot-iredmail' action 'iptables-multiport': Error stopping action
Sep 11 18:54:17 vps fail2ban.action[1279]: ERROR iptables  -D INPUT -p tcp -m multiport --dports 22 -j f2b-sshd-ddos#012iptables  -F f2b-sshd-ddos#012iptables  -X f2b-sshd-ddos -- stdout: ''
Sep 11 18:54:17 vps fail2ban.action[1279]: ERROR iptables  -D INPUT -p tcp -m multiport --dports 22 -j f2b-sshd-ddos#012iptables  -F f2b-sshd-ddos#012iptables  -X f2b-sshd-ddos -- stderr: "iptables v1.4.7: Couldn't load target `f2b-sshd-ddos':/lib64/xtables/libipt_f2b-sshd-ddos.so: cannot open shared object file: No such file or directory\n\nTry `iptables -h' or 'iptables --help' for more information.\niptables: No chain/target/match by that name.\niptables: No chain/target/match by that name.\n"
Sep 11 18:54:17 vps fail2ban.action[1279]: ERROR iptables  -D INPUT -p tcp -m multiport --dports 22 -j f2b-sshd-ddos#012iptables  -F f2b-sshd-ddos#012iptables  -X f2b-sshd-ddos -- returned 1
Sep 11 18:54:17 vps fail2ban.actions[1279]: ERROR Failed to stop jail 'sshd-ddos' action 'iptables-multiport': Error stopping action
Sep 12 22:47:00 vps fail2ban.action[1297]: ERROR iptables  -n -L INPUT | grep -q 'f2b-dovecot[ \t]' -- stdout: ''
Sep 12 22:47:00 vps fail2ban.action[1297]: ERROR iptables  -n -L INPUT | grep -q 'f2b-dovecot[ \t]' -- stderr: ''
Sep 12 22:47:00 vps fail2ban.action[1297]: ERROR iptables  -n -L INPUT | grep -q 'f2b-dovecot[ \t]' -- returned 1
Sep 12 22:47:00 vps fail2ban.action[1297]: ERROR iptables  -D INPUT -p tcp -m multiport --dports http,https,smtp,submission,pop3,pop3s,imap,imaps,sieve -j f2b-dovecot#012iptables  -F f2b-dovecot#012iptables  -X f2b-dovecot -- stdout: ''
Sep 12 22:47:00 vps fail2ban.action[1297]: ERROR iptables  -D INPUT -p tcp -m multiport --dports http,https,smtp,submission,pop3,pop3s,imap,imaps,sieve -j f2b-dovecot#012iptables  -F f2b-dovecot#012iptables  -X f2b-dovecot -- stderr: "iptables v1.4.7: Couldn't load target `f2b-dovecot':/lib64/xtables/libipt_f2b-dovecot.so: cannot open shared object file: No such file or directory\n\nTry `iptables -h' or 'iptables --help' for more information.\niptables: No chain/target/match by that name.\niptables: No chain/target/match by that name.\n"
Sep 12 22:47:00 vps fail2ban.action[1297]: ERROR iptables  -D INPUT -p tcp -m multiport --dports http,https,smtp,submission,pop3,pop3s,imap,imaps,sieve -j f2b-dovecot#012iptables  -F f2b-dovecot#012iptables  -X f2b-dovecot -- returned 1
Sep 12 22:47:00 vps fail2ban.actions[1297]: ERROR Failed to execute ban jail 'dovecot-iredmail' action 'iptables-multiport' info 'CallingMap({'ipjailmatches': <function <lambda> at 0x243c8c0>, 'matches': u'Sep 12 22:44:18 imap-login: Info: Aborted login (auth failed, 2 attempts in 0 secs): user=<>, method=LOGIN, rip=94.210.16.163, lip=212.24.106.208, TLS: Disconnected, session=<mE3KuFQ8BgBe0hCj>\nSep 12 22:44:19 imap-login: Info: Aborted login (auth failed, 4 attempts in 1 secs): user=<>, method=LOGIN, rip=94.210.16.163, lip=212.24.106.208, TLS: Disconnected, session=<jMzIuFQ8BwBe0hCj>\nSep 12 22:44:19 imap-login: Info: Aborted login (auth failed, 2 attempts in 0 secs): user=<>, method=LOGIN, rip=94.210.16.163, lip=212.24.106.208, TLS: Disconnected, session=<IZbRuFQ8CABe0hCj>\nSep 12 22:46:56 imap-login: Info: Aborted login (auth failed, 2 attempts in 0 secs): user=<>, method=LOGIN, rip=94.210.16.163, lip=212.24.106.208, TLS: Disconnected, session=<eCA2wlQ8TwBe0hCj>\nSep 12 22:46:59 imap-login: Info: Aborted login (auth failed, 2 attempts in 0 secs): user=<>, method=LOGIN, rip=94.210.16.163, lip=212.24.106.208, TLS: Disconnected, session=<TFVfwlQ8UgBe0hCj>', 'ip': '94.210.16.163', 'ipmatches': <function <lambda> at 0x243c848>, 'ipfailures': <function <lambda> at 0x243c938>, 'time': 1473709620.342418, 'failures': 5, 'ipjailfailures': <function <lambda> at 0x243c9b0>})': Error stopping action
Sep 13 22:47:00 vps fail2ban.action[1297]: ERROR iptables  -n -L INPUT | grep -q 'f2b-dovecot[ \t]' -- stdout: ''
Sep 13 22:47:00 vps fail2ban.action[1297]: ERROR iptables  -n -L INPUT | grep -q 'f2b-dovecot[ \t]' -- stderr: ''
Sep 13 22:47:00 vps fail2ban.action[1297]: ERROR iptables  -n -L INPUT | grep -q 'f2b-dovecot[ \t]' -- returned 1
Sep 13 22:47:00 vps fail2ban.action[1297]: ERROR iptables  -D INPUT -p tcp -m multiport --dports http,https,smtp,submission,pop3,pop3s,imap,imaps,sieve -j f2b-dovecot#012iptables  -F f2b-dovecot#012iptables  -X f2b-dovecot -- stdout: ''
Sep 13 22:47:00 vps fail2ban.action[1297]: ERROR iptables  -D INPUT -p tcp -m multiport --dports http,https,smtp,submission,pop3,pop3s,imap,imaps,sieve -j f2b-dovecot#012iptables  -F f2b-dovecot#012iptables  -X f2b-dovecot -- stderr: "iptables v1.4.7: Couldn't load target `f2b-dovecot':/lib64/xtables/libipt_f2b-dovecot.so: cannot open shared object file: No such file or directory\n\nTry `iptables -h' or 'iptables --help' for more information.\niptables: No chain/target/match by that name.\niptables: No chain/target/match by that name.\n"
Sep 13 22:47:00 vps fail2ban.action[1297]: ERROR iptables  -D INPUT -p tcp -m multiport --dports http,https,smtp,submission,pop3,pop3s,imap,imaps,sieve -j f2b-dovecot#012iptables  -F f2b-dovecot#012iptables  -X f2b-dovecot -- returned 1
Sep 13 22:47:00 vps fail2ban.actions[1297]: ERROR Failed to execute unban jail 'dovecot-iredmail' action 'iptables-multiport' info '{'matches': u'Sep 12 22:44:18 imap-login: Info: Aborted login (auth failed, 2 attempts in 0 secs): user=<>, method=LOGIN, rip=94.210.16.163, lip=212.24.106.208, TLS: Disconnected, session=<mE3KuFQ8BgBe0hCj>Sep 12 22:44:19 imap-login: Info: Aborted login (auth failed, 4 attempts in 1 secs): user=<>, method=LOGIN, rip=94.210.16.163, lip=212.24.106.208, TLS: Disconnected, session=<jMzIuFQ8BwBe0hCj>Sep 12 22:44:19 imap-login: Info: Aborted login (auth failed, 2 attempts in 0 secs): user=<>, method=LOGIN, rip=94.210.16.163, lip=212.24.106.208, TLS: Disconnected, session=<IZbRuFQ8CABe0hCj>Sep 12 22:46:56 imap-login: Info: Aborted login (auth failed, 2 attempts in 0 secs): user=<>, method=LOGIN, rip=94.210.16.163, lip=212.24.106.208, TLS: Disconnected, session=<eCA2wlQ8TwBe0hCj>Sep 12 22:46:59 imap-login: Info: Aborted login (auth failed, 2 attempts in 0 secs): user=<>, method=LOGIN, rip=94.210.16.163, lip=212.24.106.208, TLS: Disconnected, session=<TFVfwlQ8UgBe0hCj>', 'ip': '94.210.16.163', 'time': 1473709620.342418, 'failures': 5}': Error stopping action
Sep 14 16:49:17 vps fail2ban.action[1297]: ERROR iptables  -D INPUT -p tcp -m multiport --dports http,https,smtp,submission,pop3,pop3s,imap,imaps,sieve -j f2b-roundcube#012iptables  -F f2b-roundcube#012iptables  -X f2b-roundcube -- stdout: ''
Sep 14 16:49:17 vps fail2ban.action[1297]: ERROR iptables  -D INPUT -p tcp -m multiport --dports http,https,smtp,submission,pop3,pop3s,imap,imaps,sieve -j f2b-roundcube#012iptables  -F f2b-roundcube#012iptables  -X f2b-roundcube -- stderr: "iptables v1.4.7: Couldn't load target `f2b-roundcube':/lib64/xtables/libipt_f2b-roundcube.so: cannot open shared object file: No such file or directory\n\nTry `iptables -h' or 'iptables --help' for more information.\niptables: No chain/target/match by that name.\niptables: No chain/target/match by that name.\n"
Sep 14 16:49:17 vps fail2ban.action[1297]: ERROR iptables  -D INPUT -p tcp -m multiport --dports http,https,smtp,submission,pop3,pop3s,imap,imaps,sieve -j f2b-roundcube#012iptables  -F f2b-roundcube#012iptables  -X f2b-roundcube -- returned 1
Sep 14 16:49:17 vps fail2ban.actions[1297]: ERROR Failed to stop jail 'roundcube-iredmail' action 'iptables-multiport': Error stopping action
Sep 14 16:49:18 vps fail2ban.action[1297]: ERROR iptables  -D INPUT -p tcp -m multiport --dports 22 -j f2b-sshd#012iptables  -F f2b-sshd#012iptables  -X f2b-sshd -- stdout: ''
Sep 14 16:49:18 vps fail2ban.action[1297]: ERROR iptables  -D INPUT -p tcp -m multiport --dports 22 -j f2b-sshd#012iptables  -F f2b-sshd#012iptables  -X f2b-sshd -- stderr: "iptables v1.4.7: Couldn't load target `f2b-sshd':/lib64/xtables/libipt_f2b-sshd.so: cannot open shared object file: No such file or directory\n\nTry `iptables -h' or 'iptables --help' for more information.\niptables: No chain/target/match by that name.\niptables: No chain/target/match by that name.\n"
Sep 14 16:49:18 vps fail2ban.action[1297]: ERROR iptables  -D INPUT -p tcp -m multiport --dports 22 -j f2b-sshd#012iptables  -F f2b-sshd#012iptables  -X f2b-sshd -- returned 1
Sep 14 16:49:18 vps fail2ban.actions[1297]: ERROR Failed to stop jail 'sshd' action 'iptables-multiport': Error stopping action
Sep 14 16:49:19 vps fail2ban.action[1297]: ERROR iptables  -D INPUT -p tcp -m multiport --dports http,https,smtp,submission,pop3,pop3s,imap,imaps,sieve -j f2b-sogo#012iptables  -F f2b-sogo#012iptables  -X f2b-sogo -- stdout: ''
Sep 14 16:49:19 vps fail2ban.action[1297]: ERROR iptables  -D INPUT -p tcp -m multiport --dports http,https,smtp,submission,pop3,pop3s,imap,imaps,sieve -j f2b-sogo#012iptables  -F f2b-sogo#012iptables  -X f2b-sogo -- stderr: "iptables v1.4.7: Couldn't load target `f2b-sogo':/lib64/xtables/libipt_f2b-sogo.so: cannot open shared object file: No such file or directory\n\nTry `iptables -h' or 'iptables --help' for more information.\niptables: No chain/target/match by that name.\niptables: No chain/target/match by that name.\n"
Sep 14 16:49:19 vps fail2ban.action[1297]: ERROR iptables  -D INPUT -p tcp -m multiport --dports http,https,smtp,submission,pop3,pop3s,imap,imaps,sieve -j f2b-sogo#012iptables  -F f2b-sogo#012iptables  -X f2b-sogo -- returned 1
Sep 14 16:49:19 vps fail2ban.actions[1297]: ERROR Failed to stop jail 'sogo-iredmail' action 'iptables-multiport': Error stopping action
Sep 14 16:49:19 vps fail2ban.action[1297]: ERROR iptables  -D INPUT -p tcp -m multiport --dports http,https,smtp,submission,pop3,pop3s,imap,imaps,sieve -j f2b-postfix#012iptables  -F f2b-postfix#012iptables  -X f2b-postfix -- stdout: ''
Sep 14 16:49:19 vps fail2ban.action[1297]: ERROR iptables  -D INPUT -p tcp -m multiport --dports http,https,smtp,submission,pop3,pop3s,imap,imaps,sieve -j f2b-postfix#012iptables  -F f2b-postfix#012iptables  -X f2b-postfix -- stderr: "iptables v1.4.7: Couldn't load target `f2b-postfix':/lib64/xtables/libipt_f2b-postfix.so: cannot open shared object file: No such file or directory\n\nTry `iptables -h' or 'iptables --help' for more information.\niptables: No chain/target/match by that name.\niptables: No chain/target/match by that name.\n"
Sep 14 16:49:19 vps fail2ban.action[1297]: ERROR iptables  -D INPUT -p tcp -m multiport --dports http,https,smtp,submission,pop3,pop3s,imap,imaps,sieve -j f2b-postfix#012iptables  -F f2b-postfix#012iptables  -X f2b-postfix -- returned 1
Sep 14 16:49:19 vps fail2ban.actions[1297]: ERROR Failed to stop jail 'postfix-iredmail' action 'iptables-multiport': Error stopping action
Sep 14 16:49:20 vps fail2ban.action[1297]: ERROR iptables  -D INPUT -p tcp -m multiport --dports http,https,smtp,submission,pop3,pop3s,imap,imaps,sieve -j f2b-dovecot#012iptables  -F f2b-dovecot#012iptables  -X f2b-dovecot -- stdout: ''
Sep 14 16:49:20 vps fail2ban.action[1297]: ERROR iptables  -D INPUT -p tcp -m multiport --dports http,https,smtp,submission,pop3,pop3s,imap,imaps,sieve -j f2b-dovecot#012iptables  -F f2b-dovecot#012iptables  -X f2b-dovecot -- stderr: "iptables v1.4.7: Couldn't load target `f2b-dovecot':/lib64/xtables/libipt_f2b-dovecot.so: cannot open shared object file: No such file or directory\n\nTry `iptables -h' or 'iptables --help' for more information.\niptables: No chain/target/match by that name.\niptables: No chain/target/match by that name.\n"
Sep 14 16:49:20 vps fail2ban.action[1297]: ERROR iptables  -D INPUT -p tcp -m multiport --dports http,https,smtp,submission,pop3,pop3s,imap,imaps,sieve -j f2b-dovecot#012iptables  -F f2b-dovecot#012iptables  -X f2b-dovecot -- returned 1
Sep 14 16:49:20 vps fail2ban.actions[1297]: ERROR Failed to stop jail 'dovecot-iredmail' action 'iptables-multiport': Error stopping action
Sep 14 16:49:21 vps fail2ban.action[1297]: ERROR iptables  -D INPUT -p tcp -m multiport --dports 22 -j f2b-sshd-ddos#012iptables  -F f2b-sshd-ddos#012iptables  -X f2b-sshd-ddos -- stdout: ''
Sep 14 16:49:21 vps fail2ban.action[1297]: ERROR iptables  -D INPUT -p tcp -m multiport --dports 22 -j f2b-sshd-ddos#012iptables  -F f2b-sshd-ddos#012iptables  -X f2b-sshd-ddos -- stderr: "iptables v1.4.7: Couldn't load target `f2b-sshd-ddos':/lib64/xtables/libipt_f2b-sshd-ddos.so: cannot open shared object file: No such file or directory\n\nTry `iptables -h' or 'iptables --help' for more information.\niptables: No chain/target/match by that name.\niptables: No chain/target/match by that name.\n"
Sep 14 16:49:21 vps fail2ban.action[1297]: ERROR iptables  -D INPUT -p tcp -m multiport --dports 22 -j f2b-sshd-ddos#012iptables  -F f2b-sshd-ddos#012iptables  -X f2b-sshd-ddos -- returned 1
Sep 14 16:49:21 vps fail2ban.actions[1297]: ERROR Failed to stop jail 'sshd-ddos' action 'iptables-multiport': Error stopping action

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: iptables went a bit bananas

Restart both iptables and fail2ban services should fix it.

3

Re: iptables went a bit bananas

ZhangHuangbin wrote:

Restart both iptables and fail2ban services should fix it.


you were right! even though i restarted the whole server twice, restarting the services actually fix the problem.

Thanks a lot!