File tree Expand file tree Collapse file tree 3 files changed +17
-16
lines changed
Expand file tree Collapse file tree 3 files changed +17
-16
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,13 @@ action = hestia[name=WEB]
4545logpath = /var/log/roundcube/errors.log
4646maxretry = 5
4747
48+ [phpmyadmin-auth]
49+ enabled = true
50+ filter = phpmyadmin-syslog
51+ action = hestia[name=WEB]
52+ logpath = /var/log/auth.log
53+ maxretry = 5
54+
4855[recidive]
4956enabled = true
5057filter = recidive
@@ -54,13 +61,6 @@ maxretry = 5
5461findtime = 86400
5562bantime = 864000
5663
57- [phpmyadmin]
58- enabled = true
59- filter = phpmyadmin-syslog
60- action = hestia[name=WEB]
61- logpath = /var/log/auth.log
62- maxretry = 5
63-
6464#Uncomment and add your IPs and or domains to the Whitelist
6565#[DEFAULT]
6666#ignoreip = 111.111.111.111 222.222.222.222 subdomain.example.tld example.tld 333.333.333.333
Original file line number Diff line number Diff line change @@ -45,6 +45,13 @@ action = hestia[name=WEB]
4545logpath = /var/log/roundcube/errors
4646maxretry = 5
4747
48+ [phpmyadmin-auth]
49+ enabled = true
50+ filter = phpmyadmin-syslog
51+ action = hestia[name=WEB]
52+ logpath = /var/log/auth.log
53+ maxretry = 5
54+
4855[recidive]
4956enabled = true
5057filter = recidive
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ upgrade_config_set_value 'UPGRADE_UPDATE_FILEMANAGER_CONFIG' 'false'
2525
2626if [ " $IMAP_SYSTEM " = " dovecot" ]; then
2727 if ! grep -qw " ^extra_groups = mail$" /etc/dovecot/conf.d/10-master.conf 2> /dev/null; then
28- sed -i " s/^service auth {/service auth {\n extra_groups = mail/g" /etc/dovecot/conf.d/10-master.conf
28+ sed -i " s/^service auth {/service auth {\n extra_groups = mail\n /g" /etc/dovecot/conf.d/10-master.conf
2929 fi
3030
3131 if [ -f /etc/dovecot/conf.d/90-sieve.conf ]; then
3737
3838if [ -f /etc/fail2ban/jail.local ]; then
3939 # Add phpmyadmin rule
40- if ! -qw " ^[phpmyadmin]$" /etc/fail2ban/jail.local 2> /dev/null; then
41- echo "
42- [phpmyadmin]
43- enabled = true
44- filter = phpmyadmin-syslog
45- action = hestia[name=WEB]
46- logpath = /var/log/auth.log
47- maxretry = 5" >> /etc/fail2ban/jail.local
40+ if ! -qw " ^[phpmyadmin-auth]$" /etc/fail2ban/jail.local 2> /dev/null; then
41+ sed -i ' /\[recidive\]/i [phpmyadmin-auth]\nenabled = true\nfilter = phpmyadmin-syslog\naction = hestia[name=WEB]\nlogpath = /var/log/auth.log\nmaxretry = 5\n' /etc/fail2ban/jail.local
4842 fi
4943fi
5044
You can’t perform that action at this time.
0 commit comments