Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section General Discussion RHEL/CentOS
  • Search

Centos 7 Fail2Ban NOT working

RHEL/CentOS related topics
Post Reply
  • Print view
Advanced search
10 posts • Page 1 of 1
pandabb
Posts: 192
Joined: Sat Aug 08, 2015 3:03 am

Centos 7 Fail2Ban NOT working
  • Quote

Post by pandabb » Mon Feb 08, 2016 1:18 pm

Hello, if you're using Cent oS7 and your fail2ban is not working.

Fix is :
2. Download hba configuration
cd /etc
wget http://c.vestacp.com/0.9.8/ubuntu/fail2ban.tar.gz -O fail2ban.tar.gz

3. Extract configuration
tar -xzf fail2ban.tar.gz
rm -f fail2ban.tar.gz

I've encountered this error and i've checked the file and saw that my fail2ban is missing jail.local and 2 vesta.conf one in filter.d and one action.d .. all these files are located at /etc/fail2ban

Thanks
Top

jonn
Posts: 72
Joined: Sun Jun 08, 2014 12:18 pm

Re: Centos 7 Fail2Ban NOT working
  • Quote

Post by jonn » Mon Feb 08, 2016 5:31 pm

do you mean these instruction were followed after a custom install?

https://vestacp.com/docs/#how-to-instal ... hel-centos

If you think its a bug, report it
https://bugs.vestacp.com/

Did you disable firewalld?

Code: Select all

systemctl stop firewalld
systemctl disable firewalld
systemctl status firewalld
Top

pandabb
Posts: 192
Joined: Sat Aug 08, 2015 3:03 am

Re: Centos 7 Fail2Ban NOT working
  • Quote

Post by pandabb » Mon Feb 08, 2016 6:08 pm

Nope i installed it using bash vst-install.sh and didn't touch anything except for yum update.

i don't know if its just me.
Top

Jampie
Posts: 4
Joined: Sat Feb 13, 2016 10:52 am

Re: Centos 7 Fail2Ban NOT working
  • Quote

Post by Jampie » Sat Feb 13, 2016 11:10 am

I had the same issue.
Installed vestacp on a new centos 7 machine, and missing:

action.d/vesta.conf
filter.d/vesta.conf
jail.local

Also, Memory Usage graph is not working in the admin.
Top

joem
Posts: 378
Joined: Thu Nov 13, 2014 8:33 am

Os: CentOS 6x
Web: nginx + php-fpm
Re: Centos 7 Fail2Ban NOT working
  • Quote

Post by joem » Mon Feb 15, 2016 8:13 pm

I have found the new version of vesta is not really stable on centos7 many install issues.
Jampie wrote: Also, Memory Usage graph is not working in the admin.
Try resetting the permissions to /usr/local/vesta/bin to 0777
Top

cybaster85
Posts: 13
Joined: Sat Feb 13, 2016 11:03 am

Re: Centos 7 Fail2Ban NOT working
  • Quote

Post by cybaster85 » Wed Feb 24, 2016 2:00 pm

same here

fail2ban not working in centos 7 and also memory graph
Top

Felix
Posts: 134
Joined: Tue Aug 04, 2015 7:15 pm

Os: Ubuntu 15x
Web: apache + nginx
Re: Centos 7 Fail2Ban NOT working
  • Quote

Post by Felix » Wed Apr 20, 2016 5:33 pm

I confirm that fail2ban does NOT work on VESTA installation under CentOS 7.

The installation of VESTA was started with the command

Code: Select all

bash vst-install.sh --nginx yes --apache yes --phpfpm no --vsftpd yes --proftpd no --exim yes --dovecot yes --spamassassin yes --clamav no --named yes --iptables yes --fail2ban yes --mysql yes --postgresql no --remi yes --quota yes --hostname test --email [email protected] --password 1234
After following the guide How to install fail2ban on CentOS, it started to work BUT...

WORKS with:
  • VESTA web interface
  • MAIL
DOES NOT WORK with:
  • FTP
  • MySQL
I didn't test SSH because I have disabled password authentication altogether.

About MySQL...
The following issues need to be resolved before fail2ban can work with MySQL
  • The filter is pointing to the wrong log file /var/log/mysqld.log instead of /var/log/mariadb/mariadb.log
  • The filter in /etc/fail2ban/jail.local is NOT enabled (need to turn to enabled = true )
  • my.cnf is NOT configured to log Access Denied messages. To do that we need to add log_warnings = 2 inside the [mysqld] section
After doing all of the above, don't forget to restart MySQL and fail2ban and it should work.
Top

adrianofnatal
Posts: 3
Joined: Wed May 11, 2016 12:37 pm

Re: Centos 7 Fail2Ban NOT working
  • Quote

Post by adrianofnatal » Wed May 11, 2016 12:47 pm

I notice that fail2ban isn't working when installed on CentOS 7, clean install, and VestaCP only with Nginx.
No log is generated, no ban IP is added to list, when run "fail2ban-client status" returns no jails.
The output of installation process, on last lines, show that some files related to fail2ban could not be copied, or not found.
Top

Mr.Erbutw
Posts: 1040
Joined: Tue Apr 29, 2014 10:05 pm

Os: CentOS 6x
Web: apache + nginx
Re: Centos 7 Fail2Ban NOT working
  • Quote

Post by Mr.Erbutw » Wed May 11, 2016 7:16 pm

put the fail2ban-0.8.3-16.fc8.noarch works fine
rus topic
Top

adrianofnatal
Posts: 3
Joined: Wed May 11, 2016 12:37 pm

Re: Centos 7 Fail2Ban NOT working
  • Quote

Post by adrianofnatal » Thu May 12, 2016 12:58 am

Hm I'll try.
I have to install the fail2ban config scripts as described in VespaCP panel again?

Thanks!
Top


Post Reply
  • Print view

10 posts • Page 1 of 1

Return to “RHEL/CentOS”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

cron

Login  •  Register

I forgot my password