• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

How do you reinstall Fail2Ban entirely?

Simon123

New Pleskian
So on our server, fail2ban got itself in a mess. Tried various things to fix, to no avail, so figured I'd just do a fresh install of it. There was minimal customisation to it that I couldn't re-do.

Note I'd already rm'd /etc/fail2ban - as on previous attempts, the files in here didn't appear to be restored to their defaults. So I figured removing the directory would force this to happen (Whether this was wise I'm not sure!) ;-)

So, following instructions here: http://kb.odin.com/en/122654 I now get the following:

# wget http://kb.sp.parallels.com/Attachments/kcs-36245/fail2ban.gz
# gunzip fail2ban.gz
# mv fail2ban /etc/init.d/fail2ban
# chmod 755 /etc/init.d/fail2ban
# ll /etc/init.d/fail2ban /etc/fail2ban/fail2ban.conf

ls: cannot access /etc/fail2ban/fail2ban.conf: No such file or directory
-rwxr-xr-x 1 root root 2141 Aug 15 2014 /etc/init.d/fail2ban

I then uninstall/reinstall with # /usr/local/psa/admin/bin/autoinstaller

(Have tried via the web interface too)

I then get:

# ll /etc/init.d/fail2ban /etc/fail2ban/fail2ban.conf
ls: cannot access /etc/fail2ban/fail2ban.conf: No such file or directory
-rwxr-xr-x 1 root root 2141 Aug 15 2014 /etc/init.d/fail2ban

i.e., no change..

and if I go to the fail2ban settings in Plesk, I get:

Internal error: f2bmng failed: ERROR:f2bmng:No section: 'Definition'
Message f2bmng failed: ERROR:f2bmng:No section: 'Definition'

Is there a way to regenerate what should be in /etc/fail2ban by default?
 
Actually this file is a part of fail2ban package:

# rpm -qf /etc/fail2ban/fail2ban.conf
fail2ban-0.8.14-1.el6.noarch

Make sure that this package is correctly installed on your server.
 
Actually this file is a part of fail2ban package:

# rpm -qf /etc/fail2ban/fail2ban.conf
fail2ban-0.8.14-1.el6.noarch

Make sure that this package is correctly installed on your server.

Hi Igor,

Many thanks for the reply :) This is what I'm getting - do you know if this is correct?

# yum info fail2ban
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.bytemark.co.uk
* epel: mirror.bytemark.co.uk
* extras: mirrors-uk.go-parts.com
* updates: mirror.bytemark.co.uk
Installed Packages
Name : fail2ban
Arch : noarch
Version : 0.9.1
Release : 4.el7
Size : 0.0
Repo : installed
From repo : epel
Summary : Daemon to ban hosts that cause multiple authentication errors
URL : http://fail2ban.sourceforge.net/
 
Back
Top