mirror of https://github.com/fail2ban/fail2ban
action.d/hostsdeny.conf: actionunban rewritten using sed, also dots in IP were escaped now.
Closes #2000pull/2018/head
parent
314e402fe0
commit
7e05976ead
|
@ -31,8 +31,7 @@ actioncheck =
|
||||||
# Tags: See jail.conf(5) man page
|
# Tags: See jail.conf(5) man page
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionban = IP=<ip> &&
|
actionban = IP=<ip> && printf %%b "<daemon_list>: $IP\n" >> <file>
|
||||||
printf %%b "<daemon_list>: $IP\n" >> <file>
|
|
||||||
|
|
||||||
# Option: actionunban
|
# Option: actionunban
|
||||||
# Notes.: command executed when unbanning an IP. Take care that the
|
# Notes.: command executed when unbanning an IP. Take care that the
|
||||||
|
@ -40,7 +39,7 @@ actionban = IP=<ip> &&
|
||||||
# Tags: See jail.conf(5) man page
|
# Tags: See jail.conf(5) man page
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionunban = echo "/^<daemon_list>: <ip>$/<br>d<br>w<br>q" | ed <file>
|
actionunban = IP=$(echo <ip> | sed 's/\./\\./g') && sed -i "/^<daemon_list>: $IP$/d" <file>
|
||||||
|
|
||||||
[Init]
|
[Init]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue