[ -n "<application>" ] && app="app <application>"
в /etc/fail2ban/action.d/ufw.conf? Где вообще почитать про синтаксис настроек fail2ban. Не нахожу ничего в мануалах.[Definition]
actionstart =
actionstop =
actioncheck =
actionban = [ -n "<application>" ] && app="app <application>"
ufw insert <insertpos> <blocktype> from <ip> to <destination> $app
actionunban = [ -n "<application>" ] && app="app <application>"
ufw delete <blocktype> from <ip> to <destination> $app
[Init]
# Option: insertpos
# Notes.: The position number in the firewall list to insert the block rule
insertpos = 1
# Option: blocktype
# Notes.: reject or deny
blocktype = reject
# Option: destination
# Notes.: The destination address to block in the ufw rule
destination = any
# Option: application
# Notes.: application from sudo ufw app list
application =
[ -n "<application>" ] && app="app <application>"
ufw insert <insertpos> <blocktype> from <ip> to <destination> $app
Добавить в ufw правило в позиции insertpos с типом blocktype запрещающее пакеты с ip на destination для приложения app.ufw insert 1 reject <ip> to any