Fail2ban SSH

two bullet surveillance cameras attached on wall
apt-get install fail2ban -y

cd /etc/fail2ban/
vi jail.local

 

[DEFAULT]
ignoreip = 127.0.0.1/8

#
# JAILS
#

#
# SSH servers
#

[sshd]

enabled = true
filter = sshd
port    = ssh
banaction = iptables-multiport
bantime = 3600
maxretry = 1
logpath = %(sshd_log)s
backend = %(sshd_backend)s
/etc/init.d/fail2ban restart

Done! 🙂

Leave a Comment

Your email address will not be published.