Unable to reinstall fail2ban after completly removing it from Centos 7
There are some additional fail2ban-packages, like fail2ban-systemd, fail2ban-server, fail2ban-firewalld etc.
It's possible those are the packages where the configuration files come from, so you may have to reinstall all fail2ban-* packages, as well.
Related videos on Youtube
Samuel E.
Updated on September 18, 2022Comments
-
Samuel E. almost 2 years
After completely removing Fail2ban from Centos 7, I decided to reinstall it. So I run the installation(yum), and everything seems ok, no errors, But the it seems like the installation does not create any directory in "/etc/fail2ban", and when I run
sudo systemctl start fail2ban
i receive no errors, and it seems like its running, however there are no config files... And it's the same version as before.I installed it by running:
sudo yum install fail2ban
The same command i used to install it in the first place. And removed it by:sudo systemctl stop fail2ban
sudo yum remove fail2ban
And then:rm -rf /etc/fail2ban /etc/init.d/fail2ban /var/run/fail2ban /usr/share/doc/fail2ban /usr/local/bin/fail2ban* /usr/lib*/python*/site-packages/fail2ban /usr/local/lib*/python*/site-packages/fail2ban
Thanks for the help!
-
Samuel E. over 8 yearsThanks you! i ran
yum remove fail2ban\*
and it removed the additional packages and I was able to reinstall it again. -
Native Coder over 7 yearsanyone know what the equivalent would be with apt-get?
-
Admin about 2 yearsusing this yum remove fail2ban* did the trick for me. Have been struggling for hours why fail2ban would not reinstall the conf files in the /etc/fail2ban folder. I manually remove the /etc/fail2ban folder.