ZhangHuangbin wrote:Try to restart both iptables and fail2ban service, then check again.
Same result:
ubuntu@ip-172-30-0-85:~$ sudo service iptables restart
ubuntu@ip-172-30-0-85:~$ sudo service fail2ban restart
ubuntu@ip-172-30-0-85:~$ tail -f -n 10000 /var/log/syslog | egrep ' Ban '
Nov 19 10:03:12 mx1 fail2ban.actions[20231]: NOTICE [postfix-iredmail] Ban 62.141.46.24
Nov 19 10:03:13 mx1 fail2ban.actions[20231]: NOTICE [postfix-pregreet-iredmail] Ban 103.61.198.234
Nov 19 10:03:13 mx1 fail2ban.actions[20231]: NOTICE [postfix-pregreet-iredmail] Ban 103.76.190.210
Nov 19 10:03:14 mx1 fail2ban.actions[20231]: NOTICE [postfix-pregreet-iredmail] Ban 103.8.161.36
Nov 19 10:03:14 mx1 fail2ban.actions[20231]: NOTICE [postfix-pregreet-iredmail] Ban 112.218.231.43
Nov 19 10:03:15 mx1 fail2ban.actions[20231]: NOTICE [postfix-pregreet-iredmail] Ban 119.28.9.225
Nov 19 10:03:16 mx1 fail2ban.actions[20231]: NOTICE [postfix-pregreet-iredmail] Ban 129.213.228.12
Nov 19 10:03:17 mx1 fail2ban.actions[20231]: NOTICE [postfix-pregreet-iredmail] Ban 130.180.99.26
Nov 19 10:03:19 mx1 fail2ban.actions[20231]: NOTICE [postfix-pregreet-iredmail] Ban 177.126.119.190
Nov 19 10:03:21 mx1 fail2ban.actions[20231]: NOTICE [postfix-pregreet-iredmail] Ban 177.126.217.6
Nov 19 10:03:22 mx1 fail2ban.actions[20231]: NOTICE [postfix-pregreet-iredmail] Ban 177.223.13.34
Nov 19 10:03:23 mx1 fail2ban.actions[20231]: NOTICE [postfix-pregreet-iredmail] Ban 177.85.205.84
Nov 19 10:03:24 mx1 fail2ban.actions[20231]: NOTICE [postfix-pregreet-iredmail] Ban 178.205.106.172
Nov 19 10:03:25 mx1 fail2ban.actions[20231]: NOTICE [postfix-pregreet-iredmail] Ban 181.199.129.74
Nov 19 10:03:26 mx1 fail2ban.actions[20231]: NOTICE [postfix-pregreet-iredmail] Ban 181.209.74.74
Nov 19 10:03:27 mx1 fail2ban.actions[20231]: NOTICE [postfix-pregreet-iredmail] Ban 185.30.43.119
Nov 19 10:03:28 mx1 fail2ban.actions[20231]: NOTICE [postfix-pregreet-iredmail] Ban 186.204.70.166
Nov 19 10:03:29 mx1 fail2ban.actions[20231]: NOTICE [postfix-pregreet-iredmail] Ban 196.203.149.25
Nov 19 10:03:31 mx1 fail2ban.actions[20231]: NOTICE [postfix-pregreet-iredmail] Ban 197.210.141.22
Nov 19 10:03:32 mx1 fail2ban.actions[20231]: NOTICE [postfix-pregreet-iredmail] Ban 200.162.162.31
Nov 19 10:03:33 mx1 fail2ban.actions[20231]: NOTICE [postfix-pregreet-iredmail] Ban 201.20.88.130
Nov 19 10:03:34 mx1 fail2ban.actions[20231]: NOTICE [postfix-pregreet-iredmail] Ban 203.76.148.2
Nov 19 10:03:35 mx1 fail2ban.actions[20231]: NOTICE [postfix-pregreet-iredmail] Ban 49.248.77.194
Nov 19 10:03:35 mx1 fail2ban.actions[20231]: NOTICE [postfix-pregreet-iredmail] Ban 85.48.229.2
Nov 19 10:03:36 mx1 fail2ban.actions[20231]: NOTICE [postfix-pregreet-iredmail] Ban 88.119.221.196
Nov 19 10:03:37 mx1 fail2ban.actions[20231]: NOTICE [postfix-pregreet-iredmail] Ban 89.96.151.178
Nov 19 10:03:37 mx1 fail2ban.actions[20231]: NOTICE [postfix-pregreet-iredmail] Ban 91.122.37.92
Nov 19 10:03:38 mx1 fail2ban.actions[20231]: NOTICE [postfix-pregreet-iredmail] Ban 94.177.224.250
Nov 19 10:03:39 mx1 fail2ban.actions[20231]: NOTICE [postfix-pregreet-iredmail] Ban 95.38.211.139
^C
ubuntu@ip-172-30-0-85:~$ sudo iptables -n -L
Chain INPUT (policy DROP)
target prot opt source destination
f2b-postfix-sasl tcp -- 0.0.0.0/0 0.0.0.0/0 multiport dports 25,465,587,220,993,110,995
f2b-postfix tcp -- 0.0.0.0/0 0.0.0.0/0 multiport dports 80,443,25,587,110,995,143,993,4190
f2b-dovecot tcp -- 0.0.0.0/0 0.0.0.0/0 multiport dports 80,443,25,587,110,995,143,993,4190
f2b-roundcube tcp -- 0.0.0.0/0 0.0.0.0/0 multiport dports 80,443,25,587,110,995,143,993,4190
f2b-sshd-ddos tcp -- 0.0.0.0/0 0.0.0.0/0 multiport dports 22
f2b-sshd tcp -- 0.0.0.0/0 0.0.0.0/0 multiport dports 22
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmptype 8
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:443
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:25
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:587
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:110
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:995
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:143
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:993
Chain FORWARD (policy DROP)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain f2b-dovecot (1 references)
target prot opt source destination
RETURN all -- 0.0.0.0/0 0.0.0.0/0
Chain f2b-postfix (1 references)
target prot opt source destination
REJECT all -- 62.141.46.24 0.0.0.0/0 reject-with icmp-port-unreachable
RETURN all -- 0.0.0.0/0 0.0.0.0/0
Chain f2b-postfix-sasl (1 references)
target prot opt source destination
RETURN all -- 0.0.0.0/0 0.0.0.0/0
Chain f2b-roundcube (1 references)
target prot opt source destination
RETURN all -- 0.0.0.0/0 0.0.0.0/0
Chain f2b-sshd (1 references)
target prot opt source destination
RETURN all -- 0.0.0.0/0 0.0.0.0/0
Chain f2b-sshd-ddos (1 references)
target prot opt source destination
RETURN all -- 0.0.0.0/0 0.0.0.0/0
ubuntu@ip-172-30-0-85:~$