Loading...
$title
pkg install py27-fail2ban nano

cd /usr/local/etc/fail2ban

cp jail.conf jail.local

sysrc fail2ban_enable="YES"

sysrc firewall_enable="YES"

sysrc firewall_type="open"

service fail2ban restart

nano fail2ban.local


Fail2ban SSH Port 22 (7 Days Banntime)


[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 = 3600
maxretry = 3