Skip to content

Commit 8f8d30f

Browse files
committed
Add logath, action and filter for recidive. Minor space adjustments.
1 parent 7508add commit 8f8d30f

File tree

2 files changed

+17
-21
lines changed

2 files changed

+17
-21
lines changed

install/deb/fail2ban/jail.local

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ logpath = /var/log/vsftpd.log
1313
maxretry = 5
1414

1515
[exim-iptables]
16-
enabled = true
17-
filter = exim
18-
action = hestia[name=MAIL]
19-
logpath = /var/log/exim4/mainlog
16+
enabled = true
17+
filter = exim
18+
action = hestia[name=MAIL]
19+
logpath = /var/log/exim4/mainlog
2020

2121
[dovecot-iptables]
22-
enabled = true
23-
filter = dovecot
24-
action = hestia[name=MAIL]
25-
logpath = /var/log/dovecot.log
22+
enabled = true
23+
filter = dovecot
24+
action = hestia[name=MAIL]
25+
logpath = /var/log/dovecot.log
2626

2727
[mysqld-iptables]
2828
enabled = false
@@ -32,22 +32,24 @@ logpath = /var/log/mysql.log
3232
maxretry = 5
3333

3434
[hestia-iptables]
35-
enabled = true
36-
filter = hestia
37-
action = hestia[name=HESTIA]
38-
logpath = /var/log/hestia/auth.log
35+
enabled = true
36+
filter = hestia
37+
action = hestia[name=HESTIA]
38+
logpath = /var/log/hestia/auth.log
3939
maxretry = 5
4040

4141
[roundcube-auth]
4242
enabled = false
4343
filter = roundcube-auth
44-
action = hestia[name=WEB]
44+
action = hestia[name=WEB]
4545
logpath = /var/log/roundcube/errors
4646
maxretry = 5
4747

4848
[recidive]
4949
enabled = true
50-
action = hestia[name=RECIDIVE]
50+
filter = recidive
51+
action = hestia[name=HESTIA]
52+
logpath = /var/log/fail2ban.log
5153
maxretry = 3
5254
findtime = 86400
5355
bantime = 864000

install/upgrade/versions/latest.sh

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,6 @@ fi
6767
# Implement recidive jail for fail2ban
6868
if [ ! -z "$FIREWALL_EXTENSION" ]; then
6969
if ! cat /etc/fail2ban/jail.local | grep -q "recidive"; then
70-
echo -e "\n\n[recidive]\nenabled = true\naction = hestia[name=RECIDIVE]\nmaxretry = 3\nfindtime = 86400\nbantime = 864000" >> /etc/fail2ban/jail.local
70+
echo -e "\n\n[recidive]\nenabled = true\nfilter = recidive\naction = hestia[name=HESTIA]\nlogpath = /var/log/fail2ban.log\nmaxretry = 3\nfindtime = 86400\nbantime = 864000" >> /etc/fail2ban/jail.local
7171
fi
7272
fi
73-
74-
# Update webmail templates to enable OCSP/SSL stapling
75-
if [ ! -z "$IMAP_SYSTEM" ]; then
76-
echo "(*) Enabling OCSP stapling support for webmail services..."
77-
$BIN/v-update-mail-templates > /dev/null 2>&1
78-
fi

0 commit comments

Comments
 (0)