Created
March 10, 2016 13:03
-
-
Save hespresati/e5e6ad67f407d8c7f666 to your computer and use it in GitHub Desktop.
Fail2Ban Tomcat7 configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fail2Ban local configuration file | |
[tomcat-manager] | |
enabled = true | |
port = 8080,8443 | |
filter = tomcat-manager | |
logpath = /var/log/tomcat7/localhost_access_log.*.txt | |
maxretry = 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fail2Ban filter to block access to Tomcat Manager | |
[INCLUDES] | |
before = common.conf | |
[Definition] | |
failregex = <HOST> -.*- .*/manager/j_security_check HTTP/1.* .* .*$ | |
<HOST> - - \[.*\] "GET /manager/html(.*) HTTP/1.1" 401 \d+$ | |
ignoreregex = | |
# Author: Hugo Espresati. Bassed on Miguel Almeida's regexs definitions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment