From 217f404b22a7fc4f013f66b0bfaa10373503bad0 Mon Sep 17 00:00:00 2001 From: Sean Danischevsky <32126021+seaniedan@users.noreply.github.com> Date: Wed, 31 May 2023 23:13:48 +0100 Subject: [PATCH 1/2] Update README.md add install instructions for popular linux distributions --- README.md | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 91 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f9b1375c..3490e8d3 100644 --- a/README.md +++ b/README.md @@ -29,8 +29,97 @@ and the website: https://www.fail2ban.org Installation: ------------- -**It is possible that Fail2Ban is already packaged for your distribution. In -this case, you should use that instead.** +Fail2Ban is likely already packaged for your Linux distribution: + +*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 + +For email support, install Sendmail: + + yum install sendmail + +Start and enable Fail2ban and, if needed, Sendmail: + + systemctl start 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: + + mkdir /var/run/fail2ban + +*Debian* + +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-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* + +Update your system: + + dnf update + +Install Fail2ban: + + dnf install fail2ban + +For email support, install Sendmail: + + dnf install sendmail + +Start and enable Fail2ban and, if needed, Sendmail: + + systemctl start 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 distribution is not listed, you can install from GitHub:* Required: - [Python2 >= 2.7 or Python >= 3.2](https://www.python.org) or [PyPy](https://pypy.org) From 5cd4c5a29f2b450836f8288776c6f3eed8e1258d Mon Sep 17 00:00:00 2001 From: Sean Danischevsky <32126021+seaniedan@users.noreply.github.com> Date: Thu, 1 Jun 2023 09:47:53 +0100 Subject: [PATCH 2/2] Update README.md added link to wiki page install instructions --- README.md | 92 ++----------------------------------------------------- 1 file changed, 2 insertions(+), 90 deletions(-) diff --git a/README.md b/README.md index 3490e8d3..c17db7be 100644 --- a/README.md +++ b/README.md @@ -29,97 +29,9 @@ and the website: https://www.fail2ban.org Installation: ------------- -Fail2Ban is likely already packaged for your Linux distribution: +Fail2Ban is likely already packaged for your Linux distribution and [can installed with a simple command](https://github.com/fail2ban/fail2ban/wiki/How-to-install-fail2ban-packages). -*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 - -For email support, install Sendmail: - - yum install sendmail - -Start and enable Fail2ban and, if needed, Sendmail: - - systemctl start 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: - - mkdir /var/run/fail2ban - -*Debian* - -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-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* - -Update your system: - - dnf update - -Install Fail2ban: - - dnf install fail2ban - -For email support, install Sendmail: - - dnf install sendmail - -Start and enable Fail2ban and, if needed, Sendmail: - - systemctl start 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 distribution is not listed, you can install from GitHub:* +If your distribution is not listed, you can install from GitHub: Required: - [Python2 >= 2.7 or Python >= 3.2](https://www.python.org) or [PyPy](https://pypy.org)