mirror of https://github.com/fail2ban/fail2ban
added reporting of the enabled sections
parent
a1d7835cb6
commit
b046e73bef
|
@ -1,3 +1,9 @@
|
||||||
|
fail2ban (0.5.4-4) unstable; urgency=low
|
||||||
|
|
||||||
|
* On a request from Calum Mackay added reporting of the enabled sections
|
||||||
|
|
||||||
|
-- Yaroslav Halchenko <debian@onerussian.com> Thu, 29 Sep 2005 11:20:43 -1000
|
||||||
|
|
||||||
fail2ban (0.5.4-3) unstable; urgency=low
|
fail2ban (0.5.4-3) unstable; urgency=low
|
||||||
|
|
||||||
* Resolved the mistery of debug mode in which commands are not really
|
* Resolved the mistery of debug mode in which commands are not really
|
||||||
|
|
|
@ -352,11 +352,15 @@ def main():
|
||||||
["str", "fwban", ""],
|
["str", "fwban", ""],
|
||||||
["str", "fwunban", ""])
|
["str", "fwunban", ""])
|
||||||
|
|
||||||
|
logSys.info("Fail2Ban v" + version + " is running")
|
||||||
|
|
||||||
|
enabledSections = ""
|
||||||
# Gets the options of each sections
|
# Gets the options of each sections
|
||||||
for t in confReader.getSections():
|
for t in confReader.getSections():
|
||||||
l = confReader.getLogOptions(t, optionValues)
|
l = confReader.getLogOptions(t, optionValues)
|
||||||
if l["enabled"]:
|
if l["enabled"]:
|
||||||
# Creates a logreader object
|
# Creates a logreader object
|
||||||
|
enabledSections += " %s"%t
|
||||||
lObj = LogReader(l["logfile"], l["timeregex"], l["timepattern"],
|
lObj = LogReader(l["logfile"], l["timeregex"], l["timepattern"],
|
||||||
l["failregex"], l["maxfailures"], l["findtime"])
|
l["failregex"], l["maxfailures"], l["findtime"])
|
||||||
# Creates a firewall object
|
# Creates a firewall object
|
||||||
|
@ -365,6 +369,8 @@ def main():
|
||||||
# with this :/
|
# with this :/
|
||||||
logFwList.append([t, lObj, fObj, dict(), l])
|
logFwList.append([t, lObj, fObj, dict(), l])
|
||||||
|
|
||||||
|
logSys.info("Sections [%s] are enabled"%t)
|
||||||
|
|
||||||
# We add 127.0.0.1 to the ignore list has we do not want
|
# We add 127.0.0.1 to the ignore list has we do not want
|
||||||
# to be ban ourself.
|
# to be ban ourself.
|
||||||
for element in logFwList:
|
for element in logFwList:
|
||||||
|
@ -378,7 +384,6 @@ def main():
|
||||||
else:
|
else:
|
||||||
logSys.warn(ip + " is not a valid IP address")
|
logSys.warn(ip + " is not a valid IP address")
|
||||||
|
|
||||||
logSys.info("Fail2Ban v" + version + " is running")
|
|
||||||
# Execute global start command
|
# Execute global start command
|
||||||
executeCmd(conf["cmdstart"], conf["debug"])
|
executeCmd(conf["cmdstart"], conf["debug"])
|
||||||
# Execute start command of each section
|
# Execute start command of each section
|
||||||
|
|
Loading…
Reference in New Issue