Installing fail2ban in a jail almost certainly cannot accomplish what you wish, by the way.
FreeNAS is an appliance; one does not install software into it. As Jailer said, you can create jails, and install software into those, but for something like fail2ban, these are probably not the droids you're looking for.
As
@Jailer said, you need to protect at the network edge, more than likely.