mirror of https://github.com/fail2ban/fail2ban
small review (added ToC, remove unneeded details or optional stuff)
parent
cd852d2cce
commit
7066edf763
|
@ -1,4 +1,9 @@
|
||||||
## CentOS/CentOS Stream/RHEL Based Operating Systems
|
- [CentOS / RHEL Based](#[centoscentos-streamrhel-based-operating-systems](#centos--centos-stream--rhel-based-operating-systems))
|
||||||
|
- [Debian / Ubuntu](#debian--ubuntu)
|
||||||
|
- [Fedora](#fedora)
|
||||||
|
- [another](#if-your-system-is-not-listed)
|
||||||
|
|
||||||
|
## CentOS / CentOS Stream / RHEL Based Operating Systems
|
||||||
|
|
||||||
Ensure your system is up to date and install the EPEL repository:
|
Ensure your system is up to date and install the EPEL repository:
|
||||||
|
|
||||||
|
@ -8,42 +13,27 @@ Install Fail2Ban:
|
||||||
|
|
||||||
yum install fail2ban
|
yum install fail2ban
|
||||||
|
|
||||||
For email support, install Sendmail:
|
Start and enable Fail2ban:
|
||||||
|
|
||||||
yum install sendmail
|
|
||||||
|
|
||||||
Start and enable Fail2ban and, if needed, Sendmail:
|
|
||||||
|
|
||||||
systemctl start fail2ban
|
systemctl start fail2ban
|
||||||
systemctl enable fail2ban
|
systemctl enable fail2ban
|
||||||
systemctl start sendmail
|
|
||||||
systemctl enable sendmail
|
|
||||||
|
|
||||||
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:
|
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
|
mkdir /var/run/fail2ban
|
||||||
|
|
||||||
## Debian
|
## Debian / Ubuntu
|
||||||
|
|
||||||
Ensure your system is up to date:
|
Ensure your system is up to date:
|
||||||
|
|
||||||
apt-get update && apt-get upgrade -y
|
apt update && apt upgrade
|
||||||
|
|
||||||
Install Fail2ban:
|
Install Fail2ban:
|
||||||
|
|
||||||
apt-get install fail2ban
|
apt install fail2ban
|
||||||
|
|
||||||
The service automatically starts.
|
The service automatically starts.
|
||||||
|
|
||||||
For email support, install Sendmail:
|
|
||||||
|
|
||||||
apt-get install sendmail-bin sendmail
|
|
||||||
|
|
||||||
The current version of Sendmail in Debian Jessie has an upstream bug which causes the following errors when installing sendmail-bin. The installation hangs for a minute, but then complete.
|
|
||||||
|
|
||||||
Creating /etc/mail/sendmail.cf...
|
|
||||||
ERROR: FEATURE() should be before MAILER() MAILER('local') must appear after FEATURE('always_add_domain')
|
|
||||||
ERROR: FEATURE() should be before MAILER() MAILER('local') must appear after FEATURE('allmasquerade')
|
|
||||||
|
|
||||||
## Fedora
|
## Fedora
|
||||||
|
|
||||||
Update your system:
|
Update your system:
|
||||||
|
@ -54,38 +44,13 @@ Install Fail2ban:
|
||||||
|
|
||||||
dnf install fail2ban
|
dnf install fail2ban
|
||||||
|
|
||||||
For email support, install Sendmail:
|
Start and enable Fail2ban:
|
||||||
|
|
||||||
dnf install sendmail
|
|
||||||
|
|
||||||
Start and enable Fail2ban and, if needed, Sendmail:
|
|
||||||
|
|
||||||
systemctl start fail2ban
|
systemctl start fail2ban
|
||||||
systemctl enable fail2ban
|
systemctl enable fail2ban
|
||||||
systemctl start sendmail
|
|
||||||
systemctl enable sendmail
|
|
||||||
|
|
||||||
## Ubuntu
|
|
||||||
|
|
||||||
Ensure your system is up to date:
|
|
||||||
|
|
||||||
apt-get update && apt-get upgrade -y
|
|
||||||
|
|
||||||
Install Fail2ban:
|
|
||||||
|
|
||||||
apt-get install fail2ban
|
|
||||||
|
|
||||||
The service automatically starts.
|
|
||||||
|
|
||||||
For email support, install Sendmail:
|
|
||||||
|
|
||||||
apt-get install sendmail
|
|
||||||
|
|
||||||
Allow SSH access through UFW and then enable the firewall:
|
|
||||||
|
|
||||||
ufw allow ssh
|
|
||||||
ufw enable
|
|
||||||
|
|
||||||
## if your system is not listed
|
## if your system is not listed
|
||||||
|
|
||||||
You can [install the packages manually](https://github.com/fail2ban/fail2ban).
|
Try to find fail2ban packaged for your distribution using a package management of your OS.
|
||||||
|
|
||||||
|
You could also try to install it [manually](How-to-install-or-upgrade-fail2ban-manually).
|
Loading…
Reference in New Issue