# pkg install py27-fail2ban
# cd /usr/local/etc/fail2ban
# cp jail.conf jail.local
# cp fail2ban.conf fail2ban.local
# echo >> jail.local
# vi jail.local


[ssh]
ignoreip = 127.0.0.1
enabled = true
port = ssh
filter = sshd
action = bsd-ipfw[table=22]
logpath = /var/log/auth.log
bantime = 3600
findtime = 1800
maxretry = 3


# echo 'fail2ban_enable="YES"' >> /etc/rc.conf
# echo 'firewall_enable="YES"' >> /etc/rc.conf
# echo 'firewall_type="open"' >> /etc/rc.conf
# service fail2ban start
# reboot