added fwchain

debian-releases/etch
Yaroslav Halchenko 2006-03-19 23:45:52 +00:00
parent e95c62e68e
commit 49bf5a991b
2 changed files with 11 additions and 3 deletions

View File

@ -127,19 +127,25 @@ maxreinits = -1
# #
protocol = tcp protocol = tcp
# Option: fwchain
# Notes.: chain from which to jump into fail2ban chains
# Values: TEXT Default: INPUT
#
fwchain = INPUT
# Option: fwstart # Option: fwstart
# Notes.: command executed once at the start of Fail2Ban. # Notes.: command executed once at the start of Fail2Ban.
# Values: CMD Default: # Values: CMD Default:
# #
fwstart = iptables -N fail2ban-%(__name__)s fwstart = iptables -N fail2ban-%(__name__)s
iptables -A fail2ban-%(__name__)s -j RETURN iptables -A fail2ban-%(__name__)s -j RETURN
iptables -I INPUT -p %(protocol)s --dport %(port)s -j fail2ban-%(__name__)s iptables -I %(fwchain)s -p %(protocol)s --dport %(port)s -j fail2ban-%(__name__)s
# Option: fwend # Option: fwend
# Notes.: command executed once at the end of Fail2Ban # Notes.: command executed once at the end of Fail2Ban
# Values: CMD Default: # Values: CMD Default:
# #
fwend = iptables -D INPUT -p %(protocol)s --dport %(port)s -j fail2ban-%(__name__)s fwend = iptables -D %(fwchain)s -p %(protocol)s --dport %(port)s -j fail2ban-%(__name__)s
iptables -F fail2ban-%(__name__)s iptables -F fail2ban-%(__name__)s
iptables -X fail2ban-%(__name__)s iptables -X fail2ban-%(__name__)s
@ -147,7 +153,7 @@ fwend = iptables -D INPUT -p %(protocol)s --dport %(port)s -j fail2ban-%(__name_
# Notes.: command executed once before each fwban command # Notes.: command executed once before each fwban command
# Values: CMD Default: # Values: CMD Default:
# #
fwcheck = iptables -L INPUT | grep -q fail2ban-%(__name__)s fwcheck = iptables -L %(fwchain)s | grep -q fail2ban-%(__name__)s
# Option: fwban # Option: fwban
# Notes.: command executed when banning an IP. Take care that the # Notes.: command executed when banning an IP. Take care that the

2
debian/changelog vendored
View File

@ -1,6 +1,8 @@
fail2ban (0.6.1-0.1) unstable; urgency=low fail2ban (0.6.1-0.1) unstable; urgency=low
* New upstream release * New upstream release
* In config file added fwchain to ease switching to another input chain
(closes: #357164)
-- Yaroslav Halchenko <debian@onerussian.com> Sat, 18 Mar 2006 23:11:53 -0500 -- Yaroslav Halchenko <debian@onerussian.com> Sat, 18 Mar 2006 23:11:53 -0500