LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-23-2019, 10:05 AM   #1
Mark_667
Member
 
Registered: Aug 2005
Location: Manchester, England
Distribution: Ubuntu 20.04
Posts: 383

Rep: Reputation: 30
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?
 
Old 06-23-2019, 11:34 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,689

Rep: Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274
systemd-python is not python: https://github.com/systemd/python-systemd and this is missing.
 
Old 06-23-2019, 04:46 PM   #3
Mark_667
Member
 
Registered: Aug 2005
Location: Manchester, England
Distribution: Ubuntu 20.04
Posts: 383

Original Poster
Rep: Reputation: 30
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?
 
Old 06-23-2019, 05:14 PM   #4
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,708

Rep: Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210
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?
 
Old 06-24-2019, 12:48 AM   #5
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
Quote:
Originally Posted by Mark_667 View Post
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.
 
Old 06-24-2019, 12:53 AM   #6
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
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).
 
Old 06-24-2019, 03:14 AM   #7
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
Quote:
Originally Posted by ehartman View Post
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.
 
  


Reply

Tags
fail2ban, rhel


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: RHEL8 Brings the Hybrid Cloud to DevOps LXer Syndicated Linux News 0 05-13-2019 11:24 PM
fail2ban not blocking vsftp samnjugu Linux - Security 1 04-11-2007 02:35 AM
increasing the number of file descriptors on RHEL8 mingram27 Fedora 1 02-21-2007 12:41 PM
fail2ban and proftpd 1.3 reeseslover531 Linux - Security 4 02-14-2007 07:10 AM
Weird problem with fail2ban miza Linux - Software 0 10-28-2006 09:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration