Commit graph

445 commits

Author SHA1 Message Date
Yaroslav Halchenko
9deafe6355 BF: adjusted for new IP of example.com 2014-12-21 21:40:58 -05:00
Steven Hiscocks
09b2016c05 TST: Skip SYSLOG log target test if '/dev/log' not present
Conflicts:
	testcases/servertestcase.py -- probably jumped over another commit in this cherry-pick which resulted in conflict
2014-04-24 12:24:57 -04:00
Steven Hiscocks
b89222b1d1 Merge pull request #696 from yarikoptic/bf/skip_apache_subsecond_resolution_on_2.5
BF(2.5): add minimal_python key to failJSON and skip some test lines.
2014-04-16 22:43:28 +01:00
Steven Hiscocks
2874399fed Merge pull request #694 from yarikoptic/bf/fix_move_test
a collection of fixes, including the one log rotation detection which "broke travis"
2014-04-16 22:28:42 +01:00
Yaroslav Halchenko
5bafc61e48 ENH(TST): relax test of sleep to "1" places from "2"
The reason is that internally it does round, so even 1.005 then would not
be equal to 1.  Making it spaces==1 should be sufficient for up to 1.05
i.e. we would allow 50ms "drift"
2014-04-16 13:17:58 -04:00
Yaroslav Halchenko
c5a754411d BF(2.5): add minimal_python key to failJSON and skip some test lines with date format which includes sub-seconds
For tests to pass also duplicated representative ones just without subsec timing
2014-04-16 10:51:24 -04:00
Yaroslav Halchenko
6eb67899a5 BF: overcome problem with failed *_movefile test if file gets properly closed
Discussion is in the comments on 7260403fdd
and fix consists of skipping first 3 lines while creating a "new" log file.
This should be sufficient to make fail2ban detect "log rotation" and thus
function properly
2014-04-16 08:43:54 -04:00
Yaroslav Halchenko
dfc7dd6dc9 ENH: use unique filename in LogFileFilterPoll on every setUp call 2014-04-16 08:26:39 -04:00
Yaroslav Halchenko
f206c3d493 BF: give a custom prefix to a tempfile and close it upon tearDown in ExecuteActions tests 2014-04-16 08:26:38 -04:00
Steven Hiscocks
7260403fdd TST: Close file to allow proper removal in MonitorFailures 2014-03-31 19:02:28 +01:00
Yaroslav Halchenko
18b476a93e BF(PY2.4,2.5): provide bin() function (introduced in 2.6) 2014-03-16 11:15:00 -04:00
Daniel Black
77fda9498c ENH: pull asterisk filter change to support syslog from 0.9 branch 2014-03-14 23:15:46 +11:00
Daniel Black
853bed8e4f ENH: more sendmail-reject filter items thanks to fab23 2014-03-02 14:04:27 +11:00
Daniel Black
c10cc20928 ENH: rename sendmail-spam to sendmail-reject 2014-02-28 08:41:04 +11:00
Daniel Black
d34569fb8d BF: email address as arg1 in sendmail filters 2014-02-27 11:38:23 +11:00
Daniel Black
72c84fe9b0 ENH: wider regex for RBL and sendmail-spam 2014-02-27 10:02:34 +11:00
Daniel Black
3d776afbb0 ENH: add filter for sendmail-{auth,spam}. Closes gh-20 2014-02-26 19:16:49 +11:00
Steven Hiscocks
9928f1df96 ENH: Allow 255.255.255.0 style mask for ignoreip 2014-02-19 17:51:08 +00:00
Ivo Truxa
f6ccd8878d date fix
sorry, need to get some glasses
2014-02-03 23:27:19 +01:00
Ivo Truxa
110b8e6905 ENH: Nagios filter
Sample log entry from /var/log/messages for a denied access to the nrpe2 (Nagios Remote Plugin Executor) daemon
2014-02-03 21:39:52 +01:00
Daniel Black
273b2f45a3 MRG: remove the "no auth attempts" as per aseques gh-600 2014-01-29 20:43:51 +11:00
Daniel Black
9b614ce486 ENH: dovecot filter enhancements 2014-01-29 20:27:45 +11:00
Joan
9c6aab37d6 As suggested by @grooverdan, grouping the tests and making them false to avoid accidentally reenabling them in the future 2014-01-29 08:32:14 +01:00
Joan
aaa86cd10f As suggested by @grooverdan, grouping the tests and making them false to avoid accidentally reenabling them in the future 2014-01-29 08:31:29 +01:00
Joan
08171ba52f Removed the -no auth attempts- from the triggers because of lots of FP 2014-01-28 12:44:46 +01:00
Daniel Black
657da2041c BF: dovecot filters, session characters and order of session/tls in log messages 2014-01-15 08:02:47 +11:00
Ivo Truxa
4765bc757c BF Dovecot auth failures
I am sorry, I installed the Win GIT, but still did not learn how to work with it, so am posting here again. This time, I'll avoid posting two pull requests, so please fix the dovecot.filter for me, if you don't mind.

This current filter does not match authentication errors in my Dovecot logs (two different lines attached). First of all the session string is at the end (after the optional TLS string), and not before it as it is now in the filter. I don't see it anywhere in the other logs here in the opposite order, hence I assume it is the rule for all installations. And then, the session ID can include also other characters than those matched by \w+ (i.e. the slash and the plus signs in my case), hence it needs to be \S+ instead. Personally, I'd do the regex much less restrictive than it is, but if I follow the current logics, the following form works:

<pre>^%(__prefix_line)s(pop3|imap)-login: (Info: )?(Aborted login|Disconnected)(: Inactivity)? \(((no auth attempts|auth failed, \d+ attempts)( in \d+ secs)?|tried to use disabled \S+ auth)\):( user=&lt;\S*&gt;,)?( method=\S+,)? rip=&lt;HO
ST&gt;, lip=(\d{1,3}\.){3}\d{1,3}(, TLS( handshaking)?(: Disconnected)?)?(, session=&lt;\S+&gt;)?\s*$</pre>
2014-01-14 17:59:40 +01:00
Daniel Black
01e5ae1234 Merge pull request #584 from grooverdan/exim-auth
ENH: Exim auth
2014-01-13 02:20:47 -08:00
Daniel Black
353b84a648 Merge branch 'patch-4' of https://github.com/truxoft/fail2ban into exim-auth 2014-01-13 19:25:46 +11:00
Ivo Truxa
9f107403e8 Update exim
When using Dovecot authentication for Exim, which is relatively common, the current regex for catching authentication failures needs a small tweak. The current plain|login options are too limiting and will only work in the cases when only the Exim's rudimentary built-in authentication is used. There can be not only the dovecot_login shown in this log example, but also dovecot_plain, ntlm, cram, cyrus, md5, and plenty of others. In fact many admins may opt for their own authentication labels, when setting up Exim. For this reason the regex should catch any label. I suggest modifying the regex in the following way:

<pre>^%(pid)s \w+ authenticator failed for (\S+ )?\(\S+\) \[<HOST>\]: 535 Incorrect authentication data( \(set_id=.*\)|: \d+ Time\(s\))?\s*$</pre>
2014-01-13 01:18:09 +01:00
Daniel Black
6b0e6b9bca ENH: add improper command pipelining postfix filter 2014-01-13 06:59:59 +11:00
Tomas Pihl
b52a4441fd Support ACL-events without AccountID. Typically happens when a registration
from an unknown domain is performed.

Add credits
2014-01-12 01:28:55 +01:00
Daniel Black
928f566d19 Merge pull request #576 from kwirk/ejabberd-filter
ENH: ejabberd filter
2014-01-09 14:52:18 -08:00
Steven Hiscocks
128112d51c ENH: ejabberd filter 2014-01-09 22:47:17 +00:00
Daniel Black
cd5aab5ff1 TST: for tag substition, multiple on same line 2014-01-10 09:20:56 +11:00
Daniel Black
755af0a51e Merge pull request #562 from grooverdan/jail.conf-complete_and_correct
ENH: Jail.conf now has all filters and TST: a mechanism to test this is truee
2014-01-06 12:08:45 -08:00
Daniel Black
50eab4df81 ENH: add filter groupoffice. Closes gh-566 2014-01-06 21:56:22 +11:00
Daniel Black
a8e0498389 BF: add expression for ssh filter for code 3: SSH2_DISCONNECT_KEY_EXCHANGE_FAILED. closes gh-289 2014-01-05 21:26:26 +11:00
Daniel Black
c700910155 TST: ensure stock jail has all filters 2014-01-05 21:06:30 +11:00
Daniel Black
23f0b854da MRG: merge in freeswitch 2014-01-04 12:24:40 +11:00
Daniel Black
69b3a1cf64 BF: catchin DEBUG messages will result in duplicates 2014-01-04 12:10:51 +11:00
Daniel Black
36533de6bc ENH: more filter expressions for freeswitch. Anchored existing one at end too 2014-01-04 08:21:22 +11:00
Daniel Black
04d28fd2e1 ENH: add filter freeswitch - as raised on mailing list 2014-01-03 13:00:37 +11:00
Daniel Black
83f3aeb308 ENH: filter for horde 2014-01-02 23:12:36 +11:00
Daniel Black
e2faa312c1 TST: test case for horde 2014-01-02 23:11:39 +11:00
Daniel Black
856407379b ENH: add filter openwebmail. Closes gh-543. 2013-12-31 08:09:00 +11:00
Daniel Black
3d79e1612b MRG: test cases on exim-spam 2013-12-29 21:38:00 +00:00
Ivo Truxa
d2658e063c Update exim-spam
An example with no valid FROM email address and host without reverse DNS record
2013-12-29 22:33:08 +01:00
Ivo Truxa
bb88cfaddb Update exim-spam
attached sample Exim log line to demonstrate a silently tossed message as described at https://github.com/fail2ban/fail2ban/issues/533
2013-12-29 18:53:04 +01:00
Daniel Black
6666f41ee6 ENH: apache modsecurity filter 2013-12-29 06:59:47 +00:00