Skip to content
This repository was archived by the owner on Jan 6, 2021. It is now read-only.

Commit 155f97c

Browse files
authored
Merge pull request #447 from linuxserver/nginx-deny-filter
fail2ban support for deny statements
2 parents 291aebb + da13653 commit 155f97c

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# fail2ban filter configuration for nginx
2+
3+
4+
[Definition]
5+
6+
7+
failregex = ^ \[error\] \d+#\d+: \*\d+ (access forbidden by rule), client: <HOST>, server: \S*, request: "\S+ \S+ HTTP\/\d+\.\d+", host: "\S+"(?:, referrer: "\S+")?\s*$
8+
9+
ignoreregex =
10+
11+
datepattern = {^LN-BEG}
12+
13+
# DEV NOTES:
14+
#
15+
# Author: Will L (driz@linuxserver.io)

root/defaults/jail.local

+7
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,10 @@ enabled = true
4848
port = http,https
4949
filter = nginx-botsearch
5050
logpath = /config/log/nginx/access.log
51+
52+
[nginx-deny]
53+
54+
enabled = true
55+
port = http,https
56+
filter = nginx-deny
57+
logpath = /config/log/nginx/error.log

0 commit comments

Comments
 (0)