mirror of https://github.com/fail2ban/fail2ban
action.d/hostdeny.conf: fixes IPv6 syntax
differentiate the IPv4 and IPv6 syntax (where it is enclosed in square brackets)pull/2067/head
parent
cfc3979c84
commit
b34ae5999e
|
@ -31,7 +31,7 @@ actioncheck =
|
||||||
# Tags: See jail.conf(5) man page
|
# Tags: See jail.conf(5) man page
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionban = IP=<ip> && printf %%b "<daemon_list>: $IP\n" >> <file>
|
actionban = printf %%b "<daemon_list>: <_ip_value>\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
|
||||||
|
@ -39,7 +39,7 @@ actionban = IP=<ip> && printf %%b "<daemon_list>: $IP\n" >> <file>
|
||||||
# Tags: See jail.conf(5) man page
|
# Tags: See jail.conf(5) man page
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionunban = IP=$(echo <ip> | sed 's/\./\\./g') && sed -i "/^<daemon_list>: $IP$/d" <file>
|
actionunban = IP=$(echo "<_ip_value>" | sed 's/[][\.]/\\\0/g') && sed -i "/^<daemon_list>: $IP$/d" <file>
|
||||||
|
|
||||||
[Init]
|
[Init]
|
||||||
|
|
||||||
|
@ -54,3 +54,9 @@ file = /etc/hosts.deny
|
||||||
# for hosts.deny/hosts_access. Default is all services.
|
# for hosts.deny/hosts_access. Default is all services.
|
||||||
# Values: STR Default: ALL
|
# Values: STR Default: ALL
|
||||||
daemon_list = ALL
|
daemon_list = ALL
|
||||||
|
|
||||||
|
# internal variable IP (to differentiate the IPv4 and IPv6 syntax, where it is enclosed in brackets):
|
||||||
|
_ip_value = <ip>
|
||||||
|
|
||||||
|
[Init?family=inet6]
|
||||||
|
_ip_value = [<ip>]
|
||||||
|
|
Loading…
Reference in New Issue