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.