• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved How to ban IP range with fail2ban

CoyoteKG

Regular Pleskian
Hello,
I have too many logging attempts from 91.200.12.*
But fail2ban not banned that IP because every time is diferent IP.

I want to add it manually, but I can't find that option in plesk.
Also before this post I tried to find a way in your documentation, and without success.

In attachment you can find log with those attempts.
Also this is my plesk-postfix jail. It is default

Code:
[plesk-postfix]
enabled = true
filter = postfix-sasl
action = iptables-multiport[name="plesk-postfix", port="smtp,smtps,submission"]
sendmail-common[dest="[email protected]", sender="fail2ban", sendername="Fail2Ban"]
logpath = /var/log/maillog
maxretry = 3

and this is acction

Code:
iptables-multiport[name="plesk-postfix", port="smtp,smtps,submission"]
sendmail-common[dest="[email protected]", sender="fail2ban", sendername="Fail2Ban"]

So, how to block everything from 91.200.* ?
 

Attachments

  • fail2ban.log
    187.9 KB · Views: 1
Hi, thx for help,
I blocked with
Code:
iptables -A INPUT -s 91.200.0.0/16 -j DROP

I just though that is possible to do via Plesk interface.
 
Hm, that range is not yet blocked
upload_2016-7-25_11-55-36.png


upload_2016-7-25_11-55-9.png


edit:
I deleted previous rule, and added new one at the beginning of chain with -I
Code:
iptables -A INPUT -s 91.200.0.0/16 -j DROP
 
Last edited:
  • Like
Reactions: B_P
Back
Top