From BStegmaier

Jump to: navigation, search

Configuration

  • After a maximum of 3 retrys in the last 10 minutes the client gets baned for 24 hours.
/etc/fail2ban/jail.conf

[DEFAULT]
ignoreip = 127.0.0.1
bantime = 86400
findtime = 600
maxretry = 3

  • Filter for example ssh requests. sshd filter is predefined in /etc/fail2ban/filter.d/sshd.conf
/etc/fail2ban/jail.conf

[ssh]
enabled = true
port = ssh
filter = sshd
logpath = /var/log/auth.log
maxretry= 3

Links