Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Dev Section Modification & Patches
  • Search

How to config a long time ban in Fail2Ban for recurrent IP's

Section with modification and patches for Vesta
Post Reply
  • Print view
Advanced search
3 posts • Page 1 of 1
Wibols
Posts: 21
Joined: Tue Jun 25, 2019 7:42 pm

Os: CentOS 6x
Web: apache + nginx
How to config a long time ban in Fail2Ban for recurrent IP's
  • Quote

Post by Wibols » Fri Jun 28, 2019 9:38 am

You must to add to "/etc/fail2ban/jail.local" file (in Server > Fail2Ban > Configure) the next jail:

Code: Select all

[recidive]
enabled = true
maxretry = 3
findtime = 86400
bantime = 864000
This applies a 10 days ban for those IP's that have been banned 3 times in 24 hours or less.

To view banned IP's list (Chain f2b-recidive):

Code: Select all

sudo iptables -L
The only way I found to view banned IPs in VestaCP backend is to assigning "recidive" jail to a preexisting ban category and preferably unused (like DB or DNS), adding a new action line:

Code: Select all

[recidive]
enabled = true
action = vesta[name=DB]
maxretry = 3
findtime = 86400
bantime = 864000
Last edited by Wibols on Thu Jul 04, 2019 8:47 am, edited 3 times in total.
Top

skamasle
Collaborator
Posts: 592
Joined: Mon Feb 29, 2016 6:36 pm

Re: How to config a long time ban for recurrent IP's in Fail2Ban
  • Quote

Post by skamasle » Wed Jul 03, 2019 7:33 pm

Thanks you for sharhing
Top

Wibols
Posts: 21
Joined: Tue Jun 25, 2019 7:42 pm

Os: CentOS 6x
Web: apache + nginx
Re: How to config a long time ban in Fail2Ban for recurrent IP's
  • Quote

Post by Wibols » Thu Jul 04, 2019 8:50 am

Added to initial post:

The only way I found to view banned IPs in VestaCP backend is to assigning "recidive" jail to a preexisting ban category and preferably unused (like DB or DNS), adding a new action line:

Code: Select all

[recidive]
enabled = true
action = vesta[name=DB]
maxretry = 3
findtime = 86400
bantime = 864000
Top


Post Reply
  • Print view

3 posts • Page 1 of 1

Return to “Modification & Patches”



  • 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