Skip to content

Some custom regex rules to help block brute force attacks on VestaCP servers

Notifications You must be signed in to change notification settings

SS88UK/CSF-Custom-Regex-for-VestaCP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

CSF-Custom-Regex-for-VestaCP

Some custom regex rules to help block brute force attacks on VestaCP servers. See the example file regex.custom.pm if you need help.

/etc/csf/regex.custom.pm

You must edit this file with any new custom regex patterns and place them BEFORE return 0

proftpd

if (($lgfile eq $config{FTPD_LOG}) and ($line =~ /\[(\S+)\]\).*\(Login failed\)/)) { return ("Failed FTP login from",$1,"proftpd_ss88","5","20,21","1"); }

if (($lgfile eq $config{FTPD_LOG}) and ($line =~ /\[(\S+)\]\).*USER user: no such user found/)) { return ("Failed FTP login from",$1,"proftpd_ss88","5","20,21","1"); }

vsftpd

if (($lgfile eq $config{FTPD_LOG}) and ($line =~ /FAIL LOGIN: Client \"(\S+)\"/)) { return ("Failed FTP login from",$1,"vsftpd_ss88","5","20,21","1"); }

VestaCP Control Panel (8083)

You need to make sure the 'CUSTOM1_LOG' field is set to Vesta's control panel log file at: /var/log/vesta/auth.log

CUSTOM1_LOG = "/var/log/vesta/auth.log"
if (($globlogs{CUSTOM1_LOG}{$lgfile}) and ($line =~ /(\S+) failed to login/)) { return ("Login attempt to VestaCP from",$1,"VESTAloginAttempt","5","8083","1"); }

About

Some custom regex rules to help block brute force attacks on VestaCP servers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Other 100.0%