• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • 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.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.
Resource icon

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

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