• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Help with fail2ban regex?

JeffreyZ

Basic Pleskian
I have a ddos attack that manifests itself in code in a client's proxy.ssl.log file that looks like this \x00\x00\x00\x00\xA27\xF7\xFF\xD1\x9D.

Somehow I'd like to ban any ip whose address ends up in that log. Too many IPs to block manually in the iptables.

So I'm hoping to get fail2ban to do it for me. I believe I will need to use regex for this, which I am only beginning to understand.

I have created a file "proxy-ssl" in the folder filter.d

===================start

# Fail2Ban configuration file
#
#
# $Revision: 1 $
#

[Definition]
# Option: failregex
# Values: TEXT
#
failregex = ^ -.*x00.*

=====================end

Then I add the following to the jail.local file:
[proxy-ssl]
enabled = true
filter = proxy-ssl
logpath = /var/www/vhosts/the-domain.com/logs/proxy_access_ssl_log
findtime = 10
maxretry = 3

On restart of fail2ban I get one or more error messages, depending how I write the failregex line.

Wondering if there is a way to write a failregex line that would just ban any IP that shows in the log file.
 
Back
Top