added reporting of the enabled sections
Yaroslav Halchenko
18 years ago
|
0 |
fail2ban (0.5.4-4) unstable; urgency=low
|
|
1 |
|
|
2 |
* On a request from Calum Mackay added reporting of the enabled sections
|
|
3 |
|
|
4 |
-- Yaroslav Halchenko <debian@onerussian.com> Thu, 29 Sep 2005 11:20:43 -1000
|
|
5 |
|
0 | 6 |
fail2ban (0.5.4-3) unstable; urgency=low
|
1 | 7 |
|
2 | 8 |
* Resolved the mistery of debug mode in which commands are not really
|
351 | 351 |
["str", "fwban", ""],
|
352 | 352 |
["str", "fwunban", ""])
|
353 | 353 |
|
|
354 |
logSys.info("Fail2Ban v" + version + " is running")
|
|
355 |
|
|
356 |
enabledSections = ""
|
354 | 357 |
# Gets the options of each sections
|
355 | 358 |
for t in confReader.getSections():
|
356 | 359 |
l = confReader.getLogOptions(t, optionValues)
|
357 | 360 |
if l["enabled"]:
|
358 | 361 |
# Creates a logreader object
|
|
362 |
enabledSections += " %s"%t
|
359 | 363 |
lObj = LogReader(l["logfile"], l["timeregex"], l["timepattern"],
|
360 | 364 |
l["failregex"], l["maxfailures"], l["findtime"])
|
361 | 365 |
# Creates a firewall object
|
|
363 | 367 |
# Links them into a list. I'm not really happy
|
364 | 368 |
# with this :/
|
365 | 369 |
logFwList.append([t, lObj, fObj, dict(), l])
|
|
370 |
|
|
371 |
logSys.info("Sections [%s] are enabled"%t)
|
366 | 372 |
|
367 | 373 |
# We add 127.0.0.1 to the ignore list has we do not want
|
368 | 374 |
# to be ban ourself.
|
|
377 | 383 |
else:
|
378 | 384 |
logSys.warn(ip + " is not a valid IP address")
|
379 | 385 |
|
380 | |
logSys.info("Fail2Ban v" + version + " is running")
|
381 | 386 |
# Execute global start command
|
382 | 387 |
executeCmd(conf["cmdstart"], conf["debug"])
|
383 | 388 |
# Execute start command of each section
|