Commit Graph

4328 Commits (f3b3a41639e2a06f021a7c46b1708327451f17c6)

Author SHA1 Message Date
Yaroslav Halchenko 24f875ad3e Merge pull request #1196 from yarikoptic/bf-longer-margin
BF: relax 1 sec delay testing to 100ms margin (Closes #1195)
2015-09-23 09:58:41 -04:00
Yaroslav Halchenko 84afcd8b1f BF(PY26): no assertGreater in 2.6 -- use explicit comparison 2015-09-23 09:45:51 -04:00
Yaroslav Halchenko 17a4289798 BF: relax 1 sec delay testing to 100ms margin (Closes #1195) 2015-09-23 08:38:51 -04:00
Yaroslav Halchenko 55e542b273 Merge remote-tracking branch 'pr/1170/head' -- opensuse paths
* pr/1170/head:
  Updated ChangeLog regarding openSUSE's path config
  Added configuration for opensuse path
2015-09-17 21:59:45 -04:00
Yaroslav Halchenko 82e528d1dd Merge pull request #1191 from yarikoptic/enh-year-after-day
ENH: new date pattern with year after day (not after entire entry)
2015-09-17 21:50:46 -04:00
Yaroslav Halchenko db1a3f17e1 ENH: new date pattern with year after day (not after entire entry) 2015-09-16 08:56:46 -04:00
Yaroslav Halchenko 41edfe8caf Merge pull request #1188 from yarikoptic/rf-assertLogged
RF(TST): self.assertTrue(self._is_logged()) -> self.assertLogged
2015-09-15 09:14:58 -04:00
Yaroslav Halchenko d0e6644acd Merge branch 'rf-assertLogged'
* rf-assertLogged:
  RF/BF: py26 has no {} sets, so just pass multiple entries as *args
  RF(TST): self.assertTrue(self._is_logged()) -> self.assertLogged
2015-09-15 08:58:15 -04:00
Yaroslav Halchenko d60c52b84f Merge pull request #1187 from yarikoptic/bf-nasty-children-tests
BF+RF: executeCmd should only return bool status on success and not throw exceptions (when timedout/killed) (Closes #1155)
2015-09-15 08:56:59 -04:00
Yaroslav Halchenko fbdd0b74a1 DOC: Changelog entry for this fix 2015-09-13 10:45:39 -04:00
Yaroslav Halchenko c2c4c40805 Merge remote-tracking branch 'origin/master' into bf-nasty-children-tests
* origin/master:
  Comment spelling fixes
  logrotate: Do not rotate empty logs
  logrotate: Remove outdated Fedora comment
  Updated Changelog
  Bugfix for dnsToIp resolver for fqdn with large list of IPs; closes #1164
  Added apache-badbots.conf
  Update gen_badbots
  Update apache-badbots.conf
  changelog for freshly merged PR (roundcube-auth definition of logpath)
  Fixed line suspected to be faulty
  renamed <NAME> to correct <ACT> in protocol

Conflicts:
    fail2ban/tests/actiontestcase.py -- due to comments fix up
2015-09-13 10:42:51 -04:00
Yaroslav Halchenko bfa286b8e4 Merge pull request #1189 from scop/logrotate
Logrotate tweaks
2015-09-13 10:36:20 -04:00
Yaroslav Halchenko cafc77d7db Merge pull request #1190 from scop/spelling
Comment spelling fixes
2015-09-13 10:33:41 -04:00
Ville Skyttä 943efdb1a0 Comment spelling fixes 2015-09-13 11:08:04 +03:00
Ville Skyttä 67a94733a9 logrotate: Do not rotate empty logs
As a useful side effect, prevents "Unable to contact server. Is it
running?" mails from cron when fail2ban hasn't been (intentionally)
running nor thus logging anything either.
2015-09-13 11:05:33 +03:00
Ville Skyttä 63c7ceb81d logrotate: Remove outdated Fedora comment 2015-09-13 10:57:51 +03:00
Yaroslav Halchenko 8a4dcafc8f RF/BF: py26 has no {} sets, so just pass multiple entries as *args 2015-09-12 21:37:40 -04:00
Yaroslav Halchenko 5ed731d3b3 RF(TST): self.assertTrue(self._is_logged()) -> self.assertLogged
and corresponding one for not + support for multiple entries at once,
and failure message listing actual log to ease troubleshooting
2015-09-12 19:59:55 -04:00
Yaroslav Halchenko 7cbb3980eb BF+RF: only return bool status on failed commands execution + mitigate different exit codes between bash/dash
Closes #1155
2015-09-12 19:39:44 -04:00
Yaroslav Halchenko 85b298e49c RF: try/except/finally in a single statement (while at it)
since we support now python >= 2.6
2015-09-12 12:59:37 -04:00
Yaroslav Halchenko 5b655639ab Merge pull request #1186 from EdwardBeckett/master
Updated Changelog
2015-09-11 11:43:58 -04:00
Edward Beckett f5b88bd377 Updated Changelog 2015-09-11 10:12:57 -04:00
Yaroslav Halchenko 4a53629004 Merge pull request #1184 from fail2ban/gh-1164-fix
Bugfix for dnsToIp resolver for fqdn with large list of IPs;
2015-09-09 18:07:26 -04:00
sebres 4cf3b576b9 Bugfix for dnsToIp resolver for fqdn with large list of IPs;
closes #1164
2015-09-08 18:20:48 +02:00
Yaroslav Halchenko 818be64ae1 Merge pull request #1180 from EdwardBeckett/master
Update apache-badbots.conf
2015-09-06 09:46:47 -04:00
Edward Beckett 4bd7991573 Added apache-badbots.conf 2015-09-06 01:12:19 -04:00
Edward Beckett 03460d5ed0 Update gen_badbots
Added plus char to the regex for escaping user-agent strings.
2015-09-06 01:05:52 -04:00
Edward Beckett 835b3ff483 Update apache-badbots.conf
Useragent strings including `+http` need to be escaped to be valid.
2015-09-05 00:12:28 -04:00
weberho 2d69fd20ae Updated ChangeLog regarding openSUSE's path config 2015-08-26 15:37:14 +02:00
weberho f7af93a677 Added configuration for opensuse path 2015-08-26 15:25:59 +02:00
Yaroslav Halchenko 60fbf7d750 changelog for freshly merged PR (roundcube-auth definition of logpath) 2015-08-26 09:03:23 -04:00
Yaroslav Halchenko db9ab7ffd0 Merge pull request #1169 from weberhofer/master
Fixed line suspected to be faulty
2015-08-26 09:02:13 -04:00
weberho d278fbca30 Fixed line suspected to be faulty 2015-08-26 14:48:55 +02:00
Yaroslav Halchenko 1b6800c889 Merge pull request #1147 from pheanex/rename-name-act
renamed <NAME> to correct <ACT> in protocol
2015-08-02 10:19:05 -04:00
Konstantin Manna 7de78f4bb8 renamed <NAME> to correct <ACT> in protocol 2015-08-02 14:55:38 +02:00
Yaroslav Halchenko 9ebf01293b Post release tune ups 2015-08-01 09:17:31 -04:00
Yaroslav Halchenko d67f502ff5 Tuned up removal of /run within package installation -- now in the root as well 2015-07-31 22:16:30 -04:00
Yaroslav Halchenko dce6e1cd3a Changelog and adjusted debian/control description to describe recommends 2015-07-31 22:16:25 -04:00
Yaroslav Halchenko bceb35ab34 ver. 0.9.3 (2015/08/01) - lets-all-stay-friends
----------
 
 - IMPORTANT incompatible changes:
    * filter.d/roundcube-auth.conf
      - Changed logpath to 'errors' log (was 'userlogins')
    * action.d/iptables-common.conf
      - All calls to iptables command now use -w switch introduced in
        iptables 1.4.20 (some distribution could have patched their
        earlier base version as well) to provide this locking mechanism
        useful under heavy load to avoid contesting on iptables calls.
        If you need to disable, define 'action.d/iptables-common.local'
        with empty value for 'lockingopt' in `[Init]` section.
    * mail-whois-lines, sendmail-geoip-lines and sendmail-whois-lines
      actions now include by default only the first 1000 log lines in
      the emails.  Adjust <grepopts> to augment the behavior.
 
 - Fixes:
    * reload in interactive mode appends all the jails twice (gh-825)
    * reload server/jail failed if database used (but was not changed) and
      some jail active (gh-1072)
    * filter.d/dovecot.conf - also match unknown user in passwd-file.
      Thanks Anton Shestakov
    * Fix fail2ban-regex not parsing journalmatch correctly from filter config
    * filter.d/asterisk.conf - fix security log support for Asterisk 12+
    * filter.d/roundcube-auth.conf
      - Updated regex to work with 'errors' log (1.0.5 and 1.1.1)
      - Added regex to work with 'userlogins' log
    * action.d/sendmail*.conf - use LC_ALL (superseeding LC_TIME) to override
      locale on systems with customized LC_ALL
    * performance fix: minimizes connection overhead, close socket only at
      communication end (gh-1099)
    * unbanip always deletes ip from database (independent of bantime, also if
      currently not banned or persistent)
    * guarantee order of dbfile to be before dbpurgeage (gh-1048)
    * always set 'dbfile' before other database options (gh-1050)
    * kill the entire process group of the child process upon timeout (gh-1129).
      Otherwise could lead to resource exhaustion due to hanging whois
      processes.
    * resolve /var/run/fail2ban path in setup.py to help installation
      on platforms with /var/run -> /run symlink (gh-1142)
 
 - New Features:
    * RETURN iptables target is now a variable: <returntype>
    * New type of operation: pass2allow, use fail2ban for "knocking",
      opening a closed port by swapping blocktype and returntype
    * New filters:
      - froxlor-auth - Thanks Joern Muehlencord
      - apache-pass - filter Apache access log for successful authentication
    * New actions:
      - shorewall-ipset-proto6 - using proto feature of the Shorewall. Still requires
        manual pre-configuration of the shorewall. See the action file for detail.
    * New jails:
      - pass2allow-ftp - allows FTP traffic after successful HTTP authentication
 
 - Enhancements:
    * action.d/cloudflare.conf - improved documentation on how to allow
      multiple CF accounts, and jail.conf got new compound action
      definition action_cf_mwl to submit cloudflare report.
    * Check access to socket for more detailed logging on error (gh-595)
    * fail2ban-testcases man page
    * filter.d/apache-badbots.conf, filter.d/nginx-botsearch.conf - add
      HEAD method verb
    * Revamp of Travis and coverage automated testing
    * Added a space between IP address and the following colon
      in notification emails for easier text selection
    * Character detection heuristics for whois output via optional setting
      in mail-whois*.conf. Thanks Thomas Mayer.
      Not enabled by default, if _whois_command is set to be
      %(_whois_convert_charset)s (e.g. in action.d/mail-whois-common.local),
      it
      - detects character set of whois output (which is undefined by
        RFC 3912) via heuristics of the file command
      - converts whois data to UTF-8 character set with iconv
      - sends the whois output in UTF-8 character set to mail program
      - avoids that heirloom mailx creates binary attachment for input with
        unknown character set
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iEYEABECAAYFAlW8IeUACgkQjRFFY3XAJMh0agCfXXoSyOQJpf3j0hA052Yxyhr9
 bSIAnA56k7DdZaqT//EvPvCugAEYPWvp
 =Vo7B
 -----END PGP SIGNATURE-----

Merge tag '0.9.3' into debian

ver. 0.9.3 (2015/08/01) - lets-all-stay-friends
----------

- IMPORTANT incompatible changes:
   * filter.d/roundcube-auth.conf
     - Changed logpath to 'errors' log (was 'userlogins')
   * action.d/iptables-common.conf
     - All calls to iptables command now use -w switch introduced in
       iptables 1.4.20 (some distribution could have patched their
       earlier base version as well) to provide this locking mechanism
       useful under heavy load to avoid contesting on iptables calls.
       If you need to disable, define 'action.d/iptables-common.local'
       with empty value for 'lockingopt' in `[Init]` section.
   * mail-whois-lines, sendmail-geoip-lines and sendmail-whois-lines
     actions now include by default only the first 1000 log lines in
     the emails.  Adjust <grepopts> to augment the behavior.

- Fixes:
   * reload in interactive mode appends all the jails twice (gh-825)
   * reload server/jail failed if database used (but was not changed) and
     some jail active (gh-1072)
   * filter.d/dovecot.conf - also match unknown user in passwd-file.
     Thanks Anton Shestakov
   * Fix fail2ban-regex not parsing journalmatch correctly from filter config
   * filter.d/asterisk.conf - fix security log support for Asterisk 12+
   * filter.d/roundcube-auth.conf
     - Updated regex to work with 'errors' log (1.0.5 and 1.1.1)
     - Added regex to work with 'userlogins' log
   * action.d/sendmail*.conf - use LC_ALL (superseeding LC_TIME) to override
     locale on systems with customized LC_ALL
   * performance fix: minimizes connection overhead, close socket only at
     communication end (gh-1099)
   * unbanip always deletes ip from database (independent of bantime, also if
     currently not banned or persistent)
   * guarantee order of dbfile to be before dbpurgeage (gh-1048)
   * always set 'dbfile' before other database options (gh-1050)
   * kill the entire process group of the child process upon timeout (gh-1129).
     Otherwise could lead to resource exhaustion due to hanging whois
     processes.
   * resolve /var/run/fail2ban path in setup.py to help installation
     on platforms with /var/run -> /run symlink (gh-1142)

- New Features:
   * RETURN iptables target is now a variable: <returntype>
   * New type of operation: pass2allow, use fail2ban for "knocking",
     opening a closed port by swapping blocktype and returntype
   * New filters:
     - froxlor-auth - Thanks Joern Muehlencord
     - apache-pass - filter Apache access log for successful authentication
   * New actions:
     - shorewall-ipset-proto6 - using proto feature of the Shorewall. Still requires
       manual pre-configuration of the shorewall. See the action file for detail.
   * New jails:
     - pass2allow-ftp - allows FTP traffic after successful HTTP authentication

- Enhancements:
   * action.d/cloudflare.conf - improved documentation on how to allow
     multiple CF accounts, and jail.conf got new compound action
     definition action_cf_mwl to submit cloudflare report.
   * Check access to socket for more detailed logging on error (gh-595)
   * fail2ban-testcases man page
   * filter.d/apache-badbots.conf, filter.d/nginx-botsearch.conf - add
     HEAD method verb
   * Revamp of Travis and coverage automated testing
   * Added a space between IP address and the following colon
     in notification emails for easier text selection
   * Character detection heuristics for whois output via optional setting
     in mail-whois*.conf. Thanks Thomas Mayer.
     Not enabled by default, if _whois_command is set to be
     %(_whois_convert_charset)s (e.g. in action.d/mail-whois-common.local),
     it
     - detects character set of whois output (which is undefined by
       RFC 3912) via heuristics of the file command
     - converts whois data to UTF-8 character set with iconv
     - sends the whois output in UTF-8 character set to mail program
     - avoids that heirloom mailx creates binary attachment for input with
       unknown character set

* tag '0.9.3': (99 commits)
  Release changes (too much of manual "labor"! ;))
  BF: realpath for /var/run/fail2ban Closes #1142
  Changelog entry for killpg fix
  Changelog entries for Serge's fixes
  bug fix: option 'dbpurgeage' was never set (always default) by start of fail2ban, because of invalid sorting of options ('dbfile' should be always set before other database options) / closes #1048, closes #1050
  BF: guarantee order of dbfile to be before dbpurgeage (Closes #1048)
  DOC: Changelog for shorewall-ipset-proto6.conf + adjusted its description
  DOC: moved and adjusted changelog entry from 0.9.2 within 0.9.3 to come
  TST: test to verify killing stuck children processes
  BF: kill the entire process group upon timeout (Close #1129)
  Limit the number of log lines in *-lines.conf actions
  ipjailmatches is on one line with its description in man jail.conf
  DOC: Changelog for iptables -w change
  Remove self.printlog() call
  Remove literal "TODO" from method's name
  BF: do not wrap iptables into itself. Thanks Lee
  Added a space between IP address and the following colon
  BF: symbiosis-blacklist-allports now also requires iptables-common.conf
  RF: use <iptables> to take effect of it being a parameter
  ENH: added lockingopt option for iptables actions, made iptables cmd itself a parameter
  ...
2015-07-31 21:34:06 -04:00
Yaroslav Halchenko 70ba5cb005 Release changes (too much of manual "labor"! ;)) 2015-07-31 21:32:13 -04:00
Yaroslav Halchenko 84ad3525e6 Merge pull request #1144 from yarikoptic/bf-realpath-var-run-1142
BF: realpath for /var/run/fail2ban Closes #1142
2015-07-31 15:50:46 -04:00
Yaroslav Halchenko 776322cea3 BF: realpath for /var/run/fail2ban Closes #1142 2015-07-31 10:12:14 -04:00
Yaroslav Halchenko c37009aec7 Merge branch 'grep-m1k' of github.com:szepeviktor/fail2ban
* 'grep-m1k' of github.com:szepeviktor/fail2ban:
  Limit the number of log lines in *-lines.conf actions

Conflicts:
  ChangeLog -- took both versions and adjusted the new one
  for -n 1000 change
2015-07-27 22:37:46 -04:00
Yaroslav Halchenko a80820e356 Changelog entry for killpg fix 2015-07-27 22:34:40 -04:00
Yaroslav Halchenko 38c320798d Merge pull request #1127 from yarikoptic/enh-iptables-w-close-1122
WIP ENH Add <lockingopt> (Close: #1122) and <iptables> to define the iptables call
2015-07-27 22:30:54 -04:00
Yaroslav Halchenko cb101e9f4a Merge pull request #1136 from yarikoptic/bf-timeout-nested-commands-killpg
WiP BF: kill the entire process group upon timeout (Close #1129)
2015-07-27 22:30:09 -04:00
Yaroslav Halchenko de69855157 Changelog entries for Serge's fixes 2015-07-27 10:35:14 -04:00
sebres 8a37a46fbb bug fix: option 'dbpurgeage' was never set (always default) by start of fail2ban, because of invalid sorting of options ('dbfile' should be always set before other database options) / closes #1048, closes #1050 2015-07-27 10:59:14 +02:00
Yaroslav Halchenko 17472a8b56 BF: guarantee order of dbfile to be before dbpurgeage (Closes #1048) 2015-07-27 10:18:29 +02:00
Yaroslav Halchenko 0041bc3770 DOC: Changelog for shorewall-ipset-proto6.conf + adjusted its description 2015-07-26 23:10:08 -04:00