|
|
|
@ -28,13 +28,13 @@ before = iptables-blocktype.conf
|
|
|
|
|
# Values: CMD |
|
|
|
|
# |
|
|
|
|
actionstart = ipset --create f2b-<name> iphash |
|
|
|
|
iptables -I INPUT -p <protocol> -m multiport --dports <port> -m set --match-set f2b-<name> src -j <blocktype> |
|
|
|
|
iptables -I <chain> -p <protocol> -m multiport --dports <port> -m set --match-set f2b-<name> src -j <blocktype> |
|
|
|
|
|
|
|
|
|
# Option: actionstop |
|
|
|
|
# Notes.: command executed once at the end of Fail2Ban |
|
|
|
|
# Values: CMD |
|
|
|
|
# |
|
|
|
|
actionstop = iptables -D INPUT -p <protocol> -m multiport --dports <port> -m set --match-set f2b-<name> src -j <blocktype> |
|
|
|
|
actionstop = iptables -D <chain> -p <protocol> -m multiport --dports <port> -m set --match-set f2b-<name> src -j <blocktype> |
|
|
|
|
ipset --flush f2b-<name> |
|
|
|
|
ipset --destroy f2b-<name> |
|
|
|
|
|
|
|
|
@ -60,6 +60,12 @@ actionunban = ipset --test f2b-<name> <ip> && ipset --del f2b-<name> <ip>
|
|
|
|
|
# |
|
|
|
|
name = default |
|
|
|
|
|
|
|
|
|
# Option: chain |
|
|
|
|
# Notes specifies the iptables chain to which the Fail2Ban rules should be |
|
|
|
|
# added |
|
|
|
|
# Values: STRING Default: INPUT |
|
|
|
|
chain = INPUT |
|
|
|
|
|
|
|
|
|
# Option: port |
|
|
|
|
# Notes.: specifies port to monitor |
|
|
|
|
# Values: [ NUM | STRING ] Default: ssh |
|
|
|
|