1 |
brianr |
1.1 |
diff -Nur smeserver-fail2ban-0.1.18.old/root/etc/e-smith/templates/etc/fail2ban/jail.conf/90Recidive smeserver-fail2ban-0.1.18/root/etc/e-smith/templates/etc/fail2ban/jail.conf/90Recidive |
2 |
|
|
--- smeserver-fail2ban-0.1.18.old/root/etc/e-smith/templates/etc/fail2ban/jail.conf/90Recidive 2017-10-27 08:34:58.000000000 -0400 |
3 |
|
|
+++ smeserver-fail2ban-0.1.18/root/etc/e-smith/templates/etc/fail2ban/jail.conf/90Recidive 2019-11-27 23:06:09.715000000 -0500 |
4 |
|
|
@@ -1,15 +1,21 @@ |
5 |
|
|
- |
6 |
|
|
-[recidive] |
7 |
|
|
-enabled = true |
8 |
|
|
-filter = recidive |
9 |
|
|
-logpath = /var/log/fail2ban/daemon.log |
10 |
|
|
-bantime = 604800 |
11 |
|
|
-findtime = 86400 |
12 |
|
|
-maxretry = 5 |
13 |
|
|
-backend = polling |
14 |
|
|
-action = smeserver-iptables[bantime=604800] |
15 |
|
|
-{ |
16 |
|
|
-$OUT .= " smeserver-sendmail[name=\"Recidive\",dest=$maildest]\n" |
17 |
|
|
- if ($mail eq 'enabled'); |
18 |
|
|
-$OUT .= ''; |
19 |
|
|
-} |
20 |
|
|
+{ |
21 |
|
|
+my $rbantime = $fail2ban{'RecidiveBanTime'} || '604800'; |
22 |
|
|
+my $rfindtime = $fail2ban{'RecidiveFindTime'} || '86400'; |
23 |
|
|
+my $rmaxretry = $fail2ban{'RecidiveMaxRetry'} || '5'; |
24 |
|
|
+my $raction = 'smeserver-iptables[bantime=' . $rbantime . ']' . "\n"; |
25 |
|
|
+$raction .= " smeserver-sendmail[name=\"Recidive\",dest=$maildest]\n" |
26 |
|
|
+ if ($mail eq 'enabled'); |
27 |
|
|
+ |
28 |
|
|
+$OUT .=<<"EOF"; |
29 |
|
|
+ |
30 |
|
|
+[recidive] |
31 |
|
|
+enabled = true |
32 |
|
|
+filter = recidive |
33 |
|
|
+logpath = /var/log/fail2ban/daemon.log |
34 |
|
|
+bantime = $rbantime |
35 |
|
|
+findtime = $rfindtime |
36 |
|
|
+maxretry = $rmaxretry |
37 |
|
|
+backend = polling |
38 |
|
|
+action = $raction |
39 |
|
|
+EOF |
40 |
|
|
+} |