mirror of https://github.com/fail2ban/fail2ban
Page:
How to install fail2ban packages
Pages
Ban IP addresses on shared hosting where Fail2ban is not available
Best practice
Developing Regex in Fail2ban
Fail2Ban and Docker
Home
How fail2ban substitution resp. runtime interpolation works
How fail2ban works
How to ban something other as host (IP address), like user or mail, etc.
How to install fail2ban packages
How to install or upgrade fail2ban manually
How to test newer fail2ban version resp. use fail2ban standalone instance
Proper fail2ban configuration
Properly fail2ban configuration
Troubleshooting
Upgrading to v0.10.5 Breaks WP Fail2ban and Other Jails
4
How to install fail2ban packages
Sergey G. Brester edited this page 2023-06-01 16:57:11 +02:00
CentOS / CentOS Stream / RHEL Based Operating Systems
Ensure your system is up to date and install the EPEL repository:
yum update -y && yum install epel-release -y
Install Fail2Ban:
yum install fail2ban
Start and enable Fail2ban:
systemctl start fail2ban
systemctl enable fail2ban
If you encounter the error that there is no directory /var/run/fail2ban to contain the socket file /var/run/fail2ban/fail2ban.sock
, create the directory manually:
mkdir /var/run/fail2ban
Debian / Ubuntu
Ensure your system is up to date:
apt update && apt upgrade
Install Fail2ban:
apt install fail2ban
The service automatically starts.
Fedora
Update your system:
dnf update
Install Fail2ban:
dnf install fail2ban
Start and enable Fail2ban:
systemctl start fail2ban
systemctl enable fail2ban
if your system is not listed
Try to find fail2ban packaged for your distribution using a package management of your OS.
You could also try to install it manually.