mirror of
https://github.com/tommytran732/Pterodactyl-Script
synced 2024-11-08 04:41:33 -05:00
Added phpMyAdmin-syslog jail
This commit is contained in:
parent
d363b89b47
commit
169139273b
21
install.sh
21
install.sh
@ -769,7 +769,8 @@ install_phpmyadmin(){
|
|||||||
\$cfg['UploadDir'] = '/var/lib/phpMyAdmin/upload';
|
\$cfg['UploadDir'] = '/var/lib/phpMyAdmin/upload';
|
||||||
\$cfg['SaveDir'] = '/var/lib/phpMyAdmin/save';
|
\$cfg['SaveDir'] = '/var/lib/phpMyAdmin/save';
|
||||||
\$cfg['CaptchaLoginPublicKey'] = '6LcJcjwUAAAAAO_Xqjrtj9wWufUpYRnK6BW8lnfn';
|
\$cfg['CaptchaLoginPublicKey'] = '6LcJcjwUAAAAAO_Xqjrtj9wWufUpYRnK6BW8lnfn';
|
||||||
\$cfg['CaptchaLoginPrivateKey'] = '6LcJcjwUAAAAALOcDJqAEYKTDhwELCkzUkNDQ0J5'
|
\$cfg['CaptchaLoginPrivateKey'] = '6LcJcjwUAAAAALOcDJqAEYKTDhwELCkzUkNDQ0J5';
|
||||||
|
\$cfg['AuthLog'] = syslog
|
||||||
?>
|
?>
|
||||||
EOF
|
EOF
|
||||||
chmod 755 /etc/phpMyAdmin
|
chmod 755 /etc/phpMyAdmin
|
||||||
@ -799,7 +800,8 @@ EOF
|
|||||||
\$cfg['UploadDir'] = '/var/lib/phpmyadmin/upload';
|
\$cfg['UploadDir'] = '/var/lib/phpmyadmin/upload';
|
||||||
\$cfg['SaveDir'] = '/var/lib/phpmyadmin/save';
|
\$cfg['SaveDir'] = '/var/lib/phpmyadmin/save';
|
||||||
\$cfg['CaptchaLoginPublicKey'] = '6LcJcjwUAAAAAO_Xqjrtj9wWufUpYRnK6BW8lnfn';
|
\$cfg['CaptchaLoginPublicKey'] = '6LcJcjwUAAAAAO_Xqjrtj9wWufUpYRnK6BW8lnfn';
|
||||||
\$cfg['CaptchaLoginPrivateKey'] = '6LcJcjwUAAAAALOcDJqAEYKTDhwELCkzUkNDQ0J5'
|
\$cfg['CaptchaLoginPrivateKey'] = '6LcJcjwUAAAAALOcDJqAEYKTDhwELCkzUkNDQ0J5';
|
||||||
|
\$cfg['AuthLog'] = syslog
|
||||||
?>
|
?>
|
||||||
EOF
|
EOF
|
||||||
chmod 755 /etc/phpmyadmin
|
chmod 755 /etc/phpmyadmin
|
||||||
@ -807,6 +809,20 @@ EOF
|
|||||||
chown -R www-data:www-data /var/www/pterodactyl
|
chown -R www-data:www-data /var/www/pterodactyl
|
||||||
chown -R www-data:www-data /var/lib/phpmyadmin/temp
|
chown -R www-data:www-data /var/lib/phpmyadmin/temp
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
bash -c 'cat > /etc/fail2ban/jail.local' <<-'EOF'
|
||||||
|
[DEFAULT]
|
||||||
|
# Ban hosts for ten hours:
|
||||||
|
bantime = 36000
|
||||||
|
# Override /etc/fail2ban/jail.d/00-firewalld.conf:
|
||||||
|
banaction = iptables-multiport
|
||||||
|
[sshd]
|
||||||
|
enabled = true
|
||||||
|
[phpmyadmin-syslog]
|
||||||
|
enable = true
|
||||||
|
maxentry = 15
|
||||||
|
EOF
|
||||||
|
service fail2ban restart
|
||||||
}
|
}
|
||||||
|
|
||||||
ssl_certs(){
|
ssl_certs(){
|
||||||
@ -851,6 +867,7 @@ bantime = 36000
|
|||||||
banaction = iptables-multiport
|
banaction = iptables-multiport
|
||||||
[sshd]
|
[sshd]
|
||||||
enabled = true
|
enabled = true
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
service fail2ban restart
|
service fail2ban restart
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user