mirror of https://github.com/fail2ban/fail2ban
ENH: Add root user check in xt_recent, and add missing actionstop
Thanks to Helmut Grohne on IRC for suggestionpull/618/head
parent
9bfc77c320
commit
2a37ee2fb7
1
THANKS
1
THANKS
|
@ -92,5 +92,6 @@ Yaroslav Halchenko
|
||||||
Winston Smith
|
Winston Smith
|
||||||
ykimon
|
ykimon
|
||||||
Yehuda Katz
|
Yehuda Katz
|
||||||
|
Zbigniew Jędrzejewski-Szmek
|
||||||
zugeschmiert
|
zugeschmiert
|
||||||
Zurd
|
Zurd
|
||||||
|
|
|
@ -33,13 +33,14 @@ before = iptables-blocktype.conf
|
||||||
# own rules. The 3600 second timeout is independent and acts as a
|
# own rules. The 3600 second timeout is independent and acts as a
|
||||||
# safeguard in case the fail2ban process dies unexpectedly. The
|
# safeguard in case the fail2ban process dies unexpectedly. The
|
||||||
# shorter of the two timeouts actually matters.
|
# shorter of the two timeouts actually matters.
|
||||||
actionstart = iptables -I INPUT -m recent --update --seconds 3600 --name fail2ban-<name> -j <blocktype>
|
actionstart = if [ $EUID -eq 0 ];then iptables -I INPUT -m recent --update --seconds 3600 --name fail2ban-<name> -j <blocktype>;fi
|
||||||
|
|
||||||
# Option: actionstop
|
# Option: actionstop
|
||||||
# Notes.: command executed once at the end of Fail2Ban
|
# Notes.: command executed once at the end of Fail2Ban
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionstop = echo / > /proc/net/xt_recent/fail2ban-<name>
|
actionstop = echo / > /proc/net/xt_recent/fail2ban-<name>
|
||||||
|
if [ $EUID -eq 0 ];then iptables -D INPUT -m recent --update --seconds 3600 --name fail2ban-<name> -j <blocktype>;fi
|
||||||
|
|
||||||
# Option: actioncheck
|
# Option: actioncheck
|
||||||
# Notes.: command executed once before each actionban command
|
# Notes.: command executed once before each actionban command
|
||||||
|
|
|
@ -74,12 +74,6 @@ further configuration. To run not as root, further setup is necessary:
|
||||||
|
|
||||||
with <name> suitably replaced.
|
with <name> suitably replaced.
|
||||||
|
|
||||||
- suppress actionstart for iptables-xt_recent-echo action by creating an override file
|
|
||||||
iptables-xt_recent-echo.local to accompany iptables-xt_recent-echo.conf with
|
|
||||||
|
|
||||||
[Definition]
|
|
||||||
actionstart =
|
|
||||||
|
|
||||||
- Permissions:
|
- Permissions:
|
||||||
|
|
||||||
make sure that configuration files under /etc/fail2ban are readable by
|
make sure that configuration files under /etc/fail2ban are readable by
|
||||||
|
|
Loading…
Reference in New Issue