• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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