LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Installing fail2ban on RHEL8 (https://www.linuxquestions.org/questions/linux-software-2/installing-fail2ban-on-rhel8-4175656237/)

Mark_667 06-23-2019 10:05 AM

Installing fail2ban on RHEL8
 
I've inherited some RHEL 8 EC2s and I'd like to install fail2ban on them. I've done the below on a test machine running RHEL 8 but am having some difficulties.

It's not in the repos so I tried installing from EPEL.

Code:

$ sudo yum update
Last metadata expiration check: 0:06:43 ago on Sun 23 Jun 2019 14:45:43 UTC.
Dependencies resolved.
Nothing to do.
Complete!
$ sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Last metadata expiration check: 0:08:10 ago on Sun 23 Jun 2019 14:45:43 UTC.
epel-release-latest-7.noarch.rpm                6.5 kB/s |  15 kB    00:02   
Dependencies resolved.
================================================================================
 Package              Arch          Version        Repository            Size
================================================================================
Installing:
 epel-release        noarch        7-11            @commandline          15 k

Transaction Summary
================================================================================
Install  1 Package

Total size: 15 k
Installed size: 24 k
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1
  Installing      : epel-release-7-11.noarch                              1/1
  Running scriptlet: epel-release-7-11.noarch                              1/1
  Verifying        : epel-release-7-11.noarch                              1/1

Installed:
  epel-release-7-11.noarch                                                     

Complete!
$
$ sudo yum update
Extra Packages for Enterprise Linux 7 - x86_64  2.3 MB/s |  16 MB    00:07   
Last metadata expiration check: 0:00:07 ago on Sun 23 Jun 2019 14:54:27 UTC.
Error:
 Problem: cannot install the best update candidate for package libidn2-2.0.5-1.el8.x86_64
  - nothing provides libunistring.so.0()(64bit) needed by libidn2-2.2.0-1.el7.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
$ sudo yum update --skip-broken
Last metadata expiration check: 0:00:37 ago on Sun 23 Jun 2019 14:54:27 UTC.
Error:
 Problem: cannot install the best update candidate for package libidn2-2.0.5-1.el8.x86_64
  - nothing provides libunistring.so.0()(64bit) needed by libidn2-2.2.0-1.el7.x86_64
(try to add '--nobest' to use not only best candidate packages)

OK, there's a problem with one of the libraries, let's try it anyway...
Code:

$ sudo yum install fail2ban
Last metadata expiration check: 0:00:46 ago on Sun 23 Jun 2019 14:54:27 UTC.
Error:
 Problem: package fail2ban-0.9.7-1.el7.noarch requires fail2ban-server = 0.9.7-1.el7, but none of the providers can be installed
  - conflicting requests
  - nothing provides systemd-python needed by fail2ban-server-0.9.7-1.el7.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

It needs Python so let's install that...
Code:

$ sudo yum install python2
Last metadata expiration check: 0:02:08 ago on Sun 23 Jun 2019 14:54:27 UTC.
Package python2-2.7.15-22.module+el8.0.0+2961+596d0223.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
$

It's already there... hmmm.

Is there a good way to install fail2ban on RHEL8?

pan64 06-23-2019 11:34 AM

systemd-python is not python: https://github.com/systemd/python-systemd and this is missing.

Mark_667 06-23-2019 04:46 PM

Thanks for the tip but I get
Code:

No match for argument: python-systemd
Only python3-systemd installs.
Is there a way to make fail2ban run on Python3?

scasey 06-23-2019 05:14 PM

I may be missing something, but if these are RHEL 8 servers, why trying to install (or is the epel) on version 7?
Quote:

fail2ban-0.9.7-1.el7.noarch
What does RedHat advise?

ehartman 06-24-2019 12:48 AM

Quote:

Originally Posted by Mark_667 (Post 6008230)
I've inherited some RHEL 8 EC2s
It's not in the repos so I tried installing from EPEL.

Note that RHEL 8 is so new that there isn't an epel repo for it (yet?).
Red Hat only reased version 8 in may....

Code:

$ sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
This is the epel repo for RHEL 7, so dependencies may be off (non-working or wrong versions) for packages from it.

ehartman 06-24-2019 12:53 AM

Quote:

Is there a good way to install fail2ban on RHEL8?
You may have to get it directly from the source http://github.com/fail2ban/fail2ban/.../0.10.4.tar.gz.
Note that that version predates your RHEL by at least half a year, so it may need adjustments for the python of RHEL 8 (fail2ban is written in python).

jsbjsb001 06-24-2019 03:14 AM

Quote:

Originally Posted by ehartman (Post 6008392)
Note that RHEL 8 is so new that there isn't an epel repo for it (yet?).
Red Hat only reased version 8 in may....

According to this there may be an epel repo for RHEL 8.

Quote:

Code:

$ sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
This is the epel repo for RHEL 7, so dependencies may be off (non-working or wrong versions) for packages from it.
From the link above it seems RHEL 8 maybe using dnf now instead of yum.

Also, I'm pretty sure RHEL doesn't use sudo by default since CentOS most certainly does not. Just because some other distro's do, it doesn't mean every distro does.


All times are GMT -5. The time now is 01:05 PM.