Commit Graph

5164 Commits (2c4e7772164fcde77e3b12c69282bd821b4bf43c)

Author SHA1 Message Date
rhardy613 f73746d846 Fix ASSP filter to work with current release of ASSP
ASSP V1 development stopped at the end of 2014 and it is now deprecated.
All users were urged to upgrade to ASSP V2 which is still actively
developed. For some reason fail2ban 0.9.5 (and trunk) still have code
which only understands ASSP V1 logs. This means the filter ignores brute
force attacks against ASSP.
2016-07-31 13:50:52 -04:00
Yaroslav Halchenko 1fbb2c4c97 Merge pull request #1484 from yarikoptic/enh-pr-doc
DOC: added a note about choose correct branch for PR
2016-07-28 23:01:31 -04:00
Yaroslav Halchenko 1abb939233 Merge pull request #1492 from sebres/0.10-new-assert-meth
several test cases rewritten using new assertIn, assertNotIn
2016-07-28 23:01:02 -04:00
sebres 9d56079756 several test cases rewritten using new assertIn, assertNotIn (better as own from unittest, because support generators beautifying, etc.)
+ new forward compatibility method assertRaisesRegexp;
+ methods assertIn, assertNotIn, assertRaisesRegexp are test covered now;
+ easy-fix for distributions compatible test cases (e.g. fedora default backend is 'systemd'), (closes gh-1353, closes gh-1490)

cherry pick into 0.9 branch
2016-07-28 10:15:06 +02:00
Yaroslav Halchenko d9f039df03 Merge branch 'master' of git://github.com/fail2ban/fail2ban
* 'master' of git://github.com/fail2ban/fail2ban:
  BF: do not rely on long relative path to upstairs config - symlink dereferenced copied during install (#1485)
2016-07-15 09:02:42 -04:00
Yaroslav Halchenko 8f42580c05 some typos and TODOs -- thanks lintian 2016-07-15 09:00:29 -04:00
Yaroslav Halchenko cee09e29ec BF: do not rely on long relative path to upstairs config - symlink dereferenced copied during install (#1485)
* BF: do not rely on long relative path to upstairs config - symlink common.conf
* Added missing files to MANIFEST
2016-07-15 09:19:45 +02:00
Yaroslav Halchenko 1a86683bea ver. 0.9.5 (2016/07/15) - old-not-obsolete
-----------
 
 0.9.x line is no longer heavily developed.  If you are interested in
 new features (e.g. IPv6 support), please consider 0.10 branch and its
 releases.
 
 * `filter.d/monit.conf`
     - Extended failregex with new monit "access denied" version (gh-1355)
     - failregex of previous monit version merged as single expression
 * `filter.d/postfix.conf`, `filter.d/postfix-sasl.conf`
     - Extended failregex daemon part, matching also `postfix/smtps/smtpd`
       now (gh-1391)
 * Fixed a grave bug within tags substitutions because of incorrect
   detection of recursion in case of multiple inline substitutions
   of the same tag (affected actions: `bsd-ipfw`, etc).  Now tracks
   the actual list of the already substituted tags (per tag instead
   of single list)
 * `filter.d/common.conf`
     - Unexpected extra regex-space in generic `__prefix_line` (gh-1405)
     - All optional spaces normalized in `common.conf`, test covered now
     - Generic `__prefix_line` extended with optional brackets for the
      date ambit (gh-1421), added new parameter `__date_ambit`
 * `gentoo-initd` fixed `--pidfile` bug: `--pidfile` is option of
   `start-stop-daemon`, not argument of fail2ban (see gh-1434)
 * `filter.d/asterisk.conf`
     - Fixed security log support for PJSIP and Asterisk 13+ (gh-1456)
     - Improved log support for PJSIP and Asterisk 13+ with different
       callID (gh-1458)
 
 * New Actions:
     - `action.d/firewallcmd-rich-rules` and `action.d/firewallcmd-rich-logging`
         (gh-1367)
 * New filters:
     - slapd - ban hosts, that were failed to connect with invalid
         credentials: error code 49 (gh-1478)
 
 * Extreme speedup of all sqlite database operations (gh-1436),
   by using of following sqlite options:
     - (synchronous = OFF) write data through OS without syncing
     - (journal_mode = MEMORY) use memory for the transaction logging
     - (temp_store = MEMORY) temporary tables and indices are kept in memory
 * journald journalmatch for pure-ftpd (gh-1362)
 * Added additional regex filter for dovecot ldap authentication failures (gh-1370)
 * `filter.d/exim*conf`
     - Added additional regexes (gh-1371)
     - Made port entry optional
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iEYEABECAAYFAleISZsACgkQjRFFY3XAJMhSwwCeKPqhZSkU3X/R5IVTzpYPst6h
 SLkAnjhgAVCTlzfI74qpKISTEqIH2GBS
 =2+rF
 -----END PGP SIGNATURE-----

Merge tag '0.9.5' into debian

ver. 0.9.5 (2016/07/15) - old-not-obsolete
-----------

0.9.x line is no longer heavily developed.  If you are interested in
new features (e.g. IPv6 support), please consider 0.10 branch and its
releases.

* `filter.d/monit.conf`
    - Extended failregex with new monit "access denied" version (gh-1355)
    - failregex of previous monit version merged as single expression
* `filter.d/postfix.conf`, `filter.d/postfix-sasl.conf`
    - Extended failregex daemon part, matching also `postfix/smtps/smtpd`
      now (gh-1391)
* Fixed a grave bug within tags substitutions because of incorrect
  detection of recursion in case of multiple inline substitutions
  of the same tag (affected actions: `bsd-ipfw`, etc).  Now tracks
  the actual list of the already substituted tags (per tag instead
  of single list)
* `filter.d/common.conf`
    - Unexpected extra regex-space in generic `__prefix_line` (gh-1405)
    - All optional spaces normalized in `common.conf`, test covered now
    - Generic `__prefix_line` extended with optional brackets for the
     date ambit (gh-1421), added new parameter `__date_ambit`
* `gentoo-initd` fixed `--pidfile` bug: `--pidfile` is option of
  `start-stop-daemon`, not argument of fail2ban (see gh-1434)
* `filter.d/asterisk.conf`
    - Fixed security log support for PJSIP and Asterisk 13+ (gh-1456)
    - Improved log support for PJSIP and Asterisk 13+ with different
      callID (gh-1458)

* New Actions:
    - `action.d/firewallcmd-rich-rules` and `action.d/firewallcmd-rich-logging`
        (gh-1367)
* New filters:
    - slapd - ban hosts, that were failed to connect with invalid
        credentials: error code 49 (gh-1478)

* Extreme speedup of all sqlite database operations (gh-1436),
  by using of following sqlite options:
    - (synchronous = OFF) write data through OS without syncing
    - (journal_mode = MEMORY) use memory for the transaction logging
    - (temp_store = MEMORY) temporary tables and indices are kept in memory
* journald journalmatch for pure-ftpd (gh-1362)
* Added additional regex filter for dovecot ldap authentication failures (gh-1370)
* `filter.d/exim*conf`
    - Added additional regexes (gh-1371)
    - Made port entry optional

* tag '0.9.5':
  Added missing files to MANIFEST
  BF: do not rely on long relative path to upstairs config - symlink common.conf
2016-07-14 22:25:40 -04:00
Yaroslav Halchenko dca5ff44c2 Merge branch 'bf-common-zzz'
* bf-common-zzz:
  BF: do not rely on long relative path to upstairs config - symlink common.conf
2016-07-14 22:25:07 -04:00
Yaroslav Halchenko 79616b76bf Added missing files to MANIFEST 2016-07-14 22:19:10 -04:00
Yaroslav Halchenko 687ea8d333 BF: do not rely on long relative path to upstairs config - symlink common.conf 2016-07-14 22:15:22 -04:00
Yaroslav Halchenko 944c24f2d1 debian/watch -- not using githubredir service any longer 2016-07-14 21:46:14 -04:00
Yaroslav Halchenko 9a1960369c CPed patch dropped now 2016-07-14 21:43:32 -04:00
Yaroslav Halchenko 401173c2a6 changelog 2016-07-14 21:43:29 -04:00
Yaroslav Halchenko bbbe592788 ver. 0.9.5 (2016/07/15) - old-not-obsolete
-----------
 
 0.9.x line is no longer heavily developed.  If you are interested in
 new features (e.g. IPv6 support), please consider 0.10 branch and its
 releases.
 
 * `filter.d/monit.conf`
     - Extended failregex with new monit "access denied" version (gh-1355)
     - failregex of previous monit version merged as single expression
 * `filter.d/postfix.conf`, `filter.d/postfix-sasl.conf`
     - Extended failregex daemon part, matching also `postfix/smtps/smtpd`
       now (gh-1391)
 * Fixed a grave bug within tags substitutions because of incorrect
   detection of recursion in case of multiple inline substitutions
   of the same tag (affected actions: `bsd-ipfw`, etc).  Now tracks
   the actual list of the already substituted tags (per tag instead
   of single list)
 * `filter.d/common.conf`
     - Unexpected extra regex-space in generic `__prefix_line` (gh-1405)
     - All optional spaces normalized in `common.conf`, test covered now
     - Generic `__prefix_line` extended with optional brackets for the
      date ambit (gh-1421), added new parameter `__date_ambit`
 * `gentoo-initd` fixed `--pidfile` bug: `--pidfile` is option of
   `start-stop-daemon`, not argument of fail2ban (see gh-1434)
 * `filter.d/asterisk.conf`
     - Fixed security log support for PJSIP and Asterisk 13+ (gh-1456)
     - Improved log support for PJSIP and Asterisk 13+ with different
       callID (gh-1458)
 
 * New Actions:
     - `action.d/firewallcmd-rich-rules` and `action.d/firewallcmd-rich-logging`
 	(gh-1367)
 * New filters:
     - slapd - ban hosts, that were failed to connect with invalid
 	credentials: error code 49 (gh-1478)
 
 * Extreme speedup of all sqlite database operations (gh-1436),
   by using of following sqlite options:
     - (synchronous = OFF) write data through OS without syncing
     - (journal_mode = MEMORY) use memory for the transaction logging
     - (temp_store = MEMORY) temporary tables and indices are kept in memory
 * journald journalmatch for pure-ftpd (gh-1362)
 * Added additional regex filter for dovecot ldap authentication failures (gh-1370)
 * `filter.d/exim*conf`
     - Added additional regexes (gh-1371)
     - Made port entry optional
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iEYEABECAAYFAleIPhkACgkQjRFFY3XAJMiDBQCeNg/+B5nN1rJaDiqZmMlnIl+4
 CUsAoLhGyYWZ0imRBbkpUTaFZ+NdN5d6
 =H9Zr
 -----END PGP SIGNATURE-----

Merge tag '0.9.5' into debian

ver. 0.9.5 (2016/07/15) - old-not-obsolete
-----------

0.9.x line is no longer heavily developed.  If you are interested in
new features (e.g. IPv6 support), please consider 0.10 branch and its
releases.

* `filter.d/monit.conf`
    - Extended failregex with new monit "access denied" version (gh-1355)
    - failregex of previous monit version merged as single expression
* `filter.d/postfix.conf`, `filter.d/postfix-sasl.conf`
    - Extended failregex daemon part, matching also `postfix/smtps/smtpd`
      now (gh-1391)
* Fixed a grave bug within tags substitutions because of incorrect
  detection of recursion in case of multiple inline substitutions
  of the same tag (affected actions: `bsd-ipfw`, etc).  Now tracks
  the actual list of the already substituted tags (per tag instead
  of single list)
* `filter.d/common.conf`
    - Unexpected extra regex-space in generic `__prefix_line` (gh-1405)
    - All optional spaces normalized in `common.conf`, test covered now
    - Generic `__prefix_line` extended with optional brackets for the
     date ambit (gh-1421), added new parameter `__date_ambit`
* `gentoo-initd` fixed `--pidfile` bug: `--pidfile` is option of
  `start-stop-daemon`, not argument of fail2ban (see gh-1434)
* `filter.d/asterisk.conf`
    - Fixed security log support for PJSIP and Asterisk 13+ (gh-1456)
    - Improved log support for PJSIP and Asterisk 13+ with different
      callID (gh-1458)

* New Actions:
    - `action.d/firewallcmd-rich-rules` and `action.d/firewallcmd-rich-logging`
	(gh-1367)
* New filters:
    - slapd - ban hosts, that were failed to connect with invalid
	credentials: error code 49 (gh-1478)

* Extreme speedup of all sqlite database operations (gh-1436),
  by using of following sqlite options:
    - (synchronous = OFF) write data through OS without syncing
    - (journal_mode = MEMORY) use memory for the transaction logging
    - (temp_store = MEMORY) temporary tables and indices are kept in memory
* journald journalmatch for pure-ftpd (gh-1362)
* Added additional regex filter for dovecot ldap authentication failures (gh-1370)
* `filter.d/exim*conf`
    - Added additional regexes (gh-1371)
    - Made port entry optional

* tag '0.9.5': (70 commits)
  DOC: preparations for 0.9.5 release
  Added missing files to MANIFEST
  another variant of regex
  add trailing anchor to failregex
  DOC: Reformatted ChangeLog into legit Markdown (Closes #962)
  DOC: tuned up ChangeLog entries for 0.9.5
  add PR id to ChangeLog
  improved failregex according to @sebres recomendations
  Improved changes of gh-1458:   `[^']*` after callid was wrong, changed to `[^\)]*`;   regexp anchored at the end;   almost the same regex grouped to one;
  Improve PJSIP log support for asterisk 13+ with different callID (Squash gh-1458) Change the asterisk pjsip filter to don't take the callId part Add optional part between "Request" and "from" Listed all log message from asterisk
  * add `__prefix_line` to regex * fix time in log file
  add info to log file
  added sample log lines for slapd
  adding openldap slapd filter
  badip timeout option introduced, set to 30 seconds in our test cases (#1463)
  DOC: changelog for recent exim filters tune up
  Asterisk pjsip (#1456)
  BF: finalize that sample log line for exim4
  amend for new option of `usedns=raw` - forgotten validation fix inside setUseDns
  RF: for consistency use (?:XXX)? instead of (?:|XXX)
  ...
2016-07-14 21:36:59 -04:00
Yaroslav Halchenko 5714ac201b DOC: preparations for 0.9.5 release 2016-07-14 21:35:49 -04:00
Yaroslav Halchenko 0f88e8a658 Added missing files to MANIFEST 2016-07-14 21:31:18 -04:00
Yaroslav Halchenko 72c4743666 Merge pull request #1481 from yarikoptic/doc-changelog
Doc changelog - reformatted for markdown and a bit less indentation
2016-07-14 21:23:09 -04:00
Yaroslav Halchenko 21056c995d Merge remote-tracking branch 'origin/master' into doc-changelog
* origin/master:
  another variant of regex
  add trailing anchor to failregex
  add PR id to ChangeLog
  improved failregex according to @sebres recomendations
  * add `__prefix_line` to regex * fix time in log file
  add info to log file
  added sample log lines for slapd
  adding openldap slapd filter
2016-07-14 21:21:35 -04:00
Yaroslav Halchenko c15e968c1f DOC: added a note about choose correct branch for PR 2016-07-14 21:17:18 -04:00
Yaroslav Halchenko 5797ea0ae2 Let's work toward a2 release 2016-07-14 09:37:39 -04:00
Yaroslav Halchenko 28a0605f69 Merge pull request #1478 from gips0n/master
adding openldap slapd filter
2016-07-14 08:30:42 -04:00
sebres 9b03a6d42e 0.10 pre-release: MANIFEST RELEASE and man pages updates 2016-07-14 12:19:46 +02:00
sebres 41e3f2e5ed explicit flush stdout/stderr before exit, because of possible buffered output in python (echo or grep `fail2ban-client --version` can sometimes returns nothing) 2016-07-14 11:35:32 +02:00
Andrii Melnyk 7433b353ee another variant of regex 2016-07-14 10:19:21 +03:00
Andrii Melnyk 7c5828dd2a add trailing anchor to failregex 2016-07-13 21:09:42 +03:00
sebres 683f8fc56c Merge branch 'master' into 0.10 2016-07-13 19:41:46 +02:00
Yaroslav Halchenko bf3188c290 Merge pull request #1413 from sebres/f2b-perfom-prepare-716-cs-0.10
0.10-cs: client-server rewritten as modules / start in foreground / test coverage for cs
2016-07-13 12:01:16 -04:00
sebres f0b2cd2e39 remove no more necessary PRODUCTION from fail2banclient.py 2016-07-13 09:54:54 +02:00
sebres 53da35ea49 resolves Christmas-tree in logging (replaced with duplex space indentation) 2016-07-13 09:44:32 +02:00
sebres ad393fcfbb outsource assert..isStarted from setup into separate test case 2016-07-13 09:36:11 +02:00
Yaroslav Halchenko dfcf6f1963 BF+TST: isStarted was not checking __asyncServer for exist before checking it 2016-07-12 22:53:37 -04:00
Yaroslav Halchenko 52cd8a9a96 RF: _rebindSignal helper to centralize assignment of new signal handlers + minor PEP8ing 2016-07-12 22:24:56 -04:00
sebres 0dc3db1f43 test of `_kill_srv` added, don't kill server if foreground;
pid_exists already available in Utils;
small bug and stability fixing;
2016-07-12 12:06:48 +02:00
sebres 7242c9cbde code review after enhancements of Yaroslav 2016-07-12 12:02:05 +02:00
Yaroslav Halchenko 3c42b4f56e minor residual cleanups 2016-07-12 00:06:41 -04:00
Yaroslav Halchenko fcda7c9ac7 RF: revertably mock out exit call while testing new client/servers 2016-07-11 23:54:52 -04:00
Yaroslav Halchenko 1417cc99ef RF: group common tests in base class, specialize assesment of good/bad runs per client/server 2016-07-11 23:26:30 -04:00
Yaroslav Halchenko 4df06f5352 ENH: testcases - verbosity > 2 now also includes logger name (to replace need for custom --s) 2016-07-11 22:44:47 -04:00
Yaroslav Halchenko 94cada0c6b RF(PEP8 etc): Make new fail2banclienttestcase a bit more readable and PEP8 friendly 2016-07-11 22:42:48 -04:00
sebres 6a2b70f11d os.path.join instead of "/" - concatenation 2016-07-11 13:26:10 +02:00
sebres 4180cc362e code review 2016-07-11 13:22:58 +02:00
sebres 4c1bcac0c7 Merge branch '0.10' into f2b-perfom-prepare-716-cs-0.10 2016-07-11 11:28:34 +02:00
Yaroslav Halchenko 33ed71b3de DOC: Reformatted ChangeLog into legit Markdown (Closes #962) 2016-07-10 19:53:54 -04:00
Yaroslav Halchenko ec9c4a27f3 DOC: tuned up ChangeLog entries for 0.9.5
unified capitalized beginning of each entry
no trailing spaces or dots etc
2016-07-10 18:40:20 -04:00
Andrii Melnyk 2c5a489bc7 add PR id to ChangeLog 2016-07-08 13:55:58 +03:00
Andrii Melnyk 48c094f612 improved failregex according to @sebres recomendations 2016-07-08 13:45:10 +03:00
sebres de5d911fd5 Merge branch 'asterisk_pjsip_2' 2016-07-08 11:47:29 +02:00
sebres f5f204ca7c Improved changes of gh-1458:
`[^']*` after callid was wrong, changed to `[^\)]*`;
  regexp anchored at the end;
  almost the same regex grouped to one;

Closes #1458
2016-07-08 11:45:25 +02:00
nturcksin 72a157b8f2 Improve PJSIP log support for asterisk 13+ with different callID (Squash gh-1458)
Change the asterisk pjsip filter to don't take the callId part
Add optional part between "Request" and "from"
Listed all log message from asterisk
2016-07-08 11:45:22 +02:00