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

fail2ban like stoped but running after yum update

RHEL/CentOS related topics
Post Reply
  • Print view
Advanced search
9 posts • Page 1 of 1
tlozano
Posts: 37
Joined: Tue Nov 13, 2018 11:44 am

Os: CentOS 6x
Web: nginx + php-fpm
fail2ban like stoped but running after yum update
  • Quote

Post by tlozano » Tue Feb 11, 2020 12:04 pm

After yum update, the fail2ban was updated and it appears like stoped in the web admin (server section).
The probem is that /usr/local/vesta/bin/v-list-sys-services can't detect fail2ban procces fine, because the old proccess was named "fail2ban-service", and after the update the new name of procces is "f2b/server".

Is it possible to patch the /usr/local/vesta/bin/v-list-sys-services to detect the new name?.

This is the output in the updated server (not working):
Image

And this before update (working):
Image

Thank you

****


Updated;

It works fine if I change in line 273 in the /usr/local/vesta/bin/v-list-sys-services
from:

Code: Select all

# Checking FIREWALL Fail2ban extention
if [ ! -z "$FIREWALL_EXTENSION" ]; then
    get_srv_state $FIREWALL_EXTENSION fail2ban-server script
    data="$data\nNAME='$FIREWALL_EXTENSION' SYSTEM='brute-force monitor'"
    data="$data STATE='$state' CPU='$cpu' MEM='$mem' RTIME='$rtime'"
fi
to:

Code: Select all

# Checking FIREWALL Fail2ban extention
if [ ! -z "$FIREWALL_EXTENSION" ]; then
    get_srv_state $FIREWALL_EXTENSION f2b/server script
    data="$data\nNAME='$FIREWALL_EXTENSION' SYSTEM='brute-force monitor'"
    data="$data STATE='$state' CPU='$cpu' MEM='$mem' RTIME='$rtime'"
fi
But ... It is correct?
Top

Teo
Posts: 97
Joined: Mon May 11, 2015 9:17 am

Os: CentOS 6x
Web: apache + nginx
Re: fail2ban like stoped but running after yum update
  • Quote

Post by Teo » Tue Feb 25, 2020 3:35 pm

After this fix the service is shown as active, but you can't restart it anyway.
Top

tlozano
Posts: 37
Joined: Tue Nov 13, 2018 11:44 am

Os: CentOS 6x
Web: nginx + php-fpm
Re: fail2ban like stoped but running after yum update
  • Quote

Post by tlozano » Tue Feb 25, 2020 5:01 pm

Teo wrote: ↑
Tue Feb 25, 2020 3:35 pm
After this fix the service is shown as active, but you can't restart it anyway.
In my case, I can stop, start and restart the service fine. I only have nginx.

What command are you using to restart? Are you using the VestaCP Panel?
Top

Teo
Posts: 97
Joined: Mon May 11, 2015 9:17 am

Os: CentOS 6x
Web: apache + nginx
Re: fail2ban like stoped but running after yum update
  • Quote

Post by Teo » Fri Feb 28, 2020 4:28 pm

tlozano wrote: ↑
Tue Feb 25, 2020 5:01 pm
Teo wrote: ↑
Tue Feb 25, 2020 3:35 pm
After this fix the service is shown as active, but you can't restart it anyway.
In my case, I can stop, start and restart the service fine. I only have nginx.

What command are you using to restart? Are you using the VestaCP Panel?
yes the vestacp button donno why
Top

tlozano
Posts: 37
Joined: Tue Nov 13, 2018 11:44 am

Os: CentOS 6x
Web: nginx + php-fpm
Re: fail2ban like stoped but running after yum update
  • Quote

Post by tlozano » Tue Mar 10, 2020 7:26 pm

what is the output of /usr/local/vesta/bin/v-list-sys-services command?
This is the command that must work.
Top

kudouyuzi
Posts: 177
Joined: Mon Apr 28, 2014 11:19 am

Re: fail2ban like stoped but running after yum update
  • Quote

Post by kudouyuzi » Wed Mar 11, 2020 10:17 am

tlozano wrote: ↑
Tue Feb 11, 2020 12:04 pm
Updated;
But ... It is correct?
It already work, but it seems that memory consumption is very severe.

Image
Top

tlozano
Posts: 37
Joined: Tue Nov 13, 2018 11:44 am

Os: CentOS 6x
Web: nginx + php-fpm
Re: fail2ban like stoped but running after yum update
  • Quote

Post by tlozano » Wed Mar 11, 2020 12:18 pm

It is posible that any of the "jails" has some problem... You can disable all the "jails" and re-enable one to one to see the origin of problem.

I'm sorry, I don't known more ideas.
Top

Kakarot
Posts: 3
Joined: Sat May 16, 2020 3:01 pm

Os: Ubuntu 17x
Web: apache + nginx
Re: fail2ban like stoped but running after yum update
  • Quote

Post by Kakarot » Mon May 18, 2020 11:41 pm

In my case after changing "fail2ban-server" for "f2b/server" it works for me, but my fail2ban also consumes a lot of RAM in centOS 7, is this normal? Can it be reduced?

Image

If I disable all the "jails" fail2ban it consumes about 3735 mb
Top

Stage4000
Posts: 7
Joined: Tue Nov 12, 2019 4:40 am

Os: CentOS 6x
Web: apache + nginx
Re: fail2ban like stoped but running after yum update
  • Quote

Post by Stage4000 » Mon Mar 01, 2021 7:59 pm

Hey I know its been a while since you posted this but this solved my problem today and seems to be a very clean fix for anyone having issues with fail2ban not showing up as running on the admin panel. Thanks.
Top


Post Reply
  • Print view

9 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
 

 

Login  •  Register

I forgot my password