mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-07-05 01:09:37 +00:00
Added fail2ban, though not sure its configured correctly yet
This commit is contained in:
52
docker/rootfs/fail2ban/action.d/gotify.conf
Normal file
52
docker/rootfs/fail2ban/action.d/gotify.conf
Normal file
@ -0,0 +1,52 @@
|
||||
## Version 2022/12/18
|
||||
# Fail2Ban configuration file
|
||||
#
|
||||
# Author: Quietsy
|
||||
#
|
||||
# Add the following to jail.local (uncommented) to apply the gotify action to all bans with all jails
|
||||
# Change the url to have a valid gotify address and a valid token
|
||||
#
|
||||
# [DEFAULT]
|
||||
# action = %(action_)s
|
||||
# gotify[url="https://gotify.domain.com/message?token=lkghlkhjo8y9"]
|
||||
|
||||
[Definition]
|
||||
|
||||
# Option: actionstart
|
||||
# Notes.: command executed once at the start of Fail2Ban.
|
||||
# Values: CMD
|
||||
#
|
||||
actionstart = curl --data '{"message": "Started <name>"}' -X POST -H Content-Type:application/json <url>
|
||||
|
||||
# Option: actionstop
|
||||
# Notes.: command executed once at the end of Fail2Ban
|
||||
# Values: CMD
|
||||
#
|
||||
actionstop = curl --data '{"message": "Stopped <name>"}' -X POST -H Content-Type:application/json <url>
|
||||
|
||||
# Option: actioncheck
|
||||
# Notes.: command executed once before each actionban command
|
||||
# Values: CMD
|
||||
#
|
||||
actioncheck =
|
||||
|
||||
# Option: actionban
|
||||
# Notes.: command executed when banning an IP. Take care that the
|
||||
# command is executed with Fail2Ban user rights.
|
||||
# Tags: See jail.conf(5) man page
|
||||
# Values: CMD
|
||||
#
|
||||
actionban = curl -X POST -H Content-Type:application/json <url> \
|
||||
--data '{"message": "⛔ <name> ⛔\n\n<ip> got banned for <bantime> seconds after <failures> tries.\n\nUnban command:\nfail2ban-client unban <ip>"}'
|
||||
|
||||
# Option: actionunban
|
||||
# Notes.: command executed when unbanning an IP. Take care that the
|
||||
# command is executed with Fail2Ban user rights.
|
||||
# Tags: See jail.conf(5) man page
|
||||
# Values: CMD
|
||||
#
|
||||
actionunban = curl -X POST -H Content-Type:application/json <url> --data '{"message": "✅ <name> ✅\n\n<ip> is now unbanned"}'
|
||||
|
||||
[Init]
|
||||
|
||||
url =
|
Reference in New Issue
Block a user