Showing posts with label Notes on fail2ban. Show all posts
Showing posts with label Notes on fail2ban. Show all posts

Thursday, February 22, 2024

Notes on fail2ban

The software "fail2ban" is similar to DenyHosts but more general as it is not only intended for SSHD protection.


Installation

On Debian-based system, issue the command:

sudo apt-get install fail2ban -y


On Fedora-based system, issue the command:

sudo dnf install fail2ban -y


Configuration

The following sample configuration for SSHD are as follows (/etc/fail2ban/):

 

[sshd]
enabled = true
port = ssh
filter = sshd
logpath = /var/log/auth.log
maxretry = 3
findtime = 300
bantime = 28800
ignoreip = 127.0.0.1