Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 351466 - net-analyzer/fail2ban-0.8.4: fail2ban.action.action ERROR on startup/restart
Summary: net-analyzer/fail2ban-0.8.4: fail2ban.action.action ERROR on startup/restart
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-12 19:05 UTC by andcycle-gentoo.bugs
Modified: 2011-04-06 20:25 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description andcycle-gentoo.bugs 2011-01-12 19:05:00 UTC
fail2ban has some issue with multiple lines of iptables command as an action,

mentioned on fail2ban wiki talk page
http://www.fail2ban.org/wiki/index.php/Fail2ban_talk:Community_Portal#fail2ban.action.action_ERROR_on_startup.2Frestart

"
by editing /usr/bin/fail2ban-client and adding a time.sleep(0.1)

def __processCmd(self, cmd, showRet = True):
	beautifier = Beautifier()
	for c in cmd:
		time.sleep(0.1)
		beautifier.setInputCmd(c)
"


Reproducible: Always

Steps to Reproduce:
multiple jails using action that contained complex iptables command,
especial with those action contain more than 10 lines of iptables command

Actual Results:  
something like this in fail2ban.log,
for example

2011-01-13 01:51:55,596 fail2ban.actions.action: ERROR  iptables -t raw -N fail2ban-cp-notrack
iptables -t raw -A fail2ban-cp-notrack -j RETURN
iptables -t raw -I PREROUTING -p tcp -j fail2ban-cp-notrack --in-interface ppp0
iptables -N fail2ban-cp-tarpit
iptables -A fail2ban-cp-tarpit -j RETURN
iptables -I INPUT -j fail2ban-cp-tarpit -p tcp --in-interface ppp0
iptables -N fail2ban-cp-drop
iptables -A fail2ban-cp-drop -j RETURN
iptables -I INPUT -j fail2ban-cp-drop --in-interface ppp0 returned 200

Expected Results:  
correspond iptables rule successful added, no error in fail2ban.log
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2011-01-18 18:05:01 UTC
Reopen when this is fixed upstream, please.
Comment 2 Thomas Capricelli 2011-04-06 20:25:13 UTC
i have the same problem. The only answer i can find with google is to tadd this time.sleep(0.1).. but
1) it slow downs start and stop of the daemon, a lot!
2) i still have the errors..