Commit Graph

3038 Commits (1fb867b839c3f8cd9931371dffa59aab545a437d)

Author SHA1 Message Date
Yaroslav Halchenko 012264dce1 BF: safeguard closing of log handlers + close in reverse order
otherwise there might be "stuck" handler in the queue. and closing
exceptions can occur -- even stock logging guards in recent versions
2013-02-21 20:58:27 -05:00
Steven Hiscocks b36835f6f0 Added transmitter get cinfo option for action 2013-02-20 23:33:39 +00:00
Steven Hiscocks b6a68f5138 Fix for missing value in transmitter delaction 2013-02-20 23:24:46 +00:00
Steven Hiscocks 088e40c481 Rewrite and enable server testcase for Transmitter 2013-02-20 23:14:42 +00:00
Yaroslav Halchenko a8bd9c20a0 Merge branch 'master' of git://github.com/fail2ban/fail2ban
* 'master' of git://github.com/fail2ban/fail2ban:
  add blocking type
  add example jail.conf for blocking through blackhole routes for ssh
  add support for blocking through blackhole routes
2013-02-18 23:12:06 -05:00
Yaroslav Halchenko 40c5a2d996 ENH: adding more of diagnostic messages into -client while starting the daemon 2013-02-18 23:08:44 -05:00
Yaroslav Halchenko d5ae28facf Merge pull request #104 from gebi/t/route
add support for blocking through blackhole routes
2013-02-18 08:01:34 -08:00
Michael Gebetsroither a37ed388e7 Merge pull request #1 from grooverdan/route
add blocking types
2013-02-18 03:14:33 -08:00
Steven Hiscocks 294f073741 Typo in default pidfile in fail2ban.conf 2013-02-17 22:42:24 +00:00
Yaroslav Halchenko ec3080cba5 Reincarnated removed (by mistake) test for SplitAction 2013-02-17 17:21:03 -05:00
Yaroslav Halchenko 2312b1d950 ENH: made log messages while parsing files more informative + test for inaccessible file (Closes: gh-24) 2013-02-17 17:19:09 -05:00
Steven Hiscocks ce3ab34dd8 Added ability to specify PID file 2013-02-17 22:14:01 +00:00
Yaroslav Halchenko 5c9a9b1129 Merge remote-tracking branch 'github_kwirk_fail2ban/upstream#24' into _tent/conf_d
Merge is done with -X ours -- since I have implemented more generic handling
for config files, including now the ones under .d/ subdirectories.

* github_kwirk_fail2ban/upstream#24:
  Fix up for warning/error for inaccessible config files
  Warn if config file present but unreadable
2013-02-17 17:05:30 -05:00
Yaroslav Halchenko 9ba27353b6 NF: allow customization configuration under corresponding .d directories (Closes gh-114)
Additional changes:
  ENH: make basedir for Config's a kwarg to the constructor
  ENH: improved analysis/reporting on presence/accessibility of config
       files.  Got carried away and forgot about existing  work done by
	   Steven Hiscocks in the gh-115 -- will merge it in the next
       commit for the fair ack of his work

Now for any X.conf configuration file we have following ways to
provide customizations

  X.local -- read after .conf (kept for backward compatibility)
  X.d/ -- directory to contain additional .conf files, sorted
               alphabetically, e.g
  X.d/01_enable.conf       - to enable the jail
  X.d/02_custom_port.conf  - to change the port

X could be a 'jail' or 'fail2ban' or any other configuration file in
fail2ban.

Mention that all files still must contain the corresponding sections
(most of the time duplicating it across all of them).
2013-02-17 17:03:23 -05:00
Daniel Black 47b1ee39d8 add blocking type 2013-02-17 12:44:15 +11:00
Yaroslav Halchenko 8cf006827e BF: remove path from grep call in sendmail-whois-lines.conf Closes: gh-118 2013-02-12 08:48:05 -05:00
ArndRa 6cd358ee95 Update config/filter.d/sogo-auth.conf
Comment line in the top altered to fit file name. My local file was named differently...
2013-02-12 10:45:37 +01:00
Yaroslav Halchenko 6004fe7a94 just trailing spaces in setup.py 2013-02-11 16:17:52 -05:00
Yaroslav Halchenko 4d4c2d7e02 Brief changelog entry for multiline failregex. With this Close gh-54 2013-02-11 16:04:44 -05:00
Yaroslav Halchenko c7ae460b8a Merge remote-tracking branch 'github_kwirk_fail2ban/multi-line' into 0.9
* github_kwirk_fail2ban/multi-line:
  Revert changes to man/fail2ban-client.1
  Removed "common.local" include for FilterReader test
  Added 'maxlines' option to fail2ban-regex
  Regex get(Un)MatchedLines now returns whole lines only
  Added FilterReader test
  Added multiregex test for multi-line filter
  ignoreregex now functions correctly with multiline
  Minor typo in server/failregex.py
  Added <SKIPLINES> regex applicable for multi-line
  Sanitise testcase log 04
  Changed multi-line test to provided example
  Filter for multi-line now stores last time match
  Simplify and change some filter line buffer
  Initial changes and test for multi-line filtering
2013-02-11 16:01:11 -05:00
Yaroslav Halchenko 9dc662af27 Introducing 0.9.x series with 0.9.0a0
0.9.0a0 is chosen so that StrictVersion works within python 2.x
2013-02-11 16:00:05 -05:00
ArndRa 35bf84abad Create sogo-auth.conf
Regexp works with SOGo 2.0.5 or newer, following new feature implemented here: http://www.sogo.nu/bugs/view.php?id=2229
2013-02-11 08:19:48 -08:00
ArndRa 52f952e645 Update config/jail.conf
Update to use the new sogo-auth filter
2013-02-11 17:14:29 +01:00
Yaroslav Halchenko f8983872ad BF: return str(host) to avoid spurious characters in the logs (Close gh-113)
thanks to opoplawski@github
2013-02-01 16:24:04 -05:00
Yaroslav Halchenko 5f2d3832f7 NF: roundcube-auth filter (to close Debian #699442, needing debian/jail.conf section) 2013-01-31 14:41:34 -05:00
Steven Hiscocks 9c2e0cbbc8 Fix up for warning/error for inaccessible config files 2013-01-31 18:36:23 +00:00
Steven Hiscocks bf5f46c3d5 Warn if config file present but unreadable 2013-01-30 19:57:03 +00:00
Steven Hiscocks efea62e03f Revert changes to man/fail2ban-client.1 2013-01-28 20:47:32 +00:00
Steven Hiscocks 02218294bc Removed "common.local" include for FilterReader test 2013-01-28 18:41:12 +00:00
Yaroslav Halchenko d561a4c2bb BF: do not rely on scripts being under /usr -- might differ eg on Fedora -- rely on import of common.version (Closes gh-112)
This is also not ideal, since if there happens to be some systemwide common.version -- we are doomed

but otherwise, we cannot keep extending comparison check to /bin, /sbin whatelse
2013-01-28 09:54:12 -05:00
Yaroslav Halchenko acab23bdfe RF: move exceptions used by both client and server into common/exceptions.py
this prevents importing of server while operating with client only
2013-01-28 09:46:50 -05:00
Steven Hiscocks b48c17b8c4 Added 'maxlines' option to fail2ban-regex
This allows multi-line regex to be tested
2013-01-27 10:47:13 +00:00
Steven Hiscocks 99914ac0f3 Regex get(Un)MatchedLines now returns whole lines only
Fix issue where for regexs not anchored at start/end of line, that
getMatchedLines and getUnmatchedLines returned partial lines
2013-01-27 09:17:48 +00:00
Yaroslav Halchenko f8c8a5583e Merge remote-tracking branch 'gh-yarikoptic/master'
* gh-yarikoptic/master:
  BF: pyinotify - use bitwise op on masks and do not try tracking newly created directories
2013-01-26 12:36:49 -05:00
Yaroslav Halchenko c900c08eed Merge pull request #111 from opoplawski/nonettest
Initial support for --no-network option for fail2ban-testcases (Closes gh-110)
2013-01-25 16:45:01 -08:00
Orion Poplawski 431489c9b9 Remove unneeded setting of opts.no_network 2013-01-25 14:19:10 -07:00
Yaroslav Halchenko 6b2e76ba7f BF: pyinotify - use bitwise op on masks and do not try tracking newly created directories 2013-01-25 16:06:41 -05:00
Orion Poplawski fdd9dfb4b5 Initial support for --no-network option for fail2ban-testcases 2013-01-25 12:56:00 -07:00
Steven Hiscocks d05f420758 Added FilterReader test 2013-01-25 18:28:48 +00:00
Yaroslav Halchenko b8a861d012 Merge remote-tracking branch 'gh-yarikoptic/master'
* gh-yarikoptic/master:
  ENH: Added login authenticator failed regexp for exim filter
  DOC: Mention that logrotate configuration needs to be adjusted if logtarget is changed (Closes: #697333)
2013-01-25 13:27:30 -05:00
Steven Hiscocks 7234c2a3aa Added multiregex test for multi-line filter 2013-01-25 18:16:55 +00:00
Steven Hiscocks ea466d59f4 ignoreregex now functions correctly with multiline
Ignore regexs are now only compared to lines that match the failregex.
Supporting test also added for multiline regex and overlapping
multiline regex matches.
2013-01-25 18:11:40 +00:00
Yaroslav Halchenko 4a48844027 Merge pull request #107 from opoplawski/master
sshd filter - avoid banning on pam failures since might be too early. Close gh-106

If desired to ban on pam -- enable pam-generic filter, possibly even tuning in pam-generic.local the value for caught ttys in case of more detailed control needed

Provided example was:

 Jan 18 12:47:34 host sshd[23755]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=123.123.123.123  user=myuser
 Jan 18 12:47:34 host sshd[23755]: pam_sss(sshd:auth): authentication success; logname= uid=0 euid=0 tty=ssh ruser= rhost=123.123.123.123 user=myuser
 Jan 18 12:47:34 host sshd[23755]: Accepted password for myuser from 123.123.123.123 port 50615 ssh2
2013-01-25 08:24:44 -08:00
Yaroslav Halchenko 7d630cb0de Merge pull request #109 from blotus/master
Escape ' and " in matches
2013-01-25 08:11:04 -08:00
blotus 96eb8986cc Escape ' and " in matches tag 2013-01-25 13:37:22 +01:00
Steven Hiscocks 28f68a693f Minor typo in server/failregex.py 2013-01-24 21:12:45 +00:00
Steven Hiscocks 9b4806bfd3 Added <SKIPLINES> regex applicable for multi-line
This allows lines captured by <SKIPLINES> regex to remain in the line
buffer in Filter
2013-01-24 18:20:43 +00:00
Steven Hiscocks 5952819a58 Sanitise testcase log 04 2013-01-23 19:32:55 +00:00
Steven Hiscocks 00ab425492 Changed multi-line test to provided example 2013-01-23 19:10:27 +00:00
Steven Hiscocks 055aeeb227 Filter for multi-line now stores last time match
This is useful for log files which dont contain a date/time on every
line
2013-01-23 18:42:25 +00:00