Have fail2ban block the whole range

in Servers


You will have to make changes to /etc/fail2ban/action.d/iptables-multiport.conf.

  • To have fail2ban block the whole /24 range on every ban:

    actionban = -I f2b- 1 -s /24 -j

  • To go back to blocking a single IP instead of the whole subnet:

    actionban = -I f2b- 1 -s -j

#debian