Last active
March 29, 2019 07:36
-
-
Save briped/c0094151c31a4dd59740f5da18c3b6e9 to your computer and use it in GitHub Desktop.
Fail2Ban configuration files for PlexPy behind NGINX Reverse Proxy Raw
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 jail configuration file for PlexPy behind NGINX Reverse Proxy. | |
# nginx-plexpy.conf | |
# | |
# The X-Forwarded-For IP (or any IP for that matter) isn't logged in the PlexPy | |
# log, and so any failed attempts cannot be blocked using Fail2Ban. | |
# | |
# Workaround is to look at all attempts and then set the maxretry number to 5. | |
# This doesn't protect against distributed attempts. | |
# | |
# Author: Brian Schmidt Pedersen | |
# | |
[nginx-plexpy] | |
enabled = true | |
port = http,https | |
filter = nginx-plexpy | |
logpath = %(nginx_access_log)s | |
maxretry= 5 |
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 configuration file for PlexPy behind NGINX Reverse Proxy. | |
# nginx-plexpy.conf | |
# | |
# The X-Forwarded-For IP (or any IP for that matter) isn't logged in the PlexPy | |
# log, and so any failed attempts cannot be blocked using Fail2Ban. | |
# | |
# Workaround is to look at all attempts and then set the maxretry number to 5. | |
# This doesn't protect against distributed attempts. | |
# | |
# Author: Brian Schmidt Pedersen | |
# | |
[Definition] | |
failregex = ^<HOST> -[^"]*"POST /auth/login[^"]*" | |
ignoreregex = |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Heya,
I've changed a few things to make it work with the latest version of Tautulli:
This seems to block any attempts now, previous regex didn't like the latest log format which has updated to include IP addresses as well now (still no username however). It's not pretty, but unfortunately regexes certainly aren't my strong point!