mirror of
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker.git
synced 2025-09-04 19:50:17 +00:00
Merge 0b491c9723
into 0d578d2557
This commit is contained in:
commit
e6e790935f
1 changed files with 26 additions and 0 deletions
26
_fail2ban_addon/action.d/nginxrepeatoffender-ufw.conf
Normal file
26
_fail2ban_addon/action.d/nginxrepeatoffender-ufw.conf
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
# action for nginx-ultimate-bad-bot-blocker fail2ban-addon to use ufw as the blocking firewall
|
||||||
|
# works with ipv4 and ipv6
|
||||||
|
# to use this change banaction = nginxrepeatoffender in jail.local to banaction = nginxrepeatoffender-ufw
|
||||||
|
[Definition]
|
||||||
|
|
||||||
|
actionstart =
|
||||||
|
actionstop =
|
||||||
|
actioncheck =
|
||||||
|
actionban = [ -n "<application>" ] && app="app <application>"
|
||||||
|
ufw prepend <blocktype> from <ip> to <destination> $app comment "Fail2Ban Repeated Offender"
|
||||||
|
|
||||||
|
actionunban = [ -n "<application>" ] && app="app <application>"
|
||||||
|
ufw delete <blocktype> from <ip> to <destination> $app
|
||||||
|
|
||||||
|
[Init]
|
||||||
|
# Option: blocktype
|
||||||
|
# Notes.: reject or deny
|
||||||
|
blocktype = deny
|
||||||
|
|
||||||
|
# Option: destination
|
||||||
|
# Notes.: The destination address to block in the ufw rule
|
||||||
|
destination = any
|
||||||
|
|
||||||
|
# Option: application
|
||||||
|
# Notes.: application from sudo ufw app list
|
||||||
|
application =
|
Loading…
Add table
Reference in a new issue