Last active
May 25, 2019 21:46
-
-
Save karlwilbur/3b18ccc99561c40fc5d10501b1a7cd4c to your computer and use it in GitHub Desktop.
Fail2Ban: Custom configuration files
This file contains hidden or 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 configuration file | |
# /etc/fail2ban/filter.d/apache-404-php.conf | |
# | |
# Author: Karl Wilbur | |
# | |
# Description: | |
# filter for blocking IPs that generate 'File does not exist' | |
# entries in Apache's error log, from attempts to access non-existent | |
# PHP files. | |
# | |
[INCLUDES] | |
before = apache-common.conf | |
[Definition] | |
failregex = [[]client (?P<host>S*)[]] File does not exist: .*.php | |
ignoreregex = |
This file contains hidden or 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 configuration file | |
# /etc/fail2ban/filter.d/apache-client-denied.conf | |
# | |
# Author: Karl Wilbur | |
# | |
# Description: | |
# filter for blocking IPs that are explicitly denied by APache | |
# host configuation yet are still attempting to access pages. | |
# | |
[INCLUDES] | |
before = apache-common.conf | |
[Definition] | |
failregex = [[]client <HOST>[]] client denied by server configuration: | |
ignoreregex = |
This file contains hidden or 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 configuration file | |
# | |
# Author: Yaroslav Halchenko | |
# | |
# $Revision$ | |
# | |
[Definition] | |
# Option: failregex | |
# Notes.: regex to match the password failures messages in the logfile. The | |
# host must be matched by a group named "host". The tag "<HOST>" can | |
# be used for standard IP/hostname matching and is only an alias for | |
# (?:::f{4,6}:)?(?P<host>[\w\-.^_]+) | |
# Values: TEXT | |
# | |
failregex = sshd(?:\[\d+\])?: Did not receive identification string from <HOST>$ | |
# Option: ignoreregex | |
# Notes.: regex to ignore. If this regex matches, the line is ignored. | |
# Values: TEXT | |
# | |
ignoreregex = |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I added
sshd-ddos.conf
here because it was missing on one of my server installations.