• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • (Plesk for Windows):
    MySQL Connector/ODBC 3.51, 5.1, and 5.3 are no longer shipped with Plesk because they have reached end of life. MariaDB Connector/ODBC 64-bit 3.2.4 is now used instead.
  • Our UX team believes in the in the power of direct feedback and would like to invite you to participate in interviews, tests, and surveys.
    To stay in the loop and never miss an opportunity to share your thoughts, please subscribe to our UX research program. If you were previously part of the Plesk UX research program, please re-subscribe to continue receiving our invitations.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
Resource icon

Instruction [Fail2ban] Bash script to group multiple banned IP into subnets

Whenever you end-up with a large number of banned IP's in fail2ban you might want to know if there are multiple IP's banned from the same subnet. This scripts groups all banned IP's into /24 subnets.

By default the script returns all subnets...
You do not have permission to view the full content of this resource. Log in or register now.
Author
Kaspar
Views
35,784
First release
Last update
Rating
5.00 star(s) 2 ratings

Latest reviews

Now wouldn't it be great if this could be run as a cron job to automatically add these via the Plesk Fail2Ban CLI :)
The script addresses one major caveat of long-term ip banning: The number of iptables entries increases, and once it reaches a high number (e.g. >10,000), the kernel becomes quite busy with analyzing network traffic. For that reason it is essential to decrease the number of iptables entries. One method to achieve this is to group ip addresses by subnets, ban the subnets instead and remove the single ban entries from iptables. This script lets you identify the subnets easily that ought to be banned.
Back
Top