Create nginxrepeatoffender-ufw.conf

Add a new action conf for ufw users
This commit is contained in:
Marvin Zurborg 2022-12-26 01:09:45 +01:00 committed by GitHub
parent b266f4d125
commit 0b491c9723
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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 =