initial commit of file from CVS for smeserver-manager on Fri Mar 22 14:54:28 AEDT 2024
This commit is contained in:
		| @@ -0,0 +1,25 @@ | ||||
| { | ||||
| my $port = (${'httpd-e-smith'}{'TCPPort'} || '80') .','.  | ||||
| 	    ($modSSL{'TCPPort'} || '443'); | ||||
| my $status = $smanager{'status'} || 'disabled'; | ||||
| my $f2b = $smanager{'Fail2Ban'} || 'enabled'; | ||||
| return "" if (($status ne 'enabled') || ($f2b ne 'enabled')); | ||||
|  | ||||
| $OUT .=<<"EOF"; | ||||
|  | ||||
| [smanager] | ||||
| enabled  = true | ||||
| port     = $port | ||||
| filter   = smanager | ||||
| logpath  = /usr/share/smanager/log/production.log | ||||
| maxretry = 3 | ||||
| findtime = 300 | ||||
| bantime  = 1800 | ||||
| action   = smeserver-iptables[port="$port",protocol=tcp,bantime=$bantime] | ||||
|  | ||||
| EOF | ||||
|  | ||||
| $OUT .= "           smeserver-sendmail[name=\"SManager\",dest=$maildest]\n" | ||||
|     	if ($mail eq 'enabled'); | ||||
|  | ||||
| } | ||||
| @@ -0,0 +1,26 @@ | ||||
| # Fail2Ban filter for Smanager attempted bypasses | ||||
|  | ||||
| [Definition] | ||||
| #[Mon Nov  9 20:33:34 2020] [info] Login FAILED: mab	192.168.0.11 | ||||
|  | ||||
| #_groupsre = (?:(?:,?\s*"\w+":(?:"[^"]+"|\w+))*) | ||||
| #failregex = ^\{%(_groupsre)s,?\s*"remoteAddr":"<HOST>"%(_groupsre)s,?\s*"message":"Login failed: | ||||
| #            ^\{%(_groupsre)s,?\s*"remoteAddr":"<HOST>"%(_groupsre)s,?\s*"message":"Trusted domain error. | ||||
|  | ||||
| failregex = ^\[.*\] \[info\] Login FAILED: .*\t<HOST>$ | ||||
|  | ||||
| #ignoreregex =  | ||||
| ignoreregex = ^\[.*\] \[debug\] .*$ | ||||
| ignoreregex = ^\[.*\] \[info\] Login succeeded: .*$ | ||||
|  | ||||
| #datepattern = ,?\s*"time"\s*:\s*"%%Y-%%m-%%d[T ]%%H:%%M:%%S(%%z)?" | ||||
|  | ||||
| #datepattern = ^[%%a %%b %%d %%H:%%M:%%S %%Y] | ||||
| #datepattern = ^\[%%a %%b %%-d %%X %%Y\] | ||||
| #^[LN-BEG] | ||||
| #	    ^[%%a %%b %%-d %%X %%Y] | ||||
| #	{^LN-BEG}Epoch | ||||
| datepattern = {^LN-BEG} | ||||
|  | ||||
| # Author: Michel Begue | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Trevor Batley
					Trevor Batley