You will have to make changes to /etc/fail2ban/action.d/iptables-multiport.conf.
-
To have
fail2banblock the whole/24range 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