mirror of https://github.com/fail2ban/fail2ban
added new options `kill-mode` and `kill`, which makes the drop of all connections optional
parent
5debaa4cac
commit
8f6a8df3a4
|
@ -23,7 +23,7 @@ actionban = if [ -n "<application>" ] && ufw app info "<application>"
|
||||||
else
|
else
|
||||||
ufw <add> <blocktype> from <ip> to <destination> comment "<comment>"
|
ufw <add> <blocktype> from <ip> to <destination> comment "<comment>"
|
||||||
fi
|
fi
|
||||||
ss -K dst [<ip>]
|
<kill>
|
||||||
|
|
||||||
actionunban = if [ -n "<application>" ] && ufw app info "<application>"
|
actionunban = if [ -n "<application>" ] && ufw app info "<application>"
|
||||||
then
|
then
|
||||||
|
@ -32,6 +32,21 @@ actionunban = if [ -n "<application>" ] && ufw app info "<application>"
|
||||||
ufw delete <blocktype> from <ip> to <destination>
|
ufw delete <blocktype> from <ip> to <destination>
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Option: kill-mode
|
||||||
|
# Notes.: can be set to ss (may be extended later with other modes) to immediately drop all connections from banned IP, default empty (no kill)
|
||||||
|
# Example: banaction = ufw[kill-mode=ss]
|
||||||
|
kill-mode =
|
||||||
|
|
||||||
|
# intern conditional parameter used to provide killing mode after ban:
|
||||||
|
_kill_ =
|
||||||
|
_kill_ss = ss -K dst "[<ip>]"
|
||||||
|
|
||||||
|
# Option: kill
|
||||||
|
# Notes.: can be used to specify custom killing feature, by default depending on option kill-mode
|
||||||
|
# Examples: banaction = ufw[kill='ss -K "( sport = :http || sport = :https )" dst "[<ip>]"']
|
||||||
|
banaction = ufw[kill='cutter "<ip>"']
|
||||||
|
kill = <_kill_<kill-mode>>
|
||||||
|
|
||||||
[Init]
|
[Init]
|
||||||
# Option: add
|
# Option: add
|
||||||
# Notes.: can be set to "insert 1" to insert a rule at certain position (here 1):
|
# Notes.: can be set to "insert 1" to insert a rule at certain position (here 1):
|
||||||
|
|
Loading…
Reference in New Issue