Skip to content

Commit 90006d4

Browse files
Add jail rule for incorrect for phpmyadmin (hestiacp#3596)
Co-authored-by: Raphael <rs@scit.ch>
1 parent 20d49e3 commit 90006d4

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

install/deb/fail2ban/jail.local

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ maxretry = 5
5454
findtime = 86400
5555
bantime = 864000
5656

57+
[phpmyadmin]
58+
enabled = true
59+
filter = phpmyadmin-syslog
60+
action = hestia[name=WEB]
61+
logpath = /var/log/auth.log
62+
maxretry = 5
63+
5764
#Uncomment and add your IPs and or domains to the Whitelist
5865
#[DEFAULT]
5966
#ignoreip = 111.111.111.111 222.222.222.222 subdomain.example.tld example.tld 333.333.333.333

install/upgrade/versions/1.8.0.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,19 @@ if [ "$IMAP_SYSTEM" = "dovecot" ]; then
2929
fi
3030
fi
3131

32+
if [ -f /etc/fail2ban/jail.local ]; then
33+
# Add phpmyadmin rule
34+
if ! -qw "^[phpmyadmin]$" /etc/fail2ban/jail.local 2> /dev/null; then
35+
echo "
36+
[phpmyadmin]
37+
enabled = true
38+
filter = phpmyadmin-syslog
39+
action = hestia[name=WEB]
40+
logpath = /var/log/auth.log
41+
maxretry = 5" >> /etc/fail2ban/jail.local
42+
fi
43+
fi
44+
3245
if [ "$MAIL_SYSTEM" = "exim4" ]; then
3346
echo "[ * ] Disable SMTPUTF8 for Exim for now"
3447
if grep -qw "^smtputf8_advertise_hosts =" /etc/exim4/exim4.conf.template 2> /dev/null; then
@@ -174,4 +187,4 @@ if [ "$WEB_SYSTEM" = "nginx" ] || [ "$PROXY_SYSTEM" = "nginx" ]; then
174187
fi
175188

176189
unset commit nameserver nginx_conf_commit nginx_conf_compare nginx_conf_local os_release tls12_ciphers tls13_ciphers resolver
177-
# Finish configuring the "Enhanced and Optimized TLS" feature
190+
# Finish configuring the "Enhanced and Optimized TLS" feature

0 commit comments

Comments
 (0)