Home Blog CV Projects Patterns Notes Book Colophon Search

fail2ban

24 Apr, 2021

Finally, when setting up a Raspberry Pi, I install fail2ban which simply blocks IPs which fail to authenticate too many times.

sudo apt install fail2ban
sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
cat << EOF | sudo tee -a /etc/fail2ban/jail.local

[ssh]
enabled  = true
port     = ssh
filter   = sshd
logpath  = /var/log/auth.log
maxretry = 6
EOF
sudo service fail2ban restart

I also add fail2ban to the cron job I have for updating services.

Comments

Be the first to comment.

Add Comment





Copyright James Gardner 1996-2020 All Rights Reserved. Admin.