|
|
|
@ -7,7 +7,7 @@
|
|
|
|
|
|
|
|
|
|
[Definition] |
|
|
|
|
|
|
|
|
|
# Option: fwstart |
|
|
|
|
# Option: actionstart |
|
|
|
|
# Notes.: command executed once at the start of Fail2Ban. |
|
|
|
|
# Values: CMD |
|
|
|
|
# |
|
|
|
@ -15,7 +15,7 @@ actionstart = iptables -N fail2ban-<name>
|
|
|
|
|
iptables -A fail2ban-<name> -j RETURN |
|
|
|
|
iptables -I INPUT -p <protocol> --dport <port> -j fail2ban-<name> |
|
|
|
|
|
|
|
|
|
# Option: fwend |
|
|
|
|
# Option: actionend |
|
|
|
|
# Notes.: command executed once at the end of Fail2Ban |
|
|
|
|
# Values: CMD |
|
|
|
|
# |
|
|
|
@ -23,13 +23,13 @@ actionstop = iptables -D INPUT -p <protocol> --dport <port> -j fail2ban-<name>
|
|
|
|
|
iptables -F fail2ban-<name> |
|
|
|
|
iptables -X fail2ban-<name> |
|
|
|
|
|
|
|
|
|
# Option: fwcheck |
|
|
|
|
# Notes.: command executed once before each fwban command |
|
|
|
|
# Option: actioncheck |
|
|
|
|
# Notes.: command executed once before each actionban command |
|
|
|
|
# Values: CMD |
|
|
|
|
# |
|
|
|
|
actioncheck = iptables -n -L INPUT | grep -q fail2ban-<name> |
|
|
|
|
|
|
|
|
|
# Option: fwban |
|
|
|
|
# Option: actionban |
|
|
|
|
# Notes.: command executed when banning an IP. Take care that the |
|
|
|
|
# command is executed with Fail2Ban user rights. |
|
|
|
|
# Tags: <ip> IP address |
|
|
|
@ -39,7 +39,7 @@ actioncheck = iptables -n -L INPUT | grep -q fail2ban-<name>
|
|
|
|
|
# |
|
|
|
|
actionban = iptables -I fail2ban-<name> 1 -s <ip> -j DROP |
|
|
|
|
|
|
|
|
|
# Option: fwunban |
|
|
|
|
# Option: actionunban |
|
|
|
|
# Notes.: command executed when unbanning an IP. Take care that the |
|
|
|
|
# command is executed with Fail2Ban user rights. |
|
|
|
|
# Tags: <ip> IP address |
|
|
|
|