mirror of https://github.com/fail2ban/fail2ban
- Increment "crtRuleNbr" after the creation of the rule
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@69 a942ae1a-1317-0410-a47c-b1dcaea8d6050.6
parent
42937a5522
commit
45dd8ea43e
|
@ -52,8 +52,8 @@ class Ipfw(Firewall):
|
||||||
def banIP(self, ip):
|
def banIP(self, ip):
|
||||||
""" Returns query to ban IP.
|
""" Returns query to ban IP.
|
||||||
"""
|
"""
|
||||||
self.crtRuleNbr = self.crtRuleNbr + 1
|
|
||||||
query = "ipfw -q add "+`self.crtRuleNbr`+" deny ip from "+ip+" to any"
|
query = "ipfw -q add "+`self.crtRuleNbr`+" deny ip from "+ip+" to any"
|
||||||
|
self.crtRuleNbr = self.crtRuleNbr + 1
|
||||||
return query
|
return query
|
||||||
|
|
||||||
def unBanIP(self, ip):
|
def unBanIP(self, ip):
|
||||||
|
|
Loading…
Reference in New Issue