Compare commits

..
Author SHA1 Message Date
Vid Luther d14d68d56c gitignore 2014-09-12 22:27:43 -05:00
Vid Luther 6830497241 changed requirements to python3 2014-09-12 22:25:55 -05:00
Vid Luther 5da1104701 custom Vagrantfile and provisioner
This allows me to build in a VM on a Mac.
2014-09-12 22:25:40 -05:00
Vid Luther 38ab997cb3 ran the fail2ban-2to3 script. 2014-09-12 22:24:52 -05:00
Vid Luther 587e626710 Merge branch 'debian-releases/experimental' into pressable/debian 2014-09-12 21:54:01 -05:00
Yaroslav Halchenko c516e8a010 run only tests not requiring network access 2014-03-25 11:17:34 -04:00
Yaroslav Halchenko de72ec0d39 BF: glitch 2014-03-25 10:04:11 -04:00
Yaroslav Halchenko 35a03c0f86 Adjusted changelog/news, do not ignore test failures, install more examples 2014-03-25 08:55:20 -04:00
Yaroslav Halchenko 33564948cc pruned not needed any longer remove-syslog.target-reference.patch 2014-03-25 00:45:29 -04:00
Yaroslav Halchenko 90648029d2 updated changelog 2014-03-25 00:44:00 -04:00
Yaroslav Halchenko b132bd8137 Merge commit '0.9.0-48-gabcab00' into debian-releases/experimental
* commit '0.9.0-48-gabcab00':
  Fix a few typos
  BF: Ignored IPs no longer being banned from database on restart
  ENH: Add iptables and firewalld to "After" for systemd service file.
  DOC: Add database settings for fail2ban.conf to jail.conf(5) man page
  TST: Skip badips.py test is no network option set
  TST: Skip SYSLOG log target test if '/dev/log' not present
  BF: fail2ban.conf reader expected "int" type for `loglevel`
  DOC: Update ChangeLog fixes
  BF: Handle case when no sqlite library is available for the database
2014-03-25 00:43:11 -04:00
Yaroslav Halchenko 6dae59a50c for experimental build straight from git debian-releases/experimental branch 2014-03-20 21:43:36 -04:00
Yaroslav Halchenko 97bd9b96e8 minor tune up to the changelog 2014-03-20 21:42:19 -04:00
Yaroslav Halchenko 7a027df1f3 Merge branch 'debian' into debian-releases/experimental
* debian:
  BF: forgot to define sender in jail.conf
2014-03-20 21:20:58 -04:00
Yaroslav Halchenko df08b2ff18 BF: forgot to define sender in jail.conf 2014-03-19 11:43:38 -04:00
Yaroslav Halchenko ae9b13be20 Changelog version and minor tune up to NEWS 2014-03-19 10:50:21 -04:00
Yaroslav Halchenko af854eec4d Merge commit '0.9.0-654-gc8694d8' (packaging tune ups for 0.9) into debian-releases/experimental
* commit '0.9.0-654-gc8694d8':
  Add news entry for 0.9.0
  use upstream jail.conf, paths are now defined in paths-debian.conf
  enable systemd integration
  remove /var/lib/fail2ban/fail2ban.sqlite3 when purging
  move renamed conffiles in maintscripts
  refresh patch deb_manpages_reportbug
  remove changeset_d4f6ca4f8531f332bcb7ce3a89102f60afaaa08e.diff, applied upstream
  Update debian packaging to dh compat 9

Conflicts:
	debian/jail.conf -- removed also in this branch
	debian/postinst  -- took changes for courier renames + adjusted version to 0.9.0-1~
	debian/postrm
	debian/preinst
2014-03-19 10:44:23 -04:00
Yaroslav Halchenko a133d79380 Merge commit '0.9.0-37-gdeb5924' into debian-releases/experimental
* commit '0.9.0-37-gdeb5924': (449 commits)
  Fix typo in comment
  DOC: note to have release tagged by a signed/annotated tag
  DOC: ChangeLog for gh-652
  Add a --print-all-matched option.
  DOC: Add DEVELOP documentation on use of pyflakes
  TST: Unused import in test_smtp
  DOC: Document recent changes
  DOC: Document recent fixes
  DOC: syntax
  DOC: new ChangeLog header
  TST: Fix test failing due to wrapping of long subject lines v2
  TST: Fix test failing due to wrapping of log subject lines
  BF: fail2ban-regex mix of tabs and spaces
  Changelog entry
  BF(PY2.4,2.5):  provide bin() function (introduced in 2.6)
  BF: python 2.4 and 2.5 compatibility -- no "except ... as ..." yet
  BF: Remove unused imports and variables.
  BF: badips.py action methods not static due to use of self._logSys
  BF: FilterSystemd.formatJournalEntry is a classmethod, not staticmethod
  BF: Remove "/var/run/fail2ban" from setup.py
  ...
2014-03-19 10:40:17 -04:00
Yaroslav Halchenko 5d95fcb718 two more forgotten renames (sasl, lighttpd-fastcgi) 2014-03-19 10:35:53 -04:00
Yaroslav Halchenko 1d23a4dc4f debian/post{inst,rm},preinst: - [thanks to Daniel Schaal]: take care about renaming firewall-cmd-direct-new.conf to firewallcmd-new.conf which happened
in 0.8.11-29-g56b6bf7
2014-03-19 10:26:07 -04:00
Yaroslav Halchenko 7376bb4321 Beefing up debian/jail.conf 2014-03-18 23:25:21 -04:00
Daniel Schaal c8694d8adf Add news entry for 0.9.0 2014-03-16 16:53:05 +01:00
Daniel Schaal cc4ea850fe use upstream jail.conf, paths are now defined in paths-debian.conf 2014-03-16 16:39:43 +01:00
Daniel Schaal 82c1ed3979 enable systemd integration 2014-03-16 16:39:43 +01:00
Daniel Schaal af088eefce remove /var/lib/fail2ban/fail2ban.sqlite3 when purging 2014-03-16 16:39:43 +01:00
Daniel Schaal e2b9cb01f5 move renamed conffiles in maintscripts 2014-03-16 16:39:28 +01:00
Yaroslav Halchenko f86ec8020f new changelog and dropping absorbed changesets* 2014-03-16 10:30:26 -04:00
Yaroslav Halchenko f04bae1366 Merge tag '0.8.13' into debian
* tag '0.8.13': (48 commits)
  DOC: DEVELOP release note changes
  PKG: version release
  PKG: include nagios filter/log
  DOC/ENH: update man pages for release
  ENH: pull asterisk filter change to support syslog from 0.9 branch
  Sanity-check print-all-* vs print-no-* options.
  Add --print-no-{missed,ignored} and restore -all.
  Only remember log lines we need to print later.
  Fix the --print-all-{missed,ignored} options.
  ENH: sendmail-reject for all smtp ports.
  ENH: more sendmail-reject filter items thanks to fab23
  BF: move to right location
  ENH: rename sendmail-spam to sendmail-reject
  BF: email address as arg1 in sendmail filters
  ENH: wider regex for RBL and sendmail-spam
  DOC: Add reference to action argument values which contain ","
  BF: add jail.conf definitions for sendmail* filters
  ENH: add filter for sendmail-{auth,spam}. Closes gh-20
  ENH: Allow 255.255.255.0 style mask for ignoreip
  BF: Fix complain action for multiple recipients and misplaced ";"
  ...
2014-03-16 10:26:22 -04:00
Daniel Schaal 05dc81d880 refresh patch deb_manpages_reportbug 2014-03-16 06:11:53 +01:00
Daniel Schaal ba5a3fdf4a remove changeset_d4f6ca4f8531f332bcb7ce3a89102f60afaaa08e.diff, applied upstream 2014-03-16 06:11:53 +01:00
Daniel Schaal 051f090313 Update debian packaging to dh compat 9 2014-03-16 06:11:49 +01:00
Daniel Schaal e2caa2b220 Merge tag '0.9.0' into debian 2014-03-15 12:46:02 +01:00
Yaroslav Halchenko 02effb1b0c closes for #739364 (apache-common) 2014-02-17 21:34:28 -05:00
Yaroslav Halchenko 34c3264f2c initial changelog entry + use flushlogs in logrotate 2014-02-07 01:00:42 -05:00
Yaroslav Halchenko 493c441bcb Merge tag '0.8.12' into debian
* tag '0.8.12': (177 commits)
  DOC: version and release date to 0.8.12 on 2014-01-22
  DOC/ENH: update man pages for release
  DOC: ChangeLog dateing and normalisation
  ENH: continue with rest of fail2ban config even if errors. Closes gh-585
  DOC: ChangeLog. Note incompatible changes and group new filters and actions under New Features
  BF: complete MANIFEST
  DOC: note in man page about "last message repeated" syslog compression. Closes Debian bug #620364
  DOC: credits for action.d/badips
  BF: dovecot filters, session characters and order of session/tls in log messages
  BF Dovecot auth failures
  Matching any Exim authentication name
  Update exim
  ENH: add improper command pipelining postfix filter
  Support ACL-events without AccountID. Typically happens when a registration from an unknown domain is performed.
  BF: Add ejabberd-auth to jail.conf
  ENH: ejabberd filter
  TST: for tag substition, multiple on same line
  DOC: spelling + GPL2+ for license
  DOC: fixing formatting in the section names of the manpage - \fB to return into bold
  DOC: some typos, fixes from Vincent Lefevre
  ...
2014-02-07 00:35:23 -05:00
Yaroslav Halchenko 90642725fa /etc/default/fail2ban -- minor typo. Thanks Vincent Lefevre for report (the rest will be reflected in the next upstream release) (Closes: #734421) 2014-01-06 23:40:49 -05:00
Yaroslav Halchenko d583637c50 changeset_ac061155f093464fb6cd2329d3d513b15c68e256.diff absorbed upstream 2013-11-17 17:32:25 -05:00
Yaroslav Halchenko 30fe2ce7ba changelog entry for previous cherry picked patch 2013-11-17 17:29:56 -05:00
Yaroslav Halchenko 0c24daeb10 added patch changeset_d4f6ca4f8531f332bcb7ce3a89102f60afaaa08e.diff to "cherry-pick" d4f6ca4f85 (ENH: adding custom date format for proftpd when logging in its own log file (default on Debian) -- includes milliseconds) 2013-11-17 17:27:50 -05:00
Yaroslav Halchenko 19a472928d More of changelog entries to close bugs addressed in this release 2013-11-16 22:58:15 -05:00
Yaroslav Halchenko 4dba65f685 debian/NEWS - information for change of default iptables action to REJECT now (Closes: #711463) 2013-11-16 22:30:31 -05:00
Yaroslav Halchenko 2d068572bc debian/jail.conf - dropbear jail: use dropbear filter (instead of ssh) and monitor auth.log instead of non-existing /var/log/dropbear (Closes: #620760) 2013-11-16 21:35:04 -05:00
Yaroslav Halchenko 7d8dc0f322 fresh changelog 2013-11-16 21:30:15 -05:00
Yaroslav Halchenko b2f5a79eeb Merge tag '0.8.11' into debian
* tag '0.8.11':
  DOC: finalise 0.8.11 release
  BF/ENH: DoS resistant roundcube-auth with test cases and more variation in IMAP error given
  BF: exim filter to be DoS resistant
  ENH: DoS resistant dropbear filter
  BF/ENH: asterisk connection ID is a hex not decimal number. Add "Rejecting unknown SIP connection from <HOST>" regex thanks to Jonathan Lanning
  ENH: apache-2.4 message IDs for filter apache-noscript
  TST: change source URL
  ENH: apache-overflow filter to have HTTP-2.4 message IDs and test samples
  ENH: apache-overflows - more detail on "request failed: URI too long (longer than %d)" with test case
  TST: end of json in sshd sample log
  TST: fix space in sshd sample log
  TST: test case that shows injection
  DOC: more on filter regexes - DEVELOP
  DOC: filter regex debugging
  BF: anchor introduced nginx-http-auth at the end
2013-11-16 21:19:48 -05:00
Yaroslav Halchenko 8f54c1990a provide Closes statements for Debian bugs 2013-11-10 12:17:13 -08:00
Yaroslav Halchenko a4ab39ea82 minor jail.conf tune ups. More needed to adopt the jails/filter added upstrean 2013-11-10 00:24:24 -08:00
Yaroslav Halchenko 93f30fe4f6 added patch changeset_ac061155f093464fb6cd2329d3d513b15c68e256.diff to "cherry-pick" ac061155f0 (BF: anchor introduced nginx-http-auth at the end) 2013-11-08 17:30:35 -08:00
Yaroslav Halchenko 521f8062bc Changelog entry/new version 2013-11-08 17:29:55 -08:00
Yaroslav Halchenko 128c4c978d Merge commit '0.8.11.pre1-29-gccd2657' into debian
* commit '0.8.11.pre1-29-gccd2657': (363 commits)
  DOC: minor typos in ChangeLog
  DOC: adding DEV Notes for for non-greedy matchin within sshd.conf
  BF: disallow exploiting of non-greedy .* in previous fix by providing too long rhost -- do not impose length limits for user-provided input
  BF: fixing injection for OpenSSH 6.3 -- making .* before <HOST> non-greedy
  Changelog for prior changes (gen_buildbots)
  ENH: condense asterisk regexs for speed
  BF: missed action in nginx-http-auth
  ENH: add filter.d/nginx-http-auth. Partially forfills #405
  ENH: regenerated config/filter.d/apache-badbots.conf
  NF: gen_badbots script to (re)generate/update config/filter.d/apache-badbots.conf
  DOC: keeping Changelog release-phrases uniform, simplified intro, unified
  DOC: Untabifying and reindenting a bit ChangeLog
  DOC: few more links for DEVELOP
  BF: fix dovecot filter for newer failure message. Closes Debian bug #709324
  BF: fix to filter.d/wuftp to support pam authentication - Debian bug #665925
  Add Fedora git repo of fail2ban package to DEVELOP
  firewalld-0.3.8 release that support --remove-rules out so documenting this.
  BF: remove duplication definition secion in webmin-auth
  DOC: alter release notes a bit more and versions in README.md
  BF/DOC: fix hopefully final MANIFEST and release instructions
  ...
2013-11-08 17:25:40 -08:00
Yaroslav Halchenko 965c07cb26 debian/watch - restrict version matching only to numbers and period (to exclude alpha releases of 0.9 series) 2013-07-08 10:08:35 -04:00
Yaroslav Halchenko 8960b5734a debian/jail.conf - added "submission" (port 587) to all SMTP-related jails (Closes: #714632). Thanks Tony den Haan for the report 2013-07-01 14:38:39 -04:00
Yaroslav Halchenko 278b49f52d debian/jail.conf: pure-ftpd jail should monitor syslog not auth.log.
Thanks Laurent Léonard for the report
2013-06-21 10:48:32 -04:00
Yaroslav Halchenko 01d637e9c0 status calls would dump all output to /dev/null 2013-06-19 22:19:40 -04:00
Yaroslav Halchenko b89e6ca770 BF: debian/fail2ban.init - fixed handling of the return code from do_start/do_stop 2013-06-19 21:56:35 -04:00
Yaroslav Halchenko 39699896aa initial changelog for 0.8.10, urgency high 2013-06-12 13:31:53 -04:00
Yaroslav Halchenko 3ed3c3af3d Merge tag '0.8.10' into debian
Release 0.8.10 -- wanna-be-secure, addresses possible DoS with apache- filters

* tag '0.8.10': (25 commits)
  DOC: add information on where to report vulnerabilities + pointer to HOWTO_Seek_Help
  Changes for 0.8.10 release (changelog, version, etc)
  BF: anchor apache- filters.  Close #248
  DOC: credits for gh-244
  Filter Asterisk: Add sample log entry to testcase.
  Filter Asterisk: Add AUTH_UNKNOWN_DOMAIN error to list
  ENH: purge a few more .*
  DOC: credits
  DOC: how to do filter enhancements
  TST: normalize logs to use example.com and 1.2.3.4 as IP
  ENH/BF: constrain regex. Fix ACL error regex
  ENH: port optional
  Changelog for previous PR
  DOC: Changelog entry fro preceeding merge from Terence
  TST: Fix fail2ban.conf reader test for unreliable dictionary order
  failregex when roundcube log driver is set to 'syslog'
  fixed failregex line for roundcube 0.9+
  TST: test all stock jails to have actions and correctly specifying blocktype
  CFG: assure actions for all the jails
  BF: blocktype must be defined within [Init] -- adding [Init] section.  Close #232
  ...
2013-06-12 13:25:15 -04:00
Yaroslav Halchenko 8811f4c5a8 Just ignore build-time tests failures for now -- still TODO 2013-05-13 12:00:10 -04:00
Yaroslav Halchenko b4b7fa6c60 patch deb_temp_disable_inaccessiblefile_test to allow build with fakeroot 2013-05-13 11:45:52 -04:00
Yaroslav Halchenko 6e6b1f1355 update lucid-dsc-patch patch 2013-05-13 11:37:06 -04:00
Yaroslav Halchenko 5b431f18dd boost policy compliance to 3.9.4 2013-05-13 11:34:08 -04:00
Yaroslav Halchenko 2e3eb926a5 ENH: run unittests at build time 2013-05-13 11:33:36 -04:00
Yaroslav Halchenko e3d068fcf8 BF: create directory for bash_completion.d 2013-05-13 11:27:55 -04:00
Yaroslav Halchenko 39bc2e34f1 Merge tag '0.8.9' into debian
Release 0.8.9

* tag '0.8.9':
  BF: add missing files to MANIFEST (I think we shoult not rely on sdist anyways -- 'git tag' tarballs are more thorough ;) )
2013-05-13 11:24:26 -04:00
Yaroslav Halchenko 30adad2029 added new sample jails definitions for ssh-route, ssh-iptables-ipset{4,6}, roundcube-auth, sogo-auth, mysqld-auth 2013-05-13 11:18:23 -04:00
Yaroslav Halchenko 4361f4c869 provides bash_completion.d/fail2ban 2013-05-13 11:06:52 -04:00
Yaroslav Halchenko 8332f6a3af refreshed manpage patches 2013-05-13 11:04:09 -04:00
Yaroslav Halchenko 414a1f0a84 update changelog entry 2013-05-13 11:03:51 -04:00
Yaroslav Halchenko a0b20c642c Merge tag '0.8.9' into debian
Releasing 0.8.9

* tag '0.8.9': (46 commits)
  All the (version) updates for the release of 0.8.9
  BF: (travis) relax the test for needed to be presented installed directories -- allow new
  BF: (travis) if tests ran under coverage -- there is a traceback parts to report (thus > would be present)
  ENH: also print the failing traceback line in case of failure
  ENH: include explicit list of new files which should not be there upon "install --root"
  ENH: now we know that logging handlers closing was still buggy in 2.6.2
  ENH: issue a warning if jail name is longer than 19 symbols (Close #222)
  DOC: inline commends with ';' are in effect only if ';' follows as space
  BF: Fix for filterpoll incorrectly checking for jailless state
  ENH: strengthen detection of working pyinotify
  ENH: use the same python executable for setup.py test
  ENH: actually tune up TraceBack to determine "unittest" portions of the stack across all python  releases
  TST: Some primarily smoke tests for tests utils
  TST: cover few more lines in fail2banreader.py
  ENH: basic test for setup.py itself (when applicable, should greatly improve coverage ;) )
  ENH: consistent operation of formatExceptionInfo + unittest for it
  ENH: point to the status of master branch on travis
  ENH: close open file in a test
  Previous coverage was 56% (without disregarding any pragma)
  ENH: close files in _test_move_into_file
  ...
2013-05-13 11:02:40 -04:00
Yaroslav Halchenko 7b24a7a599 README is .md now 2013-05-07 12:44:11 -04:00
Yaroslav Halchenko f2d75f612a updated changelog and suggest system-log-daemon 2013-05-07 12:41:28 -04:00
Yaroslav Halchenko d59c41197e Merge commit '0.8.8-276-g5e1d8b0' into debian
* commit '0.8.8-276-g5e1d8b0': (103 commits)
  ENH: logs/sshd -- have ":" after [daemon] (other uses are uncommon)
  ENH: logs/sshd -- use example.com as the resolved hostname in sample log lines
  ENH: filter.d/sshd.conf -- allow for trailing "via IP" in logs
  ENH: Removed unused log line
  ENH: logrotate file
  ENH: some form of logrotate based on what distros are doing
  DOC: macports distribution of fail2ban
  TST: test case for <br> tags in action
  DOC: credits for BSD ssh filter changes
  EHN: enhance sshd filter for bsd.
  DOC: purge of svn tags
  Slight tune up of changelog entry (treeish change due to squashing)
  fixed test date thx to steven
  tight control of the filter for ASSP
  as yaroslav wishes
  as daniel desires
  changed from DateASSPlike class to DateStrptime
  fixed little things
  added new date format support for ASSP SMTP Proxy
  Forgotten Changelog entry for "is None" changes
  ...
2013-05-07 12:33:13 -04:00
Yaroslav Halchenko b94dede5d5 adjusted changelog 2013-03-27 12:03:13 -04:00
Yaroslav Halchenko 76cdacf43a Merge commit '0.8.8-147-g4b11f07' into debian
* commit '0.8.8-147-g4b11f07':
  DOC: minor fix ups of manpages. fixes #159
  non-static (get|set)BaseDir for Configurator. fixes #160
2013-03-27 12:02:35 -04:00
Yaroslav Halchenko d9826d2a2d install .5 manpages as well 2013-03-27 11:28:25 -04:00
Yaroslav Halchenko 9b18768192 Refresh the manpages patch 2013-03-27 11:26:46 -04:00
Yaroslav Halchenko 1f78630865 Minimalistic changelog entry for a snapshot build 2013-03-27 11:22:58 -04:00
Yaroslav Halchenko 6c4aeaedc5 Merge commit '0.8.8-145-g72b0647' into debian
* commit '0.8.8-145-g72b0647': (114 commits)
  ENH: Slight tune ups for fresh SOGo filter + comment into the sample log file
  ENH: postfix filter -- react also on (450 4.7.1) with empty from/to. fixes #126
  TST: basic testing of reading the shipped jail.conf (forcing all jails to be enabled)
  ENH: allow to force enable all jails (for testing), do not crash for jails without actions (just warn)
  ENH: minor -- add default value into the warning if option had none provided
  ENH: _copy_lines_between_files -- read all needed, and only then write/flush at once
  ENH: move pyinotify callback debug message into callback + delay string interpolations
  ENH: adding ability to incorporate tracebacks into log lines while running tests
  ENH: FailManager -- improve log message to report total # of detected failures as well
  BF: allow to wait longer for FilterPoll in test_move_file
  ENH: elaborated debug log message about already detected failures
  BF: Remove custom __str__ for MonitorFailures and just adjust __name__ of the generated class
  DOC: Added suggested by @beilber description of .d/ + added I formatting to all filenames
  ENH: increase timeout to 20 sec from 10 sec in assert_correct_last_attempt
  BF: fixing up for handling of TAI64N timestamps and adding some unittest for prev commit (not effective much though)
  An example of failed logins against sogo
  Update sogo-auth.conf
  Added Daniel and Steven to THANKS
  My improvements to manpages
  PKG: change email that I want in RPMs
  ...
2013-03-27 11:19:46 -04:00
Yaroslav Halchenko b951ad78c4 debian/jail.conf: added findtime and documentation on those basic options from jail.conf 2013-02-18 18:51:15 -05:00
Yaroslav Halchenko 3754a48b24 Added lucid-dsc-patch to use pycentral on systems without dh_python2 2012-12-06 12:53:20 -05:00
Yaroslav Halchenko 1187253b6e Changelog entry for 0.8.8-1 2012-12-05 22:54:29 -05:00
Yaroslav Halchenko e484ef0a26 Merge tag '0.8.8' into debian
Primarily a bugfix release 0.8.8

* tag '0.8.8': (31 commits)
  Getting ready for 0.8.8 release (changelog, version boost)
  BF: guarantee that IP is stored as a base, non-unicode str (Closes gh-91)
  ENH: BF (forgotten import) for prev commit + removed duplicate Author, adjusted __ fields for that in fail2ban-* scripts
  ENH: until we make it proper module -- adjust sys.path only if system-wide run
  ENH: fail2ban-testcases-all -- pass cmdline options to fail2ban-testcases
  ENH: To help with gh-87 added hints into the log on some failure return codes (e.g. 0x7f00 for this one)
  ENH: trying to go native travis-ci python way to take advantage of virtualenv's with older pythons
  BF: typo
  BF: added a little shell script to excercise tests against all available Python versions
  ENH: travis -- try to run tests against all available python versions
  NF: rudimentary .travis.yml for travis-ci.org service
  BF: do not enable pyinotify backend if pyinotify is too old (Closes gh-80)
  DOC: forgotten --help entry for " unban "
  ENH: downgrade "already banned" from WARN to INFO level (Closes gh-79)
  minor: added a note on now "negative" log entries on "POSSIBLE BREAK-IN ATTEMPT"
  DOC: minor "fixes" in DEVELOP
  Added in while loop to process the Fail Manager after the requested banned IP was added to its queue.  This solves the issue of needing to touch the log file that is being monitored to get the IP to be banned accordingly.  Added in import of FailManagerEmpty exception class.
  ENH: refactored previous commit to make it more Pythonic (With prev commit closes gh-86, gh-81)
  Added in command option to unban and IP, just like using 'banip'.  Command looks like: fail2ban-client set <jail name> unbanip <ip>
  BF: in code we should use MyTime wrapper instead of time module directly
  ...
2012-12-05 22:53:04 -05:00
Yaroslav Halchenko 2a83cf2814 new changelog entry 2012-07-31 21:49:10 -04:00
Yaroslav Halchenko 020ac1b2e9 Merge tag '0.8.7.1' into debian
Minor bugfix release 0.8.7.1

* tag '0.8.7.1':
  Changelog for the fix -- will rerelease 0.8.7.1
  BF: removed sneaked a commented out sys.path.insert
2012-07-31 21:48:59 -04:00
Yaroslav Halchenko b41a249161 recommend python-pyinotify and only suggest python-gamin 2012-07-31 18:02:24 -04:00
Yaroslav Halchenko 197edfc271 debian/control,rules: switch to use dh_python2, boost policy compliance to 3.9.3 2012-07-31 17:33:13 -04:00
Yaroslav Halchenko d969aef8f8 BF: specify full action for recidive jail since it needs allport action 2012-07-31 17:02:34 -04:00
Yaroslav Halchenko 235267b7ac debian/source: switch to 3.0 (quilt) format 2012-07-31 16:54:09 -04:00
Yaroslav Halchenko 9429655045 use unprefixed upstream release tags 2012-07-31 16:52:44 -04:00
Yaroslav Halchenko 475558056e Merged changelog with unreleased 0.8.6-4 to avoid possible confusions 2012-07-31 16:52:00 -04:00
Yaroslav Halchenko 29f108dbb1 Close also #653074 since fixed in 5cac32e038 2012-07-31 16:50:35 -04:00
Yaroslav Halchenko 86ae7d2f5e debian/fail2ban.init: Should-(start|stop): iptables-persistent (Closes: #598109), ferm (Closes: #604843) 2012-07-31 16:21:03 -04:00
Yaroslav Halchenko 59e95b053e debian/jail.conf: adopted few jails from "upstreams" jail.conf: asterisk, recidive, lighttpd, php-url-open 2012-07-31 16:16:55 -04:00
Yaroslav Halchenko 1163450227 added usedns option into debian/jail.conf 2012-07-31 16:08:00 -04:00
Yaroslav Halchenko c4acaf8bd0 Refreshed the patch 2012-07-31 16:06:01 -04:00
Yaroslav Halchenko d8d950dcc6 ENH: adopted description about backends from upstream's jail.conf 2012-07-31 16:02:31 -04:00
Yaroslav Halchenko 14d609941b monitor syslog not auth.log for wuftpd 2012-07-31 15:59:44 -04:00
Yaroslav Halchenko 23e979a20e Adjusted changelog to reflect changes pulled with the merge 2012-07-31 15:58:15 -04:00
Yaroslav Halchenko 1fd9b6934e Merge tag '0.8.7' into debian -- additional fixes after reviewing more of Debian bug reports
Re-tagging 0.8.7 with hope to do that last time ;)

* tag '0.8.7':
  ENH: match possibly present "pam_unix(sshd:auth):" portion for sshd (Closes: #648020)
  ENH: add wu-ftpd failregex for use against syslog (Closes: #514239)
  BF: anchor chain name in actioncheck's for iptables actions (Closes: #672228)
  BF: inline comments must use ; not # -- recidive jail
2012-07-31 15:56:49 -04:00
Yaroslav Halchenko d0c5da97a4 Initiated debian changelog entry for 0.8.7-1 2012-07-31 14:04:25 -04:00
Yaroslav Halchenko 16d3ec579f Merge tag '0.8.7' into debian
Releasing 0.8.7

* tag '0.8.7':
  Boosted version to 0.8.7 + few more comments
  perspective changelog for 0.8.7
  DOC: minor (untabify, utf8) for ChangeLog
2012-07-31 12:34:17 -04:00
Yaroslav Halchenko 25077092e9 adjusted revision 2012-07-20 09:56:36 -04:00
Yaroslav Halchenko 954254008b Merge commit '0.8.6-100-gdca5634' into debian-devel -- inotify backend should work
* commit '0.8.6-100-gdca5634':
  RF: reordered tests + enabled gamin now that its fix is pending in Debian
  ENH+BF: filtergamin -- to be more inline with current design of filterinotify
  ENH: 1 more sleep_4_poll to guarantee difference in time stamp
  ENH: few more delays for cases relying on time stamps
2012-07-20 09:55:37 -04:00
Yaroslav Halchenko b8a8720a49 updated changelog 2012-07-19 17:30:25 -04:00
Yaroslav Halchenko cbce65574b Merge commit '0.8.6-95-gc0c1232' into debian-devel
* commit '0.8.6-95-gc0c1232':
  ENH: tests much more robust now across pythons 2.4 -- 2.7
  BF+RF: pyinotify refreshes watcher upon CREATE, unified/simplified *(add|del)LogPath among *Filters
  Ask users to report bugs to github's issues
  Replace "|" with "_" in ipmasq-ZZZzzz|fail2ban.rul (Closes gh-66)
2012-07-19 17:29:54 -04:00
Yaroslav Halchenko f6137c4def Adjusting the patch new path to report bugs 2012-07-19 14:50:51 -04:00
Yaroslav Halchenko 7dbbc61319 adjusted revision 2012-07-19 14:06:44 -04:00
Yaroslav Halchenko 09dd317b20 Merge commit '0.8.6-90-g08564bd' into debian-devel
* commit '0.8.6-90-g08564bd':
  ENH: fail2ban-testcases -- custom logging format to ease debugging, non-0 exit code in case of failure
  ENH: Filter's testcases -- rename, del + list again --- a bit unstable, might still fail from time to time
  BF: pyinotify -- monitor the parent directory for IN_CREATE + process freshly added file (Closes gh-44)
  ENH: first working unittest for checking polling and inotify backends
  RF/BF: just use pyinotify.ThreadedNotifier thread in filterpyinotify
  RF: filter.py -- single readline in a loop
  ENH: FilterPoll -- adjusted some msgs + allowed to operate without jail (for testing)
  Minor additional comment to DEVELOP
  ENH: extended test LogfileMonitor
  ENH: add more verbosity levels to be controlled while running unittests
  Added few tests of FileFilter.  yet to place them into a Jail-ed execution test
  DOC: distilling some of server "design" into DEVELOP notes for common good
  ENH: minor, just  trailing spaces/tabs + reformated a string
  ENH: added a basic test for FilterPoll for detection of modifications
  clarified that the are existing test cases and the 'coming soon' is about creating new ones.
  Added beginnings of documentation for developers
  BF: usedns=no was not working at all
  RF: filtertestcase.py to put common testing into a helping subroutine
  ENH: be able to control verbosity from cmdline for fail2ban-testcases
2012-07-19 14:06:14 -04:00
Yaroslav Halchenko ad6d9760f9 Adjusted url to "local DOS" issue now described in the manual 2012-07-14 11:12:54 -04:00
Yaroslav Halchenko ffd12554e4 changelog entry for 0.8.6~+git69-gb4099da-1 2012-06-06 23:41:10 -04:00
Yaroslav Halchenko 59baf83110 Merge commit '0.8.6-69-gb4099da' into debian-devel
* commit '0.8.6-69-gb4099da': (57 commits)
  DOC: Adjusted header for config/*.conf to mention .local and way to comment
  Fixed addBannedIP to add enough failures to trigger a ban, rather than just one failure.
  Fix Gentoo initd script (drop extra_commands)
  ENH: catch failed ssh logins due to being listed in DenyUsers. Close gh-47 (Closes: #669063)
  DOC: comment in jail.conf for the need of multiple jails for asterisk
  Add the INCLUDE section to use __pid_re feature
  Disable asterisk jail by default
  Change jail for asterisk, add support for SIP and SIP-TLS on TCP and UDP ports
  Change NOTICE by NOTICE%(__pid_re)s
  Added a warning for the recidive jail
  BF: fail2ban-regex -- adding forgotten char for -v
  Remove custom bantime
  Add sample log file for asterisk
  Add $ at the end of the failregex
  ENH: fail2ban-regex -- quieter by default and added --verbose mode
  ENH: minor, just pythonized some parts of fail2ban-regex summary
  ENH: rudimentary __repr__ for Filter and Jail + moved usedns into set method
  BF: allow trailing whitespace in few missing it regexes for sshd.conf
  BF+ENH: added %m-%d-%Y pattern + do not add %Y for Feb 29 fix if already present in the pattern
  minor comment into TODO
  ...
2012-06-06 23:39:22 -04:00
Yaroslav Halchenko 6ad4276a4e DOC: note about way to add comments + pruned not needed authorship line and obsolete $Revision$ 2012-06-04 22:46:59 -04:00
Yaroslav Halchenko 826f53f92d adjusted changelog 2012-02-10 08:20:10 -05:00
Yaroslav Halchenko 7154b3aefd Since we are exiting with non-0 -- all msgs should be failures 2012-02-09 13:03:53 -05:00
Yaroslav Halchenko f0da12e58b Merge pull request #36 from glennaaldering/patch-3
Provide informative exit codes upon exit of status.
Debian policy is not specifying any and status command is optional, but LSB  http://refspecs.linuxbase.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptact.html  does provide the desired ones
2012-02-09 09:48:33 -08:00
Glenn Aaldering 5cac32e038 Making sure that the status command gives the correct exit code when fail2ban is not running. 2012-02-09 18:33:14 +01:00
Yaroslav Halchenko b25dddff31 Added dovecot section to Debian's jail.conf. Thanks to Laurent Léonard (Closes: #655182) 2012-01-08 21:47:18 -05:00
Yaroslav Halchenko 088aa67381 DOC: finalizing changelog 2012-01-07 19:46:42 -05:00
Yaroslav Halchenko 84e30ff73a DOC: a bit extended and reordered run-rootless.txt 2012-01-07 19:43:15 -05:00
Yaroslav Halchenko 1be14b8470 FIX: added blank build-{arch,indep} to pacify lintian 2012-01-07 18:56:07 -05:00
Yaroslav Halchenko 5701ecb681 FIX: reversed Vcs- fields 2012-01-07 18:54:34 -05:00
Yaroslav Halchenko 2828ad4968 FIX: we are using debian not debian-release branch now 2012-01-07 18:53:13 -05:00
Yaroslav Halchenko 055c3e9323 changelog for xt changes 2012-01-07 15:33:20 -05:00
Yaroslav Halchenko 5c2abe60a1 Added pure-ftpd section to Debian's jail.conf. Thanks to Laurent Léonard (Closes: #654412) 2012-01-05 23:01:11 -05:00
Zbigniew Jędrzejewski-Szmek 5a82e41285 Merge branch 'xt_recent-echo' into debian 2012-01-06 00:55:04 +01:00
Zbigniew Jędrzejewski-Szmek bc82a68481 DOC: add documentation for xt_recent-echo without root 2012-01-06 00:55:04 +01:00
Zbigniew Jędrzejewski-Szmek de502cf2e4 NF: run as different user (disabled by default) 2012-01-06 00:36:50 +01:00
Yaroslav Halchenko aa4f5cf2b7 BF: adjusted vcs- fields to point to github upstream repo 2011-11-29 09:00:29 -05:00
Yaroslav Halchenko e5ea44b999 Adjusted debian/watch to fetch tarballs from github 2011-11-28 23:01:32 -05:00
Yaroslav Halchenko a27bff08e5 [1efe1bc] Fresh upstream release (Closes: #648324) + boost policy to 3.9.2 2011-11-28 22:54:36 -05:00
Yaroslav Halchenko 2fd8be18e5 Merge commit '0.8.6' into debian
* commit '0.8.6':
  Changelog and version changes for 0.8.6
  Revert "ENH: server.py -- addLogPath with tail=True"
  DOC: updated contact information to direct to github and mailing list
  ENH: added custom timeformat with '.' as separator. Close gh-1
  BF: stop all communications before stopping the jails (Close gh-7)
  ENH: added logging while stopping the jails
  Add Date: header for sendmail*.conf actions
  BF: gentoo-initd assure /var/run dir + remove stale sock file
  ENH: fix of syntax for compatibility with Python 2.4
  ENH: stay compatible with python < 2.5 (use md5 if hashlib is N/A)
  BF: use hashlib instead of deprecated md5
  ENH: Remove obsolete code from gentoo init script. Bug gentoo#367819.
2011-11-28 22:47:27 -05:00
Yaroslav Halchenko 9faeecc67c Merge branch 'master' into debian-release
* master:
  moving log samples under testcases/files
2011-11-18 11:59:21 -05:00
Yaroslav Halchenko 40fbb55044 Merge branch 'master' (early part) into debian-release
* 'master' (early part):
  Adding log samples accumulated in Debian branch
  BF: removing minor bashism in ipmasq example file (closes: #530078). Thanks Raphael Geissert
  Added ipmasq rule file to restart fail2ban when iptables are wiped out (closes: #461417). Thanks Guido Bozzetto
  added rudimentary .gitignore
  BF: be able to detect time for VNC recording only 2 letters of year (closes: #537610)
2011-11-18 11:59:08 -05:00
Yaroslav Halchenko 9b96a01d3e adjusting email for Cyril to be cyril.jaquier@fail2ban.org 2011-11-18 11:49:34 -05:00
Yaroslav Halchenko 42e6653486 RF: moving manpages tune ups into debian patch
original commit 3389184f41
2011-11-18 11:43:33 -05:00
Yaroslav Halchenko e28688a3d3 Adding files which were not present in sdist
and removed PKG-INFO
2011-11-18 10:47:47 -05:00
Yaroslav Halchenko cd38985e61 Merge branch 'master' into debian-release
* master: (27 commits)
  ENH: server.py -- addLogPath with tail=True
  ENH: set/getFile for ticket.py -- found in source distribution of 0.8.4
  NF: adding unittests for previous commit
  ENH: removed expansion for few Date and Revision SVN keywords
  ENH: sshd.conf -- allow user names to have spaces and trailing spaces in the line
  Removed duplicate entry for DataCha0s/2\.0 in badbots (closes: #519557)
  BF: return declaration of TABLE back (thanks to michaelberg79)
  Update server/datetemplate.py
  format output of matches data.
  ENH: minor unittest to see if tickets carry correct 'matches'
  ENH: introduced usa of Ticket.__matches throughout
  ENH: added 'matches' to the Ticket(s) and deprecated "custom" constructors for derived *Tickets
  ENH: modelines for emacs and vim to assure consistent indentation scheme (tabs)
  ENH: failmanager -- additional debug message about # of known failures
  ENH: rudimentary __str__ for the ticket
  ENH: more human-accessible printout of the dates if any comparison fails
  ENH: few debug messages and use MyTime.localtime instead of straight time.time
  ENH: Added localtime() to MyTime
  BF: set TZ to CEST while unittesting so dates matching would work
  ENH: added a .pylintrc to help with consistent appearance and catch obvious problems
  ...

Conflicts:
	MANIFEST  -- wasn't present before due to base on source distribution
	server/ticket.py  -- strange conflict -- should be benign
2011-11-18 10:43:13 -05:00
Yaroslav Halchenko 8f3d54882a manually removed all expansion for SVN keywords to match with master 2011-11-18 10:10:45 -05:00
Yaroslav Halchenko 2b27d83625 changelog for 0.8.5-2 2011-09-23 22:12:27 -04:00
Yaroslav Halchenko 9c4b041821 BF: Lock server's executeCmd to prevent racing among iptables calls (Closes: #554162)
Many kudos go to Michael Saavedra for the solution and the patch.
2011-09-23 22:05:29 -04:00
Yaroslav Halchenko a41a8e3dc7 adjusted changelog 2011-07-28 23:22:33 -04:00
Yaroslav Halchenko 72109ef12c Merge branch 'debian' into debian-release
* debian:
  Added a note on diverting logrotate configuration for custom logtarget=SYSLOG (Closes: #631917)
2011-07-28 23:20:39 -04:00
Yaroslav Halchenko 60f459e3c4 Added a note on diverting logrotate configuration for custom logtarget=SYSLOG (Closes: #631917) 2011-07-28 23:20:23 -04:00
Yaroslav Halchenko 584539a2c4 changelog for 0.8.5-1 2011-07-28 23:08:16 -04:00
Yaroslav Halchenko d7dd84be01 Merge branch 'upstream' into debian-release
* upstream:
  for 0.8.5 release -- changelog + version
  BF: use addfailregex instead of failregex while processing per-jail "failregex" parameter (Closes: #635830) (LP: #635036)
  BF: use os.path.join to generate full path - fixes includes in configs given local filename
  very minor -- uniform indentation in example
  BF: use standard/reserved example.com instead of mail.com
  ENH: Adding author for dovecot filter and prunning unneeded space in the regexp
2011-07-28 23:08:08 -04:00
Yaroslav Halchenko 2ab8e35652 Merge branch 'debian' into debian-release
* debian:
  Set backend to auto and recommends python-gamin (Closes: #524425)
2011-07-28 23:08:03 -04:00
Yaroslav Halchenko 6c07999157 Merge commit 'remotes/upstream-repo/tags/FAIL2BAN-0_8_5^' into upstream
* commit 'remotes/upstream-repo/tags/FAIL2BAN-0_8_5^':
  for 0.8.5 release -- changelog + version
  BF: use addfailregex instead of failregex while processing per-jail "failregex" parameter (Closes: #635830) (LP: #635036)
  BF: use os.path.join to generate full path - fixes includes in configs given local filename
  very minor -- uniform indentation in example
  BF: use standard/reserved example.com instead of mail.com
  ENH: Adding author for dovecot filter and prunning unneeded space in the regexp

Conflicts:
	common/version.py -- my added copyright
2011-07-28 23:07:09 -04:00
Yaroslav Halchenko 9e3c29659d Set backend to auto and recommends python-gamin (Closes: #524425) 2011-07-28 22:56:33 -04:00
Yaroslav Halchenko 846029d154 untabify the most recent changelog 2011-03-23 17:34:32 -04:00
Yaroslav Halchenko 559c76700d Merge branch 'debian' into debian-release
* debian:
  Added dropbear jail and made formatting of jails consistent (and untabified)
  ENH: Moving gbp.conf under debian/
2011-03-23 17:22:26 -04:00
Yaroslav Halchenko a7632c0d2a Added dropbear jail and made formatting of jails consistent (and untabified) 2011-03-23 17:22:21 -04:00
Yaroslav Halchenko 1d76a032ee ENH: Moving gbp.conf under debian/ 2011-03-23 17:19:54 -04:00
Yaroslav Halchenko 66934d4ed6 changelog entry for 0.8.4+svn20110323-1 2011-03-23 17:19:14 -04:00
Yaroslav Halchenko ba09fae1ac Merge branch 'debian' into debian-release
* debian: (21 commits)
  debian/jail.conf: got 'chain' parameter to be specified for iptables actions (Closes: #515599)
  debian/jail.conf: closing " for protocol specification
  BF: proftpd filter -- if login failed -- count regardless of the reason for failure
  BF: Allow for trailing spaces in proftpd logs
  BF: escaping () in pure-ftpd filter. Thanks Teodor
  BF: allow space in the trailing of failregex for sasl.conf: see http://bugs.debian.org/573314
  ENH: add <chain> to action.d/iptables*. Thanks Matthijs Kooijman: see http://bugs.debian.org/515599
  NF: Adding found on a drive filter.d/dovecot.conf
  ENH: make filter.d/apache-overflows.conf catch more: see http://bugs.debian.org/574182
  ENH: dropbear filter: see http://bugs.debian.org/546913
  BF: Use /var/run/fail2ban instead of /tmp for temp files in actions: see http://bugs.debian.org/544232
  ENH: adjusted description for sasl jail (Closes: #615952)
  ENH: slight rewordings of the long description (Closes: #588176)
  debian/copyright: updated copyright years
  Boosted policy compliance version to 3.9.1 (no changes seems to be due)
  spellcheck jail.conf. Thanks Christoph Anton Mitterer
  spellcheck debian/jail.conf (Closes: #598206). Thanks Christoph Anton Mitterer
  debian: default ignoreip to ignore entire loopback zone (/8): see http://bugs.debian.org/598200
  default ignoreip to ignore entire loopback zone (/8): see http://bugs.debian.org/598200
  Tai64N stores time in GMT, we need to convert to local time before returning
  ...
2011-03-23 17:04:21 -04:00
Yaroslav Halchenko 086176c4df debian/jail.conf: got 'chain' parameter to be specified for iptables actions (Closes: #515599)
+ trailing whitespaces were removed

Thanks to Christoph Anton Mitterer for the original bugreport raising the
concern and Matthijs Kooijman for giving 'chains parameter' idea
2011-03-23 16:59:39 -04:00
Yaroslav Halchenko 350c5f676b debian/jail.conf: closing " for protocol specification
not sure how it did not have any negative impact before :-/
2011-03-23 16:56:57 -04:00
Yaroslav Halchenko 898fab7758 Merge commit 'upstream/0.8.4+svn20110323' into debian
* commit 'upstream/0.8.4+svn20110323': (37 commits)
  BF: proftpd filter -- if login failed -- count regardless of the reason for failure
  BF: Allow for trailing spaces in proftpd logs
  BF: escaping () in pure-ftpd filter. Thanks Teodor
  BF: allow space in the trailing of failregex for sasl.conf: see http://bugs.debian.org/573314
  ENH: add <chain> to action.d/iptables*. Thanks Matthijs Kooijman: see http://bugs.debian.org/515599
  NF: Adding found on a drive filter.d/dovecot.conf
  ENH: make filter.d/apache-overflows.conf catch more: see http://bugs.debian.org/574182
  ENH: dropbear filter: see http://bugs.debian.org/546913
  BF: Use /var/run/fail2ban instead of /tmp for temp files in actions: see http://bugs.debian.org/544232
  spellcheck jail.conf. Thanks Christoph Anton Mitterer
  default ignoreip to ignore entire loopback zone (/8): see http://bugs.debian.org/598200
  Tai64N stores time in GMT, we need to convert to local time before returning
  debug entry for lines ignored due to falling below findtime (v2)
  disabling entirely named-refused-udp jail with a big fat warning
  added time module. bug reported in buanzo's blog at http://blogs.buanzo.com.ar/2009/04/fail2ban-patch-ban-ip-address-manually.html
  - Patch to make log file descriptors cloexec to stop leaking file descriptors on fork/exec. Thanks to Jonathan Underwood. https://bugzilla.redhat.com/show_bug.cgi?id=230191#c24
  - Changed to SVN version.
  - Release 0.8.4.
  - Oups... Forgot the ChangeLog...
  - Check the inode number for rotation in addition to checking the first line of the file. Thanks to Jonathan Kamens. - Red Hat Bugzilla - Bug 503852 - SF.net Bug #2800279.
  ...
2011-03-23 16:53:51 -04:00
Yaroslav Halchenko 93d1583bb9 Merge branch 'upstream-0.8' into upstream
* upstream-0.8:
  BF: proftpd filter -- if login failed -- count regardless of the reason for failure
  BF: Allow for trailing spaces in proftpd logs
  BF: escaping () in pure-ftpd filter. Thanks Teodor
  BF: allow space in the trailing of failregex for sasl.conf: see http://bugs.debian.org/573314
  ENH: add <chain> to action.d/iptables*. Thanks Matthijs Kooijman: see http://bugs.debian.org/515599
  NF: Adding found on a drive filter.d/dovecot.conf
  ENH: make filter.d/apache-overflows.conf catch more: see http://bugs.debian.org/574182
  ENH: dropbear filter: see http://bugs.debian.org/546913
  BF: Use /var/run/fail2ban instead of /tmp for temp files in actions: see http://bugs.debian.org/544232
2011-03-23 16:51:16 -04:00
Yaroslav Halchenko a6bc0e517f ENH: adjusted description for sasl jail (Closes: #615952) 2011-03-23 16:09:00 -04:00
Yaroslav Halchenko 97ac5bd205 ENH: slight rewordings of the long description (Closes: #588176) 2011-03-23 16:00:01 -04:00
Yaroslav Halchenko cfd6cf7b1b debian/copyright: updated copyright years 2011-03-23 15:55:43 -04:00
Yaroslav Halchenko eb5bcdad81 Boosted policy compliance version to 3.9.1 (no changes seems to be due) 2011-03-23 15:55:01 -04:00
Yaroslav Halchenko 4c288cd156 1 more example log line for sasl filter 2011-03-23 15:48:31 -04:00
Yaroslav Halchenko d3ca26d4b1 adding sample log files for apache-overflows and dovecot 2011-03-23 15:08:19 -04:00
Yaroslav Halchenko 2394a465fa Merge branch 'upstream-0.8' into upstream
* upstream-0.8:
  spellcheck jail.conf. Thanks Christoph Anton Mitterer
  default ignoreip to ignore entire loopback zone (/8): see http://bugs.debian.org/598200
  Tai64N stores time in GMT, we need to convert to local time before returning
  debug entry for lines ignored due to falling below findtime (v2)
  disabling entirely named-refused-udp jail with a big fat warning
  added time module. bug reported in buanzo's blog at http://blogs.buanzo.com.ar/2009/04/fail2ban-patch-ban-ip-address-manually.html
2011-03-23 13:36:22 -04:00
Yaroslav Halchenko aede895096 Forgotten Merge commit 'upstream/0.8.4' into debian
Should have been done long before -- debian/ branch tracks source
releases of fail2ban, and there was 0.8.4 which was at once merged into
debian-release (debian branch + patches/fixes) but not into debian

* commit 'upstream/0.8.4':
  Imported Upstream version 0.8.4
  - Use 80 columns.
  - Fixed maxretry/findtime rate. Many thanks to Christos Psonis. Tracker #2019714.
  - Made the named-refused regex a bit less restrictive in order to match logs with "view". Thanks to Stephen Gildea.
  - Use timetuple instead of utctimetuple for ISO 8601. Maybe not a 100% correct fix but seems to work. Tracker #2500276.
  - Changed <HOST> template to be more restrictive. Debian bug #514163.
  - Added cyrus-imap and sieve filters. Thanks to Jan Wagner. Debian bug #513953.
  - Pull a commit from Yaroslav git repo. BF: addressing added bang to ssh log (closes: #512193).
  - Added missing semi-colon in the bind9 example. Thanks to Yaroslav Halchenko.
  - Added NetBSD ipfilter (ipf command) action. Thanks to Ed Ravin. Tracker #2484115.
  - Improved SASL filter. Thanks to Loic Pefferkorn. Tracker #2310410.
  - Added CPanel date format. Thanks to David Collins. Tracker #1967610.
  - Added nagios script. Thanks to Sebastian Mueller.
  - Removed print.
  - Removed begin-line anchor for "standard" timestamp. Fixed Debian bug #500824.
  - Remove socket file on startup is fail2ban crashed. Thanks to Detlef Reichelt.
2011-03-23 13:20:40 -04:00
Yaroslav Halchenko db6aadfc39 spellcheck debian/jail.conf (Closes: #598206). Thanks Christoph Anton Mitterer 2010-09-27 09:16:34 -04:00
Yaroslav Halchenko 35e43cf650 debian: default ignoreip to ignore entire loopback zone (/8): see http://bugs.debian.org/598200 2010-09-27 09:11:47 -04:00
Yaroslav Halchenko 95a28f3c65 Merge branch 'debian' into debian-release
* debian:
  adding misc:Depends as advised by lintian
  Adding news about named-refused-udp
  thanks lintian -- tuning up version for elderly NEWS entry
2010-06-28 22:13:37 -04:00
Yaroslav Halchenko baf8cc7eb5 adding misc:Depends as advised by lintian 2010-06-28 22:13:27 -04:00
Yaroslav Halchenko ecb29697e2 Adding news about named-refused-udp 2010-06-28 22:13:15 -04:00
Yaroslav Halchenko 52f37cc159 thanks lintian -- tuning up version for elderly NEWS entry 2010-06-28 22:10:22 -04:00
Yaroslav Halchenko f7bb5e2df4 changelog entry for 0.8.4-3 2010-06-28 21:50:37 -04:00
Yaroslav Halchenko 20c0d92e89 Merge branch 'debian' into debian-release
* debian:
  Replacing word of caution with big fat warning and commenting out named-refused-udp completely (Closes: #583364)
  Adding arno-iptables-firewall (no deprecation of ipmasq per Joey Hess mentioning, which still could be used on lenny systems)
2010-06-28 21:45:56 -04:00
Yaroslav Halchenko 833f60a38a Replacing word of caution with big fat warning and commenting out named-refused-udp completely (Closes: #583364) 2010-06-28 21:45:47 -04:00
Yaroslav Halchenko d9b8625629 Merge branch 'upstream-0.8' into debian-release
* upstream-0.8:
  disabling entirely named-refused-udp jail with a big fat warning
  added time module. bug reported in buanzo's blog at http://blogs.buanzo.com.ar/2009/04/fail2ban-patch-ban-ip-address-manually.html
2010-06-28 21:42:06 -04:00
Yaroslav Halchenko d1b9e71173 Adding arno-iptables-firewall (no deprecation of ipmasq per Joey Hess mentioning, which still could be used on lenny systems) 2010-05-26 17:58:20 -04:00
Yaroslav Halchenko eb08f17cb2 changelog entry for -2 2010-02-25 00:20:08 -05:00
Yaroslav Halchenko 47fae42a3b Merge branch 'upstream' into debian-release
* upstream:
  - Patch to make log file descriptors cloexec to stop leaking file descriptors on
  - Changed to SVN version.
2010-02-25 00:17:02 -05:00
Yaroslav Halchenko 26c3416793 Merge branch 'debian' into debian-release
* debian:
  BF: --install-layout=deb for setup.py +  python (>= 2.5.4-1~) to fix install with python2.6 (closes: #571213)
2010-02-25 00:16:59 -05:00
Yaroslav Halchenko 3f898d7c05 BF: --install-layout=deb for setup.py + python (>= 2.5.4-1~) to fix install with python2.6 (closes: #571213) 2010-02-25 00:03:22 -05:00
Yaroslav Halchenko 1b8a52fa48 Merge remote branch 'upstream-repo/FAIL2BAN-0_8' into upstream
* upstream-repo/FAIL2BAN-0_8:
  - Patch to make log file descriptors cloexec to stop leaking file descriptors on
  - Changed to SVN version.
2010-02-24 23:56:21 -05:00
Yaroslav Halchenko d0f32768d6 releasing 0.8.4-1 into Debian 2009-09-11 01:49:04 -04:00
Yaroslav Halchenko d410555435 Merge branch 'debian' into debian-release
* debian:
  NF: .gbp.conf with instructions for git-buildpackage
2009-09-11 01:10:25 -04:00
Yaroslav Halchenko d2d283d18c NF: .gbp.conf with instructions for git-buildpackage 2009-09-11 01:10:15 -04:00
Yaroslav Halchenko 187d6c96a9 changelog entry 2009-09-11 00:53:53 -04:00
Yaroslav Halchenko e783caaee1 Merge branch 'up/fixes' into build
* up/fixes:
  BF: proftpd filter -- if login failed -- count regardless of the reason for failure
  BF: Allow for trailing spaces in proftpd logs (closes: #507986)
  BF: be able to detect time for VNC recording only 2 letters of year (closes: #537610)
  BF: escaping (). Thanks Teodor (Closes: #544744)

Conflicts:
	config/filter.d/proftpd.conf
2009-09-10 18:03:51 -04:00
Yaroslav Halchenko 3b7e6b6cbc Merge branches 'debian' and 'up/log_examples' into build
* debian:
  actually boosting policy
  BF: use "set logtartet" instead of "reload" while logrotate. Thanks J.M.Roth (Closes: #537773)
  BF: adjusted README.Debian - multiport is default (closes: #545971)

* up/log_examples:
  added proftpd examples from wiki
  NF: few examples for pure-ftpd
2009-09-10 18:03:32 -04:00
Yaroslav Halchenko 513d4bc2e9 Merge branch 'upstream' into build
* upstream: (21 commits)
  Imported Upstream version 0.8.4
  - Release 0.8.4.
  - Oups... Forgot the ChangeLog...
  - Check the inode number for rotation in addition to checking the first line of the file. Thanks to Jonathan Kamens.
  - Fixed typo. Thanks to Dudi Goldenberg.
  added traceback to asyncserver.py's import.
  Added item about logging subsystem shutdown being moved, to Changelog.
  moved logging shutdown out of quit(), into end of start() in server.py
  Disabled jail lighttpd-fastcgi by default.
  - Added entry for "Ban IP" command.
  added "Ban IP" command to fail2ban branch 0.8
  - Added two new filters: lighttpd-fastcgi and php-url-fopen.
  - Moved last entries in the config/ part.
  added two new filter files (PHP url_fopen, lighttpd fastcgi alerts), updated MANIFEST and jail.conf accordingly
  - Added svn:keywords property.
  - Added helper module in common.
  added 'unexpected communication error' fix to ChangeLog. Added formatExceptionInfo to server/asyncserver.py
  added missing import sys to asyncserver.py
  more readable code for python version comparison
  added python version detection to asyncore.loop(use_poll=True|False)
  ...
2009-09-10 18:02:00 -04:00
Yaroslav Halchenko f5c69d8958 Merge commit '0_8_4' into upstream
* commit '0_8_4':
  - Release 0.8.4.
  - Oups... Forgot the ChangeLog...
  - Check the inode number for rotation in addition to checking the first line of the file. Thanks to Jonathan Kamens.
  - Fixed typo. Thanks to Dudi Goldenberg.
  added traceback to asyncserver.py's import.
  Added item about logging subsystem shutdown being moved, to Changelog.
  moved logging shutdown out of quit(), into end of start() in server.py
  Disabled jail lighttpd-fastcgi by default.
  - Added entry for "Ban IP" command.
  added "Ban IP" command to fail2ban branch 0.8
  - Added two new filters: lighttpd-fastcgi and php-url-fopen.
  - Moved last entries in the config/ part.
  added two new filter files (PHP url_fopen, lighttpd fastcgi alerts), updated MANIFEST and jail.conf accordingly
  - Added svn:keywords property.
  - Added helper module in common.
  added 'unexpected communication error' fix to ChangeLog. Added formatExceptionInfo to server/asyncserver.py
  added missing import sys to asyncserver.py
  more readable code for python version comparison
  added python version detection to asyncore.loop(use_poll=True|False)
  Fix for python 2.6 / 3.0 incompatibility
2009-09-10 17:56:16 -04:00
Yaroslav Halchenko c13c64d28b Imported Upstream version 0.8.4 2009-09-10 15:08:14 -04:00
Yaroslav Halchenko 5ed0f7f90a BF: proftpd filter -- if login failed -- count regardless of the reason for failure 2009-09-10 12:04:42 -04:00
Yaroslav Halchenko b81cfae700 added proftpd examples from wiki 2009-09-10 12:02:02 -04:00
Yaroslav Halchenko 7721695f44 BF: Allow for trailing spaces in proftpd logs (closes: #507986) 2009-09-10 11:58:12 -04:00
Yaroslav Halchenko efb1f57f62 actually boosting policy 2009-09-10 11:22:48 -04:00
Yaroslav Halchenko 3389184f41 BF: be able to detect time for VNC recording only 2 letters of year (closes: #537610) 2009-09-10 11:15:38 -04:00
Yaroslav Halchenko 472a7b31ce BF: use "set logtartet" instead of "reload" while logrotate. Thanks J.M.Roth (Closes: #537773) 2009-09-10 11:05:56 -04:00
Yaroslav Halchenko 2d4b82c670 BF: escaping (). Thanks Teodor (Closes: #544744) 2009-09-10 10:50:31 -04:00
Yaroslav Halchenko bae3183f9b NF: few examples for pure-ftpd 2009-09-10 10:35:05 -04:00
Yaroslav Halchenko 3dd16eeddf BF: adjusted README.Debian - multiport is default (closes: #545971) 2009-09-10 09:09:01 -04:00
Yaroslav Halchenko 779d377ac5 Merge branch 'debian' into build
* debian:
  actually removing fail2ban installed /var/run/fail2ban while building package
2009-07-09 01:48:49 -04:00
Yaroslav Halchenko d2695899a0 actually removing fail2ban installed /var/run/fail2ban while building package 2009-07-09 01:48:43 -04:00
Yaroslav Halchenko f6861cd5ee Changelog entries 2009-07-09 01:42:48 -04:00
Yaroslav Halchenko fee38e2fc0 Merge branch 'debian' into build
* debian:
  BF: thanks lintian -- removing stale /var/run/fail2ban from dirs -- should be created by init script
  Thanks lintian for catching a misspell in README.Debian
  boosted debhelper compatibility to 5
2009-07-09 01:38:05 -04:00
Yaroslav Halchenko 01a5faf131 BF: thanks lintian -- removing stale /var/run/fail2ban from dirs -- should be created by init script 2009-07-09 01:37:58 -04:00
Yaroslav Halchenko 8de0f450e9 Thanks lintian for catching a misspell in README.Debian 2009-07-09 01:36:46 -04:00
Yaroslav Halchenko 53066981af boosted debhelper compatibility to 5 2009-07-09 01:36:03 -04:00
Yaroslav Halchenko 59223c3513 Very lengthy debian/changelog entry 2009-07-09 01:15:47 -04:00
Yaroslav Halchenko 5f6a30fe9e Merge branches 'up/fixes', 'up/log_examples', 'debian' and 'up/ipmasq' into build
* up/fixes:
  Removed duplicate entry for DataCha0s/2\.0 in badbots (closes: #519557)
  BF: Allow for trailing spaces in proftpd logs (closes: #507986)

* up/log_examples:
  added sasl example log file

* debian:
  Added a comment into Debian-shipped jail.conf about sasl logpath -- it might preferable to monitor warn.log in case of postfix

* up/ipmasq:
  BF: removing minor bashism in ipmasq example file (closes: #530078). Thanks Raphael Geissert
2009-07-09 00:58:46 -04:00
Yaroslav Halchenko 9eefb6927f Removed duplicate entry for DataCha0s/2\.0 in badbots (closes: #519557) 2009-07-09 00:58:29 -04:00
Yaroslav Halchenko a687363fff Merge branch 'upstream' into build
* upstream:
  - Use 80 columns.
  - Fixed maxretry/findtime rate. Many thanks to Christos Psonis. Tracker #2019714.
  - Made the named-refused regex a bit less restrictive in order to match logs with "view". Thanks to Stephen Gildea.
  - Use timetuple instead of utctimetuple for ISO 8601. Maybe not a 100% correct fix but seems to work. Tracker #2500276.
  - Changed <HOST> template to be more restrictive. Debian bug #514163.
  - Added cyrus-imap and sieve filters. Thanks to Jan Wagner. Debian bug #513953.
  - Pull a commit from Yaroslav git repo. BF: addressing added bang to ssh log (closes: #512193).
  - Added missing semi-colon in the bind9 example. Thanks to Yaroslav Halchenko.
  - Added NetBSD ipfilter (ipf command) action. Thanks to Ed Ravin. Tracker #2484115.
  - Improved SASL filter. Thanks to Loic Pefferkorn. Tracker #2310410.
  - Added CPanel date format. Thanks to David Collins. Tracker #1967610.
  - Added nagios script. Thanks to Sebastian Mueller.
  - Removed print.
  - Removed begin-line anchor for "standard" timestamp. Fixed Debian bug #500824.
  - Remove socket file on startup is fail2ban crashed. Thanks to Detlef Reichelt.

Conflicts:

	config/filter.d/sshd.conf
	server/filter.py
2009-07-09 00:55:57 -04:00
Yaroslav Halchenko fec4e7d286 Merge commit 'upstream-repo/FAIL2BAN-0_8' into upstream
* commit 'upstream-repo/FAIL2BAN-0_8':
  - Use 80 columns.
  - Fixed maxretry/findtime rate. Many thanks to Christos Psonis. Tracker #2019714.
  - Made the named-refused regex a bit less restrictive in order to match logs with "view". Thanks to Stephen Gildea.
  - Use timetuple instead of utctimetuple for ISO 8601. Maybe not a 100% correct fix but seems to work. Tracker #2500276.
  - Changed <HOST> template to be more restrictive. Debian bug #514163.
  - Added cyrus-imap and sieve filters. Thanks to Jan Wagner. Debian bug #513953.
  - Pull a commit from Yaroslav git repo. BF: addressing added bang to ssh log (closes: #512193).
  - Added missing semi-colon in the bind9 example. Thanks to Yaroslav Halchenko.
  - Added NetBSD ipfilter (ipf command) action. Thanks to Ed Ravin. Tracker #2484115.
  - Improved SASL filter. Thanks to Loic Pefferkorn. Tracker #2310410.
  - Added CPanel date format. Thanks to David Collins. Tracker #1967610.
  - Added nagios script. Thanks to Sebastian Mueller.
  - Removed print.
  - Removed begin-line anchor for "standard" timestamp. Fixed Debian bug #500824.
  - Remove socket file on startup is fail2ban crashed. Thanks to Detlef Reichelt.

Conflicts:

	MANIFEST
	TODO
2009-07-09 00:53:42 -04:00
Yaroslav Halchenko 6197fb178c Added a comment into Debian-shipped jail.conf about sasl logpath -- it might preferable to monitor warn.log in case of postfix 2009-07-09 00:48:05 -04:00
Yaroslav Halchenko 213954466f BF: removing minor bashism in ipmasq example file (closes: #530078). Thanks Raphael Geissert 2009-07-09 00:40:38 -04:00
Yaroslav Halchenko e3e0f8986e added sasl example log file 2009-07-09 00:32:00 -04:00
Yaroslav Halchenko 483292900c BF: Allow for trailing spaces in proftpd logs (closes: #507986) 2009-07-09 00:22:02 -04:00
Yaroslav Halchenko 3114418b1e Merge branch 'debian' into build
* debian:
  Boosted policy to 3.8.2 -- no changed are due
  fixed Vcs-git field
2009-07-09 00:05:13 -04:00
Yaroslav Halchenko 034f07ada6 Boosted policy to 3.8.2 -- no changed are due 2009-07-09 00:05:03 -04:00
Yaroslav Halchenko 8d07aa603e fixed Vcs-git field 2009-07-09 00:00:26 -04:00
Yaroslav Halchenko d47bfd73d6 added changelog entry about BF 2009-02-05 09:54:22 -05:00
Yaroslav Halchenko 2a94e90363 Merge branch 'up/fix_searchIP_v2' into build
* up/fix_searchIP_v2:
  NF: adding unittests for previous commit
  BF: anchoring regex for IP with " *$" at the end + adjust regexp for <HOST>
2009-02-05 09:51:36 -05:00
Yaroslav Halchenko 441318eba9 NF: adding unittests for previous commit 2009-02-05 09:49:45 -05:00
Yaroslav Halchenko b54290affb BF: anchoring regex for IP with " *$" at the end + adjust regexp for <HOST>
to forbid matching IPs encoded in the hostname (like
1.2.3.4.xxx.yyyyy.zzz) prior doing actual DNS lookup.

It is quite important and actually security hazard: DoS is easy to
perform...

Since now we don't do \S matching in <HOST> regexp, in the development
branches we should also allow for unicode characters by adding 're.U' to HOST's
regexp
2009-02-05 09:42:50 -05:00
Yaroslav Halchenko e5ca2a97b1 BF: added missing semicolon in a logging template for bind within jail.conf (thanks to anonymous on www.debian-administration.org) 2009-02-02 23:03:48 -05:00
Yaroslav Halchenko 5810109405 Merge branch 'up/fixes' into build
* up/fixes:
  BF: added missing semicolon in a logging template for bind within jail.conf
2009-02-02 23:02:41 -05:00
Yaroslav Halchenko 84f3a0c413 Merge branch 'debian' into build
* debian:
  BF: added missing semicolon in a logging template for bind within jail.conf
2009-02-02 23:02:35 -05:00
Yaroslav Halchenko 5fe12cc756 BF: added missing semicolon in a logging template for bind within jail.conf 2009-02-02 23:01:17 -05:00
Yaroslav Halchenko 2db0b346b2 BF: added missing semicolon in a logging template for bind within jail.conf 2009-02-02 22:59:06 -05:00
Yaroslav Halchenko 65159d1498 updated changelog 2009-01-18 11:58:31 -05:00
Yaroslav Halchenko 17165182c9 Merge branch 'debian' into build
* debian:
  adjusted description of bantime/findtime in README.Debian (closes: #507771)
2009-01-18 11:57:12 -05:00
Yaroslav Halchenko de98375553 adjusted description of bantime/findtime in README.Debian (closes: #507771) 2009-01-18 11:56:20 -05:00
Yaroslav Halchenko 01db469fb3 Merge branch 'up/fixes' into build
* up/fixes:
  BF: removing starting anchor from standard time pattern (closes: #500824).

Conflicts:

	server/datedetector.py
2009-01-18 11:44:27 -05:00
Yaroslav Halchenko b54b7def46 BF: removing starting anchor from standard time pattern (closes: #500824). 2009-01-18 11:43:48 -05:00
Yaroslav Halchenko 463564d590 New changelog entry to describe the merge of upstream
* added example for BREAK-IN in ssh
* Syncing current debian revision to FAIL2BAN-0_8@717 of upstream,
  since it includes fixes to some forwarded bugs. Total list of
  functional changes
  - Added actions to report abuse to ISP, DShield and myNetWatchman.
    Thanks to Russell Odom.
  - Added apache-nohome.conf. Thanks to Yaroslav Halchenko.
  - Added new time format. No idea from where it comes...
  - Added new regex. Thanks to Tobias Offermann.
  - Try to match the regex even if the line does not contain a valid
  date/time. Described in Debian #491253. Thanks to Yaroslav
  Halchenko.
  - Removed "timeregex" and "timepattern" stuff that is not needed
  anymore.
  - Added date template for Day-Month-Year Hour:Minute:Second
    (closes: #491253)
  - Added date pattern for Hour:Minute:Second. Thanks to Andreas
    Itzchak Rehberg.
  - Use current day and month instead of Jan 1st if both are not
    available in the log. Thanks to Andreas Itzchak Rehberg.
  - Improved pattern. Thanks to Yaroslav Halchenko.
  - Merged patches from Debian package. Thanks to Yaroslav Halchenko.
2009-01-18 11:42:13 -05:00
Yaroslav Halchenko 479fb6e201 Merge branch 'up/log_examples' into build
* up/log_examples:
  added example for BREAK-IN in ssh
2009-01-18 11:28:02 -05:00
Yaroslav Halchenko 47341e0358 Merge branch 'debian' into build
* debian:
  - Added actions to report abuse to ISP, DShield and myNetWatchman. Thanks to Russell Odom.
  - Added svn:keywords property.
  - Added apache-nohome.conf. Thanks to Yaroslav Halchenko.
  - Added new time format. No idea from where it comes...
  - Added new regex. Thanks to Tobias Offermann.
  - Try to match the regex even if the line does not contain a valid date/time. Described in Debian #491253. Thanks to Yaroslav Halchenko.
  - Removed "timeregex" and "timepattern" stuff that is not needed anymore.
  - Added date template for Day-Month-Year Hour:Minute:Second.
  - Added date pattern for Hour:Minute:Second. Thanks to Andreas Itzchak Rehberg.
  - Use current day and month instead of Jan 1st if both are not available in the log. Thanks to Andreas Itzchak Rehberg.
  - Improved pattern. Thanks to Yaroslav Halchenko.
  - Merged patches from Debian package. Thanks to Yaroslav Halchenko.
  - Changed to SVN version.

Conflicts:

	config/filter.d/sshd.conf
2009-01-18 11:26:13 -05:00
Yaroslav Halchenko 342c40c7b0 Merge branch 'upstream' into debian
* upstream:
  - Added actions to report abuse to ISP, DShield and myNetWatchman. Thanks to Russell Odom.
  - Added svn:keywords property.
  - Added apache-nohome.conf. Thanks to Yaroslav Halchenko.
  - Added new time format. No idea from where it comes...
  - Added new regex. Thanks to Tobias Offermann.
  - Try to match the regex even if the line does not contain a valid date/time. Described in Debian #491253. Thanks to Yaroslav Halchenko.
  - Removed "timeregex" and "timepattern" stuff that is not needed anymore.
  - Added date template for Day-Month-Year Hour:Minute:Second.
  - Added date pattern for Hour:Minute:Second. Thanks to Andreas Itzchak Rehberg.
  - Use current day and month instead of Jan 1st if both are not available in the log. Thanks to Andreas Itzchak Rehberg.
  - Improved pattern. Thanks to Yaroslav Halchenko.
  - Merged patches from Debian package. Thanks to Yaroslav Halchenko.
  - Changed to SVN version.
2009-01-18 11:24:35 -05:00
Yaroslav Halchenko 3ecce6a188 Merge commit 'remotes/upstream-repo/FAIL2BAN-0_8' into upstream
* commit 'remotes/upstream-repo/FAIL2BAN-0_8':
  - Added actions to report abuse to ISP, DShield and myNetWatchman. Thanks to Russell Odom.
  - Added svn:keywords property.
  - Added apache-nohome.conf. Thanks to Yaroslav Halchenko.
  - Added new time format. No idea from where it comes...
  - Added new regex. Thanks to Tobias Offermann.
  - Try to match the regex even if the line does not contain a valid date/time. Described in Debian #491253. Thanks to Yaroslav Halchenko.
  - Removed "timeregex" and "timepattern" stuff that is not needed anymore.
  - Added date template for Day-Month-Year Hour:Minute:Second.
  - Added date pattern for Hour:Minute:Second. Thanks to Andreas Itzchak Rehberg.
  - Use current day and month instead of Jan 1st if both are not available in the log. Thanks to Andreas Itzchak Rehberg.
  - Improved pattern. Thanks to Yaroslav Halchenko.
  - Merged patches from Debian package. Thanks to Yaroslav Halchenko.
  - Changed to SVN version.

Conflicts:

	MANIFEST
2009-01-18 11:23:47 -05:00
Yaroslav Halchenko 196d4c31d8 BF: addressing added bang to ssh log (closes: #512193). Thanks Silvestre Zabala. 2009-01-18 10:41:13 -05:00
Yaroslav Halchenko 0a1326d12d Merge branch 'up/sshd_fixes' into build
* up/sshd_fixes:
  BF: addressing added bang to ssh log (closes: #512193)
2009-01-18 10:25:46 -05:00
Yaroslav Halchenko 2d8bdb6c85 added example for BREAK-IN in ssh 2009-01-18 10:25:00 -05:00
Yaroslav Halchenko b623bef3ff BF: addressing added bang to ssh log (closes: #512193) 2009-01-18 10:18:21 -05:00
Yaroslav Halchenko f868269362 releasing 0.8.3-2 2008-08-06 15:49:34 -04:00
Yaroslav Halchenko f54b7bf214 Merge branch 'up/apache_noscript_fix' into build
* up/apache_noscript_fix:
  BF: script not found could be in 2 shapes depending on inclusion of the name of the scipt
2008-08-06 15:46:38 -04:00
Yaroslav Halchenko e8fd1fe941 BF: script not found could be in 2 shapes depending on inclusion of the name of the scipt 2008-08-06 15:46:00 -04:00
Yaroslav Halchenko 3f577f7fbf BF in apache-noscript.conf - regexp matched in referer (Closes: #492319). Thanks Bernd Zeimetz. 2008-07-25 13:35:19 -04:00
Yaroslav Halchenko ddd56a1577 Merge branch 'up/apache_noscript_fix' into build
* up/apache_noscript_fix:
  BF: url is from nonspace characters. that avoids matching in referer which might be in the trailer
2008-07-25 13:33:41 -04:00
Yaroslav Halchenko 79c0d26b55 BF: url is from nonspace characters. that avoids matching in referer which might be in the trailer 2008-07-25 13:31:46 -04:00
Yaroslav Halchenko 79442fcc7b adjusted changelog due to merges 2008-07-21 10:40:22 -04:00
Yaroslav Halchenko 6bdc15ed70 Merge branch 'up/sshd_fixes' into build
* up/sshd_fixes:
  BF: Specify explicitely facilities in "Failed .. for". Thanks Dean Gaudet. (closes: #481760)
  Added failregex for "User not known" in sshd.conf. thanks Alexander Gerasiov (closes: #479966)
2008-07-21 10:37:23 -04:00
Yaroslav Halchenko 53581eed66 BF: Specify explicitely facilities in "Failed .. for". Thanks Dean Gaudet. (closes: #481760) 2008-07-21 10:37:01 -04:00
Yaroslav Halchenko 569c24fe5a Added failregex for "User not known" in sshd.conf. thanks Alexander Gerasiov (closes: #479966) 2008-07-21 10:34:02 -04:00
Yaroslav Halchenko 8cd185ebbb adjusted changelog for 0.8.3-1 2008-07-21 10:29:24 -04:00
Yaroslav Halchenko 122ef9f306 Merge branch 'debian' into build
* debian:
  Boosted policy compliance to 3.8.0 (no changes needed)
2008-07-21 10:25:51 -04:00
Yaroslav Halchenko 8ab68346b1 Boosted policy compliance to 3.8.0 (no changes needed) 2008-07-21 10:25:32 -04:00
Yaroslav Halchenko bf9e991b4a Merge branch 'debian' into build
* debian: (23 commits)
  Imported Upstream version 0.8.3
  - Prepared for 0.8.3.
  Adjusted vcs paths
  - Prepared for 0.8.3
  - Send file if the number of lines is greater or equal and not only equal to the limit.
  - Use poll instead of select in asyncore.loop. This should solve the "Unknown error 514". Thanks to Michael Geiger and Klaus Lehmann.
  - Added missing ignoreregex to filters. Thanks to Klaus Lehmann.
  - Added and changed some logging level and messages.
  - Added svn:keywords.
  - Added ISO 8601 date/time format.
  - Better (correct) fix for ignoreregex in jail.[conf|local].
  - Fixed ignoreregex processing in fail2ban-client. Thanks to René Berber.
  - Added "Day/Month/Year Hour:Minute:Second" date template. Thanks to Dennis Winter.
  - Added svn:keywords.
  - Added gssftpd filter. Thanks to Kevin Zembower.
  - Changed some log level.
  - Fixed "fail2ban-client get <jail> logpath". Bug #1916986.
  - Fixed PID file while started in daemon mode. Thanks to Christian Jobic who submitted a similar patch.
  - Fixed socket path in redhat and suse init script. Thanks to Jim Wight.
  - Create /var/run/fail2ban during install.
  ...

Conflicts:

	ChangeLog
	config/filter.d/gssftpd.conf
	config/filter.d/pam-generic.conf
	debian/changelog
2008-07-21 10:22:06 -04:00
Yaroslav Halchenko 9eb96ab812 Merge branch 'upstream' into debian
* upstream: (22 commits)
  Imported Upstream version 0.8.3
  - Prepared for 0.8.3.
  - Prepared for 0.8.3
  - Send file if the number of lines is greater or equal and not only equal to the limit.
  - Use poll instead of select in asyncore.loop. This should solve the "Unknown error 514". Thanks to Michael Geiger and Klaus Lehmann.
  - Added missing ignoreregex to filters. Thanks to Klaus Lehmann.
  - Added and changed some logging level and messages.
  - Added svn:keywords.
  - Added ISO 8601 date/time format.
  - Better (correct) fix for ignoreregex in jail.[conf|local].
  - Fixed ignoreregex processing in fail2ban-client. Thanks to René Berber.
  - Added "Day/Month/Year Hour:Minute:Second" date template. Thanks to Dennis Winter.
  - Added svn:keywords.
  - Added gssftpd filter. Thanks to Kevin Zembower.
  - Changed some log level.
  - Fixed "fail2ban-client get <jail> logpath". Bug #1916986.
  - Fixed PID file while started in daemon mode. Thanks to Christian Jobic who submitted a similar patch.
  - Fixed socket path in redhat and suse init script. Thanks to Jim Wight.
  - Create /var/run/fail2ban during install.
  - Added "pam-generic" filter and more configuration fixes. Thanks to Yaroslav Halchenko.
  ...
2008-07-21 10:16:49 -04:00
Yaroslav Halchenko 3f62835d63 Merge commit '0_8_3' into upstream
* commit '0_8_3': (21 commits)
  - Prepared for 0.8.3.
  - Prepared for 0.8.3
  - Send file if the number of lines is greater or equal and not only equal to the limit.
  - Use poll instead of select in asyncore.loop. This should solve the "Unknown error 514". Thanks to Michael Geiger and Klaus Lehmann.
  - Added missing ignoreregex to filters. Thanks to Klaus Lehmann.
  - Added and changed some logging level and messages.
  - Added svn:keywords.
  - Added ISO 8601 date/time format.
  - Better (correct) fix for ignoreregex in jail.[conf|local].
  - Fixed ignoreregex processing in fail2ban-client. Thanks to René Berber.
  - Added "Day/Month/Year Hour:Minute:Second" date template. Thanks to Dennis Winter.
  - Added svn:keywords.
  - Added gssftpd filter. Thanks to Kevin Zembower.
  - Changed some log level.
  - Fixed "fail2ban-client get <jail> logpath". Bug #1916986.
  - Fixed PID file while started in daemon mode. Thanks to Christian Jobic who submitted a similar patch.
  - Fixed socket path in redhat and suse init script. Thanks to Jim Wight.
  - Create /var/run/fail2ban during install.
  - Added "pam-generic" filter and more configuration fixes. Thanks to Yaroslav Halchenko.
  - Process failtickets as long as failmanager is not empty.
  ...
2008-07-21 10:16:03 -04:00
Yaroslav Halchenko 68e22af143 Imported Upstream version 0.8.3 2008-07-21 10:13:13 -04:00
Yaroslav Halchenko a779bfc655 Adjusted vcs paths 2008-07-17 11:21:51 -04:00
Yaroslav Halchenko a355adcbb2 Changelog entries for 0.8.2-3 2008-05-06 11:10:39 -04:00
Yaroslav Halchenko db62370cea Merge branch 'debian' into build
* debian:
  BF: Assure that /var/run/fail2ban exists upon start (LP: #222804, #223706)
2008-05-06 10:45:11 -04:00
Yaroslav Halchenko 32281ed1aa BF: Assure that /var/run/fail2ban exists upon start (LP: #222804, #223706) 2008-05-06 10:43:57 -04:00
Yaroslav Halchenko 48c8159de9 - Process failtickets as long as failmanager is not empty.
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_8@676 a942ae1a-1317-0410-a47c-b1dcaea8d605

Conflicts:

	ChangeLog
2008-05-06 10:41:00 -04:00
Yaroslav Halchenko dc3fd2ccb1 - Added "Day/Month/Year Hour:Minute:Second" date template. Thanks to Dennis Winter.
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_8@685 a942ae1a-1317-0410-a47c-b1dcaea8d605
2008-05-06 10:39:53 -04:00
Yaroslav Halchenko e52fa4d14d - Added gssftpd filter. Thanks to Kevin Zembower.
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_8@683 a942ae1a-1317-0410-a47c-b1dcaea8d605

Conflicts:

	MANIFEST
2008-05-06 10:39:32 -04:00
Yaroslav Halchenko 678e7f6d76 - Changed some log level.
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_8@682 a942ae1a-1317-0410-a47c-b1dcaea8d605
2008-05-06 10:38:02 -04:00
Yaroslav Halchenko 74ba982151 - Fixed "fail2ban-client get <jail> logpath". Bug #1916986.
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_8@681 a942ae1a-1317-0410-a47c-b1dcaea8d605
2008-05-06 10:37:34 -04:00
Yaroslav Halchenko dc9919aed0 - Fixed PID file while started in daemon mode. Thanks to Christian Jobic who submitted a similar patch.
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_8@680 a942ae1a-1317-0410-a47c-b1dcaea8d605

Conflicts:

	ChangeLog
2008-05-06 10:37:14 -04:00
Yaroslav Halchenko 9db84ab727 releasing 0.8.2-2 2008-04-07 10:27:03 -04:00
Yaroslav Halchenko 154c46cdac Merge branch 'debian' into build
* debian:
  BF: Recommends whois, which is used in some actions (LP: #213227)
2008-04-07 10:25:37 -04:00
Yaroslav Halchenko 8207f166e1 BF: Recommends whois, which is used in some actions (LP: #213227) 2008-04-07 10:24:09 -04:00
Yaroslav Halchenko 98fb72441d BF: now proftpd log msgs include ip mask, failregex adjusted to absorb it as well 2008-03-10 12:52:32 -04:00
Yaroslav Halchenko 66c0610809 Merge branch 'debian' into build
* debian:
  added dirs file to create /var/run/fail2ban
2008-03-05 23:54:56 -05:00
Yaroslav Halchenko ef9148cff4 added dirs file to create /var/run/fail2ban 2008-03-05 23:54:30 -05:00
Yaroslav Halchenko db3567e37f Merge branch 'debian' into build
* debian:
  CHANGELOG -> ChangeLog in rules
2008-03-05 23:32:54 -05:00
Yaroslav Halchenko 36f90e4622 CHANGELOG -> ChangeLog in rules 2008-03-05 23:32:42 -05:00
Yaroslav Halchenko 9122f3aab0 Releasing 0.8.2-1 2008-03-05 23:31:20 -05:00
Yaroslav Halchenko 21a7928c64 Merge branch 'debian' into build
* debian:
  2 new jails: xinetd-fail, apache-overflows added to jails.conf
  minor: adjusted comment for named jails to come closer to upstream
  BF: apache-* jails -- authentication failures are recorded in *error.log files, thus paths were adjusted
2008-03-05 23:30:41 -05:00
Yaroslav Halchenko eede41f62b Changelog entries for 0.8.2-1 2008-03-05 23:30:31 -05:00
Yaroslav Halchenko a88fd271c4 2 new jails: xinetd-fail, apache-overflows added to jails.conf 2008-03-05 23:29:36 -05:00
Yaroslav Halchenko 5d6d07508d minor: adjusted comment for named jails to come closer to upstream 2008-03-05 23:18:04 -05:00
Yaroslav Halchenko 15ce210cd0 BF: apache-* jails -- authentication failures are recorded in *error.log files, thus paths were adjusted 2008-03-05 23:14:22 -05:00
Yaroslav Halchenko e60969830a Revert "From 0.9 branch: Replaced ssocket.py with asyncore/asynchat implementation. Correct fix for bug #1769616"
This reverts commit 84b70995260bbb5a24976fd814c8f16125339c27.

Conflicts:

	server/server.py
2008-03-05 22:43:28 -05:00
Yaroslav Halchenko 9ab6db30c7 Merge branch 'debian' into build
* debian: (56 commits)
  Imported upstream version 0.8.2
  debian/watch: switched to git-import-orig
  - Tag for 0.8.2
  - Updated for 0.8.2
  - Updated e-mail
  - Changed homepage and e-mail
  - Updated copyright.
  - readline is now optional in fail2ban-client (not needed in fail2ban-server).
  - Added svn:keywords
  - Fixed Debian bug #461426
  - Fixed Debian bug #462060
  - Fixed Debian bug #468477
  - Fixed Debian bug #456567
  - Added revision.
  - Added "reload <JAIL>"
  - Replaced "reject" with "drop" in shorwall action. Fix #1854875
  - Replaced "echo" with "printf" in actions. Fix #1839673
  - Catch Exception instead of AttributeError.
  - Absorbed some Debian patches. Thanks to Yaroslav Halchenko.
  - Updated.
  ...

Conflicts:

	config/fail2ban.conf
	config/filter.d/proftpd.conf
	config/filter.d/sshd.conf
	man/fail2ban-client.1
	man/fail2ban-server.1
	server/datestrptime.py
	server/server.py
2008-03-05 22:30:10 -05:00
Yaroslav Halchenko e574f0190e Merge branch 'upstream' into debian
* upstream: (55 commits)
  Imported upstream version 0.8.2
  - Tag for 0.8.2
  - Updated for 0.8.2
  - Updated e-mail
  - Changed homepage and e-mail
  - Updated copyright.
  - readline is now optional in fail2ban-client (not needed in fail2ban-server).
  - Added svn:keywords
  - Fixed Debian bug #461426
  - Fixed Debian bug #462060
  - Fixed Debian bug #468477
  - Fixed Debian bug #456567
  - Added revision.
  - Added "reload <JAIL>"
  - Replaced "reject" with "drop" in shorwall action. Fix #1854875
  - Replaced "echo" with "printf" in actions. Fix #1839673
  - Catch Exception instead of AttributeError.
  - Absorbed some Debian patches. Thanks to Yaroslav Halchenko.
  - Updated.
  - Fixed fail2ban-regex. It support "includes" in configuration files.
  ...
2008-03-05 22:22:05 -05:00
Yaroslav Halchenko 4404ceb9c3 Pseudo-Merge commit '0_8_2' into upstream
* commit '0_8_2': (54 commits)

  - Updated e-mail
  - Changed homepage and e-mail
  - Updated copyright.
  - readline is now optional in fail2ban-client (not needed in fail2ban-server).
  - Added svn:keywords
  - Fixed Debian bug #461426
  - Fixed Debian bug #462060
  - Fixed Debian bug #468477
  - Fixed Debian bug #456567
  - Added revision.
  - Added "reload <JAIL>"
  - Replaced "reject" with "drop" in shorwall action. Fix #1854875
  - Replaced "echo" with "printf" in actions. Fix #1839673
  - Catch Exception instead of AttributeError.
  - Absorbed some Debian patches. Thanks to Yaroslav Halchenko.
  - Updated.
  - Fixed fail2ban-regex. It support "includes" in configuration files.
  - "reload <jail>" reloads a single jail and the parameters in fail2ban.conf.
  ...
2008-03-05 20:29:53 -05:00
Yaroslav Halchenko c38fe3a8e3 Imported upstream version 0.8.2 2008-03-05 20:19:06 -05:00
Yaroslav Halchenko 940d7fa430 debian/watch: switched to git-import-orig 2008-03-05 20:18:50 -05:00
Cyril Jaquier 932a746c04 - Tag for 0.8.2
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/tags/FAIL2BAN-0_8_2@674 a942ae1a-1317-0410-a47c-b1dcaea8d605
2008-03-05 23:22:44 +00:00
Yaroslav Halchenko e43ea8e1b3 releasing -5 2008-02-28 19:52:37 -05:00
Yaroslav Halchenko be3bc2bc00 manually "cherry picked" f6639981: Fixed "Feb 29" bug. Thanks to James Andrewartha who pointed this out. Thanks to Yaroslav Halchenko for the fix. 2008-02-28 19:50:08 -05:00
Yaroslav Halchenko 0392274daf added 0.8.1-4 changelog entry. 2008-02-09 22:09:50 -05:00
Yaroslav Halchenko b8d97d0983 Merge branches 'debian', 'deb/specifics', 'up/0.9-0.8', 'up/apache_noscript_extend', 'up/ipmasq', 'up/log_examples', 'up/mail_whois_lines', 'up/named_refused_fixed', 'up/pam_generic', 'up/proftpd_fix+extend', 'up/sshd_refused_connect' and 'up/vsftpd_optional_user' into build
* debian:
  Confirms to policy 3.7.3 (no changes)
  Bye Bye dpatch: now everything is handled in git branches
  removing patches from dpatch system since they are in branches now
  added a  comment to README.Debian and to the list of examples for ipmasq example file
  Fixed == bashism (Closes: #464647). Thanks Raphael Geisser

* deb/specifics:
  slight tune ups in upstream sources destined only for debian are kept in this branch

* up/0.9-0.8:

* up/apache_noscript_extend:
  Extended apache-noscript filter with more file extensions and to react to "script not found or unable to stat" log message (closes: #456565). Thanks Tim Connors

* up/ipmasq:
  Added ipmasq rule file to restart fail2ban when iptables are wiped out (closes: #461417). Thanks Guido Bozzetto

* up/log_examples:
  up/log_examples: moved vsftpd log from up/vsftpd_optional_user
  added examples of log lines (for named-refused, pam-generic, sshd) under files/logs for easy testing

* up/mail_whois_lines:
  mail-whois-lines: moved fix for proper names from dpatch

* up/named_refused_fixed:
  named_refused: moved fix for proper config+filters from dpatch

* up/pam_generic:
  added pam-generic from dpatch

* up/proftpd_fix+extend:
  Fix/extension of proftpd failrexes (Closes: #461412). Thanks Guido Bozzetto

* up/sshd_refused_connect:

* up/vsftpd_optional_user:
  up/vsftpd_optional_user: moving examples into up/examples branch
  BF: vsftp anchoring
2008-02-09 22:02:21 -05:00
Yaroslav Halchenko 9907401483 up/log_examples: moved vsftpd log from up/vsftpd_optional_user 2008-02-08 10:54:46 -05:00
Yaroslav Halchenko 5c5c07fed6 up/vsftpd_optional_user: moving examples into up/examples branch 2008-02-08 10:54:07 -05:00
Yaroslav Halchenko 1da878481f mail-whois-lines: moved fix for proper names from dpatch 2008-02-08 01:33:46 -05:00
Yaroslav Halchenko fc3a57b6c1 Confirms to policy 3.7.3 (no changes) 2008-02-08 01:23:34 -05:00
Yaroslav Halchenko 4b2bd7e776 Bye Bye dpatch: now everything is handled in git branches 2008-02-08 00:52:04 -05:00
Yaroslav Halchenko a832ede291 removing patches from dpatch system since they are in branches now 2008-02-08 00:46:00 -05:00
Yaroslav Halchenko 5f30cb0898 slight tune ups in upstream sources destined only for debian are kept in this branch 2008-02-08 00:40:57 -05:00
Yaroslav Halchenko a9ee3c0b47 named_refused: moved fix for proper config+filters from dpatch 2008-02-08 00:38:02 -05:00
Yaroslav Halchenko 86072e3d55 added pam-generic from dpatch 2008-02-08 00:30:47 -05:00
Yaroslav Halchenko a2090e7283 added examples of log lines (for named-refused, pam-generic, sshd) under files/logs for easy testing 2008-02-08 00:28:31 -05:00
Yaroslav Halchenko 996da9a3f0 added a comment to README.Debian and to the list of examples for ipmasq example file 2008-02-07 23:43:21 -05:00
Yaroslav Halchenko 0da36545d3 Fixed == bashism (Closes: #464647). Thanks Raphael Geisser 2008-02-07 23:43:21 -05:00
Yaroslav Halchenko 2d8df22cf1 Extended apache-noscript filter with more file extensions and to react to "script not found or unable to stat" log message (closes: #456565). Thanks Tim Connors 2008-02-07 23:37:34 -05:00
Yaroslav Halchenko af81bac456 Added ipmasq rule file to restart fail2ban when iptables are wiped out (closes: #461417). Thanks Guido Bozzetto 2008-02-07 23:24:18 -05:00
Yaroslav Halchenko af29b27693 Fix/extension of proftpd failrexes (Closes: #461412). Thanks Guido Bozzetto 2008-02-07 23:00:07 -05:00
Yaroslav Halchenko 33a6a98fea BF: vsftp anchoring
it needed also optional user=, as well as optional (pam_unix) and removed 1 space

also added .examples file for testing
2008-01-04 12:02:23 -05:00
Yaroslav Halchenko 24d8b44c2a * Moved iptables into recommends since fail2ban can work without iptables
using some other action (e.g hosts.deny)
2007-11-23 12:50:39 -05:00
Yaroslav Halchenko fa21222c63 * Moved iptables into recommends since fail2ban can work without iptables
using some other action (e.g hosts.deny)
2007-11-23 12:49:15 -05:00
Yaroslav Halchenko ee25282f34 releasing 0.8.1-3 2007-11-23 11:43:41 -05:00
Yaroslav Halchenko 6b913aafa2 Merge branch 'debian' into build: Vcs fields
Conflicts:

	debian/changelog
2007-11-23 11:10:35 -05:00
Yaroslav Halchenko f8b17f3859 * Added Vcs- fields, moved Homepage into source header's field 2007-11-23 11:09:34 -05:00
Yaroslav Halchenko 4b95233acb Merge branches 'debian' and 'up/sshd_refused_connect' into build: NF: refused connect sshd failregex 2007-11-23 09:02:58 -05:00
Yaroslav Halchenko 46cfc2bbd6 added example for "refused connect" 2007-11-23 09:00:08 -05:00
Yaroslav Halchenko 1f4571ac88 NF: ban tcpwrappers 'refused connect' reported IPs 2007-11-23 08:57:33 -05:00
Yaroslav Halchenko d82257b2f2 Merge branch 'debian' into build: BF: no sftp in ssh jails 2007-11-22 14:34:59 -05:00
Yaroslav Halchenko 1cedd8e02b BF: removed sftp from ssh jails 2007-11-22 14:32:17 -05:00
Yaroslav Halchenko ff7b1897eb Merge branch 'up/0.9-0.8' into build 2007-11-11 01:50:21 -05:00
Yaroslav Halchenko 54e45cb649 needed to add server.communication to list of packages to be installed 2007-11-11 01:49:55 -05:00
Yaroslav Halchenko 4aa9bca7ca Merge branch 'up/0.9-0.8' into build and provided debian/changelog 2007-11-11 01:21:44 -05:00
Yaroslav Halchenko 606a8b3428 From 0.9 branch: Replaced ssocket.py with asyncore/asynchat implementation. Correct fix for bug #1769616 2007-11-11 01:11:04 -05:00
Yaroslav Halchenko 2553e2717a * Added force-start action to init script, so it could be forced
to start if previous run crashed and left a socket file. Must to be
  used with caution.
2007-10-18 22:03:37 -04:00
Yaroslav Halchenko 8d9aca4e20 * Fixed named-refused filter. 2007-10-16 17:02:35 -04:00
Yaroslav Halchenko 99dbe90ad2 releasing 2007-10-16 17:02:35 -04:00
Yaroslav Halchenko 413ec5317e first pre-release version of 0.8.1 2007-10-16 17:02:35 -04:00
Yaroslav Halchenko 0012f9ff92 * (NOT RELEASED YET) New upstream release.
Patches absorbed upstream:
    00_daemon_pids.dpatch
    00_iptables_allports.dpatch
    00_vsftp_filter_spaces.dpatch
    00_resolve_all_names.dpatch
    00_HOST_ignoreregex.dpatch
   Patches which needed some tune-up:
    00_ssh_strong_re.dpatch
    00_mail-whois-lines.dpatch
    00_named_refused.dpatch
2007-10-16 17:02:35 -04:00
Yaroslav Halchenko e10a8616b4 fetched fresh upstream 0.8.1 2007-10-16 17:02:35 -04:00
Yaroslav Halchenko 922b5035ea actually we never released pre-release 2007-10-16 17:02:35 -04:00
Yaroslav Halchenko 7b40dd33d5 Merge commit 'upstream/0.8.1' into tmp/join 2007-10-16 17:02:34 -04:00
Yaroslav Halchenko bce05a1285 Upgraded to fresh upstream 0.8.1 2007-10-16 17:01:23 -04:00
Yaroslav Halchenko 8323a8cac8 Upgraded to fresh upstream 0.8.0 2007-10-16 17:01:22 -04:00
Yaroslav Halchenko b6e07f1f3a Upgraded to fresh upstream 0.7.9 2007-10-16 17:01:22 -04:00
Yaroslav Halchenko d77f67bb89 Upgraded to fresh upstream 0.7.8 2007-10-16 17:01:22 -04:00
Yaroslav Halchenko 018484d985 Upgraded to fresh upstream 0.7.7 2007-10-16 17:01:21 -04:00
Yaroslav Halchenko 93125ae6ac Upgraded to fresh upstream 0.7.6 2007-10-16 17:01:21 -04:00
Yaroslav Halchenko 325366066e Upgraded to fresh upstream 0.7.5 2007-10-16 17:01:20 -04:00
Yaroslav Halchenko a82e3dc1e7 Upgraded to fresh upstream 0.7.4 2007-10-16 17:01:20 -04:00
Yaroslav Halchenko 0ca7bffd7b Upgraded to fresh upstream 0.6.1 2007-10-16 17:01:20 -04:00
Yaroslav Halchenko ad466ecb3c Upgraded to fresh upstream 0.6.0 2007-10-16 17:01:19 -04:00
Yaroslav Halchenko 7f0a3df4a4 Upgraded to fresh upstream 0.5.4 2007-10-16 17:01:19 -04:00
Yaroslav Halchenko bb2cc0b966 Upgraded to fresh upstream 0.5.3 2007-10-16 17:01:19 -04:00
Yaroslav Halchenko 9ad46bb82f Upgraded to fresh upstream 0.5.2 2007-10-16 17:01:18 -04:00
Yaroslav Halchenko 85b75c77fb * Resolve all "names" which became a part of <HOST>. Previousely only fqdn's
were resolved
2007-08-13 21:13:59 +00:00
Yaroslav Halchenko c5202ce696 * Added optional spaces at the end of failregex for vsftpd. 2007-08-06 01:39:30 +00:00
Yaroslav Halchenko 58ae2a5a75 * Added new time template matching named log entries 2007-07-30 02:31:35 +00:00
Yaroslav Halchenko 95d17ee318 * Adjusted failregex for sshd filter:
- anchored properly at the end of line, and source code has .examples
    files to perform testing of the rules.
  - added new explicit rule for users not in the AllowUsers lists
2007-07-29 17:20:23 +00:00
Yaroslav Halchenko 3aef16b773 * jail.conf has specification of protocol (default to tcp) to be provided to
banaction
2007-07-25 03:47:32 +00:00
Yaroslav Halchenko 990bd15dd5 specified default protocol (tcp) and specified udp for jail for named 2007-07-25 03:46:41 +00:00
Yaroslav Halchenko ac7e1696d4 fixed named filter to account for optional (cache) 2007-07-24 20:04:20 +00:00
Yaroslav Halchenko 14d3ffc6de * Added a filter for named to catch refused/denied queries 2007-07-24 18:10:05 +00:00
Yaroslav Halchenko 2a3d710cad adjusted pam_generic patch in example to catch ftp 2007-07-24 17:25:38 +00:00
Yaroslav Halchenko d63bea24f5 tuned pam_generic to catch some weird log lines 2007-07-21 02:29:45 +00:00
Yaroslav Halchenko a843d0da04 tuned pam_generic to catch some weird log lines 2007-07-21 02:27:30 +00:00
Yaroslav Halchenko f58421eabf * Use /var/run to keep socket file (closes: #425746) 2007-07-05 17:12:17 +00:00
Yaroslav Halchenko a9ecd98ffe Added port param in jail since otherwise -- crashes 2007-06-25 17:08:49 +00:00
Yaroslav Halchenko 2e55bc57c7 * Added a filter pam_generic to catch any login errors.
* Added iptables-allports.
2007-06-25 16:51:05 +00:00
Yaroslav Halchenko bc0806d459 * Moved <HOST> expansion into regex.py (closes: #429263). Thanks James
Andrewartha.
* Added optional regexp entry for process PID in some entries (closes:
  #426050). Thanks Roderick Schertler.
2007-06-21 01:47:02 +00:00
Yaroslav Halchenko cc5ec4dcde releasing 2007-05-16 18:14:13 +00:00
Yaroslav Halchenko e55dfeaf3a untabified last entry 2007-05-15 14:37:09 +00:00
Yaroslav Halchenko cc1ed23b40 * Applied changes submitted by Bernd Zeimetz (thanks Bernd):
- Removed obsolete Build-Depends-Indep on help2man, python-dev
	- Explicit removal of *.pyc files compiled during build
	- Invoke 'python setup.py clean' in clean target, which required also
	  to move python into Build-Depends
* Minor clean up of debian/rules
2007-05-15 14:26:28 +00:00
Yaroslav Halchenko be824f4e00 adjusted to be prerelease of the package 2007-05-10 15:35:43 +00:00
Yaroslav Halchenko c58a100259 * Manually changing the order of debhelper inserted scripts in prerm
(Closes: #422655)
* Removed obsolete hack to have /bin/env invocation of python for
  fail2ban-* scripts
2007-05-10 15:34:09 +00:00
Yaroslav Halchenko e9397ea375 * New stable upstream release 2007-05-05 16:35:58 +00:00
Yaroslav Halchenko 10718c1036 initial upgrade to 0.8.0 2007-05-05 16:17:50 +00:00
Yaroslav Halchenko ab18d77f6a pre 0.8.0 release -- I decided to do not do mergeWithUpstream and rather carry full source 2007-05-05 16:14:31 +00:00
Yaroslav Halchenko d15f9d0206 * New upstream release
* Updated copyright to include current year
* Removed patches absorbed upstream
2007-04-20 01:44:43 +00:00
Yaroslav Halchenko 5dcec130f6 adjusted changelog -- releasing finally 2007-03-26 21:53:30 +00:00
Yaroslav Halchenko 7c30a3097b * Applied post-release upstream changes to resolve issues with
- Close opened handlers to log file
 - Fixed "reload" bug
2007-03-26 21:47:10 +00:00
Yaroslav Halchenko dc21820c80 adjusted paths in patches 2007-03-24 22:40:42 +00:00
Yaroslav Halchenko d345865621 * New upstream release
* Applied post-release changes to resolve issues with gamin and not closed
  on reload log file
2007-03-24 22:27:09 +00:00
Yaroslav Halchenko ee3f91176c * New upstream release (included most of the debian-provided patches -- new
filters and actions)
* Refreshed and made verbatim homepage in description
2007-02-09 03:22:15 +00:00
Yaroslav Halchenko a4c15ea883 * NOT RELEASED YET
* Made homepage in description verbatim
2007-02-07 15:25:11 +00:00
Yaroslav Halchenko 936fee7c40 * Use /usr/bin/python interpreter instead of wrapped call to python by
/usr/bin/env
2007-01-19 16:08:10 +00:00
Yaroslav Halchenko 30eb0566bd making it using /usr/bin/python directly 2007-01-19 15:56:21 +00:00
Yaroslav Halchenko f92e887994 minor more changes 2007-01-19 15:53:21 +00:00
Yaroslav Halchenko 878fa0dedd * Synchronized action.d/iptables-* rules from upstream SVN (closes:
#407561)
* Minor: options renames in the comments to be in sync with upstream
2007-01-19 15:51:11 +00:00
Yaroslav Halchenko e3102eb28a had to rename filter for courierauth 2007-01-18 15:52:48 +00:00
Yaroslav Halchenko 7a1dd9e98c * iptables-multiport is default action to take since Debian kernel arrives
with multiport module. That is to address the fact that most services
  listen on multiple port (for encrypted and non-encrypted connections)
* Added [courierauth] jail (First 2 items are to partially address #407404
2007-01-18 15:41:49 +00:00
Yaroslav Halchenko 85d8604209 removed empty lines 2007-01-04 20:34:41 +00:00
Yaroslav Halchenko 36b1833e31 * Adjusted default log file for postfix to be /var/log/mail.log
(Closes: #404921)
2007-01-04 20:25:45 +00:00
Yaroslav Halchenko acfebf3475 adjusted multiport section as promised in changelog 2007-01-04 20:19:58 +00:00
Yaroslav Halchenko e570f14a5d releasing 2007-01-04 19:48:58 +00:00
Yaroslav Halchenko f01c74581d fixed action_ shortcuts
adjusted initd script to be verbose on start if socketfile exists
2007-01-04 19:47:00 +00:00
Yaroslav Halchenko 7fa686a7f2 * New upstream release, which incorporates fixes introduced in 3~pre
non-released versions (which were suggested to the users to overcome
  problems reported in bug reports). In particular attention should be paid
  to upstream changelog entries

  - Several "failregex" and "ignoreregex" are now accepted.
    Creation of rules should be easier now.
  
    This is an alternative solution to 'multiple <HOST>' entries fix,
    which is not applied to this shipped version - pay cautios if upgrading
    from 0.7.5-3~pre?
 
  - Allow comma in action options. The value of the option must
    be escaped with " or '. 
    That allowed to implement requested ability to ban multiple ports
    at once (See 373592). README.Debian and jail.conf adjusted to reflect
    possible use of iptables-mport
  - Now Fail2ban goes in /usr/share/fail2ban instead of
    /usr/lib/fail2ban. This is more compliant with FHS.
    Patch 00_share_insteadof_lib no longer applied
* Refactored installed by debian package jail.conf:
  - Added option banaction which is to incorporate banning agent
    (usually some flavor of iptables rule), which can then be easily
    overriden globally or per section
  
  - Multiple actions are defined as action_* to serve as shortcuts
2007-01-04 18:08:09 +00:00
Yaroslav Halchenko e8ce484c05 reworked init script a bit: waiting on stop and ping instead of status 2007-01-04 17:03:35 +00:00
Yaroslav Halchenko a81dd8b103 boosted version 2007-01-03 16:09:43 +00:00
Yaroslav Halchenko 97ab74de5f * Not applying patch any more for rigid python2.4 - it is default now in
sid/etch
2007-01-03 16:09:01 +00:00
Yaroslav Halchenko 4d5ec804f5 * Added filter ssh-ddos to fight DDOS attacks. Must be used with caution if
there is a possibility of clients accessing through unreliable connection 
  (Closes: #404487)
2006-12-28 07:28:53 +00:00
Yaroslav Halchenko 832a8a4346 * Moved call to dh_pycentral before dh_installinit
* Removed unnecessary call of dh_shlibdeps
2006-12-22 18:56:51 +00:00
Yaroslav Halchenko ebc5c6106f HOSTisized vsftpd regex 2006-12-22 18:39:57 +00:00
Yaroslav Halchenko caf85bf265 * Made fail2ban-server tollerate multiple <HOST> entries in failregex 2006-12-22 18:36:01 +00:00
Yaroslav Halchenko ae96eaa40c made failregex universal for both PAM and native vsftpd logging 2006-12-22 04:54:14 +00:00
Yaroslav Halchenko 2e992c2353 * Fail2ban now bans vsftpd logins (corrected logfile path and failregex)
(Closes: #404060)
2006-12-21 16:54:39 +00:00
Yaroslav Halchenko 14a2a45dbc releasing 2006-12-10 23:56:17 +00:00
Yaroslav Halchenko 762d1a188a * NEWS.Debian confusions - the latest NEWS entry and postinst message were
rephrased (Closes: #402350)
* Added mail-whois-lines action, which emails log lines containing abuser
  IP. Those lines are often required for proper abuse reports sent to the
  Internet providers.  Forwarding of such received emails to the email
  addresses of abuse departments present in the output of whois is a
  tentative solution for semi-automatic abuse reporting (Closes: #358810)
2006-12-10 23:40:04 +00:00
Yaroslav Halchenko bbb9e6f094 * NEWS.Debian confusions - the latest NEWS entry and postinst message
were rephrased (Closes: #402350)
2006-12-09 23:27:39 +00:00
Yaroslav Halchenko ae58ed091a * Removed obsolete patches left from 0.6
* Adjusted wsftpd patch to use <HOST> tag to be in line with the other
  filter definitions
2006-12-08 02:28:07 +00:00
Yaroslav Halchenko 1755dc2b0a updated the patch to the most recent release 2006-12-08 02:12:22 +00:00
Yaroslav Halchenko 7eac83b12d fresh upstream release 2006-12-08 01:21:42 +00:00
Yaroslav Halchenko 6d3c52a965 slightly corrected description for interpolations/parameters 2006-12-07 23:10:30 +00:00
Yaroslav Halchenko c46b9e0dca * README.Debian describes a bit issue of interpolations vs parameters passed
from jail.{conf,local} into an action or a filter definition (closes:
  #398739)
* Removed Uploaded field from control since I am a DD now. Big thanks to
  Barak Pearlmutter for being the sponsor of my packages for few
  years.
2006-12-07 13:20:51 +00:00
Yaroslav Halchenko 3a738497f8 * Added Suggests on mailx and relevant comments in README.Debian about
invoking mail actions (closes: #396668)
* Removed obsolete entries in TODO and README
* README.Debian describes a bit issue of interpolations vs parameters
  passed from jail.{conf,local} into an action or a filter definition
  (closes: #398739)
* Initial version of postfix filter (closes: #377711)
2006-12-07 04:07:59 +00:00
Yaroslav Halchenko ff491e48fa * Added debian/backports to contain patches necessary for backporting. It
gets used by pbuilder-ssh to create package for backports.org
2006-12-04 13:56:56 +00:00
Yaroslav Halchenko e46346d371 fixed name spoiled by on vaio 2006-11-12 02:20:32 +00:00
Yaroslav Halchenko 953f6c75b9 ready to buzz Barak 2006-11-12 02:18:47 +00:00
Yaroslav Halchenko b9b30341d4 * Cleaned up debian/rules a bit 2006-11-12 02:11:34 +00:00
Yaroslav Halchenko f8a3605c97 * "Clean" target removes generated .pyc files now (Closes: #398146) 2006-11-12 02:02:23 +00:00
Yaroslav Halchenko 97abba906f forgot to boost version 2006-11-11 00:11:59 +00:00
Yaroslav Halchenko 24ada3c63e * Only block new connects by using a new action iptables-new instead of
iptables (Closes: #350746)
* Updated README.Debian to reflect transition over to 0.7 branch and to
  comment on 350746
2006-11-11 00:10:10 +00:00
Yaroslav Halchenko 5cc9bc9ce6 made ~ version to accumulate more fixes before duploading 2006-11-10 15:56:58 +00:00
Yaroslav Halchenko 6a9ed3501a * Reincarnated logrotate configuration (Closes: #397878)
* no logrotation anymore? (Closes: #397878)
2006-11-10 15:54:34 +00:00
Yaroslav Halchenko f92a885d43 copied logrotate from 0.6 branch 2006-11-10 14:59:19 +00:00
Yaroslav Halchenko f4015e0c3c forgotten fi 2006-11-06 14:49:40 +00:00
Yaroslav Halchenko 28dad3752c * Warning NEWS entry for 0.7.1 was not shown during installation on test
boxes, thus postinst was adjusted accordingly to inform the user about the
  changes in the configuration files since 0.6.
2006-11-06 14:47:59 +00:00
Yaroslav Halchenko 6e1ec60318 put release to unstable 2006-11-06 14:29:56 +00:00
Yaroslav Halchenko b457f61e74 * Added reload/force-reload actions to init script
* Adjusted jail.conf a bit
2006-11-06 14:23:58 +00:00
Yaroslav Halchenko 2e568c08d6 new upstream 2006-11-02 02:04:57 +00:00
Yaroslav Halchenko 4bbea5b41b * Corrected init.d script to properly perform restart due to server delay to
react to client command to stop. Handling of status was adjusted as well
* Added apache-noscript to jail.conf
* Default action does not send emails to be inline with previous (0.6.x)
  behavior
2006-10-30 03:32:29 +00:00
Yaroslav Halchenko 668ef068cf * Fresh upstream: fixed a bug with not handling error producing
actioncheck call
2006-10-23 21:05:32 +00:00
Yaroslav Halchenko 1e4d6dd059 * debian/{rules,control} adjusted to conform all points in recent python
policy changes
* install under /usr/share instead of /usr/lib
2006-10-23 05:07:52 +00:00
Yaroslav Halchenko 6a2aaa4db7 * Adjusted rule to install man pages -- only .1 files since there are also
h2m sources
2006-10-23 04:49:52 +00:00
Yaroslav Halchenko 37d2abc8ea * Currrent snapshot of trunk
* Removed outdated (applied in 0.7.4 or specific for 0.6.?) patches
  from debian/patches
2006-10-23 04:45:34 +00:00
Yaroslav Halchenko 923d2214d9 added wuftpd to both 0.6 and 0.7 2006-10-18 05:15:53 +00:00
Yaroslav Halchenko 4ea2d8c370 few changelog entries 2006-10-02 19:28:23 +00:00
Yaroslav Halchenko 9851383362 fixed status command. now rely on presence of socket to be a bit more verbose 2006-10-02 19:27:30 +00:00
Yaroslav Halchenko a45fadd183 News about the 0.7 release and adjusted init script so it fails to start if not root 2006-10-02 19:03:58 +00:00
Yaroslav Halchenko 8d3b4630f3 changed section names - removed -iptables. adjusted description 2006-09-29 13:22:23 +00:00
Yaroslav Halchenko 571c3d8c92 added suggests to python-gamin 2006-09-29 04:27:46 +00:00
Yaroslav Halchenko cd46343d11 added few sections (patches + adjusted jail.conf shipped with Debian) 2006-09-29 04:21:16 +00:00
Yaroslav Halchenko 641cd14a40 preliminary packaging of 0.7.3 which gets closer to be used widely, i.e.
could be uploaded to experimental
2006-09-29 04:05:50 +00:00
Yaroslav Halchenko 0ae3032ac8 properly assigned to experimental 2006-09-06 13:35:13 +00:00
Yaroslav Halchenko 4ba8572d7f adjusted the bantime to be 10min not 10sec 2006-09-05 15:26:37 +00:00
Yaroslav Halchenko dae225330c added debian specific patches for the new upstream 2006-09-05 15:16:03 +00:00
Yaroslav Halchenko a4899fabf8 Initial minimalistic but working packaging of fail2ban 0.7.1 2006-09-05 06:10:29 +00:00
Yaroslav Halchenko a2717f7c25 getting ready to dpatch-clean upgrade to the most recent upstream 0.7.1 2006-09-05 04:18:02 +00:00
Yaroslav Halchenko d125070fa4 now changes in this file are managed via dpatch 2006-08-15 22:13:44 +00:00
Yaroslav Halchenko 1c455a29a9 now changes in this file are managed via dpatch 2006-08-15 22:12:48 +00:00
Yaroslav Halchenko 6e050675a8 adjusted manpage for fail2ban.conf 2006-08-15 21:35:37 +00:00
Yaroslav Halchenko f85af540cf updated timestamp 2006-07-07 00:20:22 +00:00
Yaroslav Halchenko 7fbc1b16a0 adjusted to comply with recent changed of debian python policy 2006-07-06 21:30:53 +00:00
Yaroslav Halchenko ed6a45f1a6 added verbosity patch from one of my branches. fixed stupid indents 2006-07-04 03:40:14 +00:00
Yaroslav Halchenko 1f3e33e384 added verbosity patch from one of my branches 2006-07-04 03:36:39 +00:00
Yaroslav Halchenko f7064d36c5 fixed empty ip and somewhat fixed locale issue 2006-07-04 03:03:45 +00:00
Yaroslav Halchenko 4309a11968 rm options adjusted, README.Debian to fix 373592 2006-06-14 16:22:43 +00:00
Yaroslav Halchenko 7b93d4ded5 section for saslauthd 2006-05-30 14:19:08 +00:00
Yaroslav Halchenko 2f930dfa76 now apache2 bug gets closed 2006-05-28 03:32:24 +00:00
Yaroslav Halchenko fc9b8a887f added proftpd section, adjusted vsftpd patch to dont interfer. boosted debian revision 2006-05-28 03:13:56 +00:00
Yaroslav Halchenko 1fbcf9a9a5 removed bashism from init.d script 2006-05-22 19:38:51 +00:00
Yaroslav Halchenko 537399dbc9 placed binary-arch target back to comply with the policy 2006-05-16 20:46:27 +00:00
Yaroslav Halchenko ac9362ae5b fixed binary-indep binary-arch separation 2006-05-16 20:28:31 +00:00
Yaroslav Halchenko e801352c78 removed compilation of *.pyc 2006-05-16 20:11:05 +00:00
Yaroslav Halchenko 302c1b1c4b debhelper and dpatch belong to Build-Depends now 2006-05-16 20:08:32 +00:00
Yaroslav Halchenko 87ed38b378 debhelper and dpatch belong to Build-Depends now 2006-05-16 20:07:37 +00:00
Yaroslav Halchenko 9af3da8b57 small clean up 2006-05-16 19:59:38 +00:00
Yaroslav Halchenko 589fb2a217 migrated to using dpatch. fixed vsftpd regexp 2006-05-10 18:01:06 +00:00
Yaroslav Halchenko 0c9aef1b0a added lsb-base in depends for init.d script 2006-04-28 04:42:55 +00:00
Yaroslav Halchenko b4e4bcbce8 merged with proposed init.d script from Aaron
tiny fix - syslog
2006-04-28 04:19:19 +00:00
Yaroslav Halchenko 4fa38338d7 merged with proposed init.d script from Aaron 2006-04-28 04:13:23 +00:00
Yaroslav Halchenko c35d7d7bb5 merged with proposed init.d script from Aaron 2006-04-28 04:11:48 +00:00
Yaroslav Halchenko a3badc1fff small adjustments in copyright and watch 2006-04-25 19:58:36 +00:00
Yaroslav Halchenko 8123a4886a modified maxreinits 2006-03-27 17:56:38 +00:00
Yaroslav Halchenko 5425d6b96a fixed copyright file 2006-03-27 04:40:56 +00:00
Yaroslav Halchenko 73074157ac proper version for Barak 2006-03-20 00:41:27 +00:00
Yaroslav Halchenko 49bf5a991b added fwchain 2006-03-19 23:45:52 +00:00
Yaroslav Halchenko e95c62e68e added debug parameter back 2006-03-19 05:35:38 +00:00
Yaroslav Halchenko f771a9be28 added examples 2006-03-19 05:32:10 +00:00
Yaroslav Halchenko 435f870b13 minor modifications: examples, proper conf file copying 2006-03-19 05:27:42 +00:00
Yaroslav Halchenko 4fa0eba064 merged with upstream release 0.6.1 2006-03-19 05:20:44 +00:00
Yaroslav Halchenko 49e8d86983 finalized at -8 revision -- now will upgrade to 0.6.1 upstream 2006-03-17 00:38:23 +00:00
Yaroslav Halchenko bfcdf41276 tiny fix to avoid duplicate code 2006-03-13 06:14:27 +00:00
Yaroslav Halchenko 193a98c97a rearranging, cleaning up2 2006-03-11 06:02:46 +00:00
Yaroslav Halchenko 7693ede193 rearranging, cleaning up 2006-03-11 06:02:22 +00:00
Yaroslav Halchenko 899c6d54df fixed a typo in failregex for SSH 2006-03-09 20:23:46 +00:00
Yaroslav Halchenko 0321fd4689 added postrm script to clean up the log files 2006-03-05 19:51:01 +00:00
Yaroslav Halchenko b3dd9fd5ab For capitalized nasty log entries of sshd 2006-03-03 21:37:05 +00:00
Yaroslav Halchenko 046f219eaf adjusted 2006-03-03 21:14:34 +00:00
Yaroslav Halchenko f8eaf92733 added Uploaders field with Barak 2006-02-27 01:12:55 +00:00
Yaroslav Halchenko f22d4912c2 Fixed Apache section to point at error.log 2006-02-26 01:04:17 +00:00
Yaroslav Halchenko 5ca08578af ready for Barak"s upload 2006-02-18 01:43:00 +00:00
Yaroslav Halchenko 73f0ed8976 changed ownership of all existing logs 2006-02-16 16:23:05 +00:00
Yaroslav Halchenko 165354d87c spell 2006-02-16 16:19:58 +00:00
Yaroslav Halchenko b00161f7ec fixed #352053 2006-02-16 15:53:38 +00:00
Yaroslav Halchenko 438e4edfd8 moved dh_python into binary-indep, added another regex for attacks 2006-02-16 15:43:35 +00:00
Yaroslav Halchenko d8c1587130 added NEWS 2006-02-10 18:08:22 +00:00
Yaroslav Halchenko eb4047f85c fixed timeregex for apache 2006-02-10 18:08:01 +00:00
Yaroslav Halchenko 38fa465cae less failures required for Attacks 2006-01-25 15:32:50 +00:00
Yaroslav Halchenko 9cf01b2dac relaxed regex for awstat.pl a bit 2006-01-25 15:12:44 +00:00
Yaroslav Halchenko 27b0bdfd22 added awstats.pl capturer 2006-01-25 14:58:52 +00:00
Yaroslav Halchenko 55d7440fe1 decided to use "interpolations" in the config file to make it more readable 2006-01-15 20:18:39 +00:00
Yaroslav Halchenko a0dfb0f9e6 minor - removed default private networks from safe list 2006-01-15 20:07:07 +00:00
Yaroslav Halchenko 7d9c08bc22 fix for bug #343821: path is not appended but inserted first 2005-12-19 15:50:01 +00:00
Yaroslav Halchenko 687c2775ad removed slipped through fingers double block 2005-11-21 02:58:10 +00:00
Yaroslav Halchenko 1d6d67f95f minor notes 2005-11-21 02:50:08 +00:00
Yaroslav Halchenko 542939e7c7 minor adjustment 2005-11-21 01:48:57 +00:00
Yaroslav Halchenko bd3d510f96 merged with upstream 0.6.0 2005-11-21 01:43:13 +00:00
Yaroslav Halchenko 3e2a09cdf7 fixes race condition bug #339133 2005-11-20 19:53:37 +00:00
Yaroslav Halchenko 8ce3c2c19e fixed init.d script so it doesn"t fail on stop action if fail2ban is not running 2005-11-03 22:18:40 +00:00
Yaroslav Halchenko 6efa9597c9 fixed changelog back to normal... damn -svn-tag-only 2005-10-31 22:08:56 +00:00
Yaroslav Halchenko 909f05351e added localtime config option to MAIL 2005-10-31 22:04:11 +00:00
Yaroslav Halchenko 1e0cb0326e decided to swith to proper debian versioning 2005-10-21 01:22:59 +00:00
Yaroslav Halchenko a1509ae1e4 init.d script fixed 2005-10-21 01:20:17 +00:00
Yaroslav Halchenko f322d7205a Trying to fix it up a bit 2005-10-20 17:46:13 +00:00
Yaroslav Halchenko 4206c543a3 Trying to fix it up a bit 2005-10-20 17:46:00 +00:00
Yaroslav Halchenko a40245010f * Fixed typos (thanx to Ross Boylan).
* Robust startup: if iptables module gets fully initialized after
    startup of fail2ban, fail2ban will do "maxreinit" attempts to
    initialize its own firewall. It will sleep between attempts for
    "polltime" number of seconds (closes: #334272).
  * To overcome possible conflict with other firewall solutions and as a
    secondary solution for the bug 334272, fail2ban startup is moved
    during bootup to the latest (S99) sequenece position. That should not
    cause any discomfort I believe.
2005-10-20 17:33:53 +00:00
Yaroslav Halchenko 51d453a3d2 fixed issue with crashing on wrong log file
added a cleanup of firewall on emergency exit
2005-10-16 15:07:47 +00:00
Yaroslav Halchenko e9792f95f6 fixed enabledsections to handle MAIL properly 2005-10-15 16:12:45 +00:00
Yaroslav Halchenko d4ee4645ec added -e (enabledsections) command line parameter 2005-10-15 05:47:35 +00:00
Yaroslav Halchenko ac5242815f fixed an issue with command line parameters 2005-10-15 05:14:56 +00:00
Yaroslav Halchenko f2136c09d5 fixing the issue with disregarding command line parameters 2005-10-14 21:27:19 +00:00
Yaroslav Halchenko 93dbf609fa fix #2 to Cyril and mine fixes:
I had to bring ExternalError exception into Firewall because of the loop in flushBanList.
 Also provided naming of Firewalls
2005-10-14 16:30:20 +00:00
Yaroslav Halchenko 14fbb34e51 fixed introduced by me problem - we should wrap each call 2005-10-14 16:09:13 +00:00
Yaroslav Halchenko f3da148d0f fix #1 for Cyrils adjustments 2005-10-14 15:51:04 +00:00
Yaroslav Halchenko 91df9c7526 applied Cyril"s modifications to my patch for missing chain 2005-10-14 14:59:47 +00:00
Yaroslav Halchenko 501955f36a adjusted README: removed part about missing chain because the issue is
resolved by now
Also postinst announces about necessity to upgrade the config file
2005-10-12 17:21:45 +00:00
Yaroslav Halchenko a9efdf16ea should be close to proper debian release now 2005-10-12 15:09:54 +00:00
Yaroslav Halchenko 9c639040bc refined it to work nicely with current approach to handle externally modified iptables 2005-10-12 15:08:05 +00:00
Yaroslav Halchenko da0bb74180 remade handling of missing chains or other errors from IPTables 2005-10-12 14:16:52 +00:00
Yaroslav Halchenko 03e7d722de uff - nasty refactoring to make fail2ban loop if there is some error occur 2005-10-12 05:11:16 +00:00
Yaroslav Halchenko d7dc8f35d1 wrapped with exception handling to avoid crash during pidlock remove -adjusted changelog 2005-10-12 02:13:56 +00:00
Yaroslav Halchenko ee0ce118a9 wrapped with exception handling to avoid crash during pidlock remove 2005-10-12 01:43:55 +00:00
Yaroslav Halchenko d922899bba Illegal -> Invalid 2005-10-10 15:57:35 +00:00
Yaroslav Halchenko 5590dabfd3 uff -- one more adjustement 2005-10-09 20:37:26 +00:00
Yaroslav Halchenko 94ac381122 uff -- one more adjustement 2005-10-09 20:36:45 +00:00
Yaroslav Halchenko b5c8d0aeeb ajusted failregex a bit 2005-10-09 20:00:38 +00:00
Yaroslav Halchenko 9a374592e7 adjusted failregex for SSH 2005-10-09 17:12:46 +00:00
Yaroslav Halchenko 782dabdc7e mangled version a bit... now it conflicts with NMU but... 2005-10-04 06:49:32 +00:00
Yaroslav Halchenko 9e5ca7e048 fixed address to avoid lintian complains 2005-10-04 06:43:32 +00:00
Yaroslav Halchenko 555d12ece4 added a notification regarding configuration file 2005-10-04 06:36:09 +00:00
Yaroslav Halchenko 3d00eec62c removed pre1 2005-10-03 14:48:11 +00:00
Yaroslav Halchenko 0482957f9c fixed security bug #330827 2005-10-01 06:53:51 +00:00
Yaroslav Halchenko 83c201992d added reporting of the enabled sections: unified more with the rest :-/ 2005-09-29 15:44:07 +00:00
Yaroslav Halchenko 897018932b added reporting of the enabled sections: unified it a bit with the rest 2005-09-29 15:41:02 +00:00
Yaroslav Halchenko b046e73bef added reporting of the enabled sections 2005-09-29 15:35:56 +00:00
Yaroslav Halchenko a1d7835cb6 adjusted to have proper description / actions for debug option 2005-09-29 05:26:18 +00:00
Yaroslav Halchenko 802dbea036 fixed Debian bugs 329722, 330311 2005-09-27 15:45:26 +00:00
Yaroslav Halchenko 207b3f712e added export to PATH, removed -b 2005-09-21 12:19:22 +00:00
Yaroslav Halchenko b54377be2c merged with upstream 2005-09-20 16:37:44 +00:00
Yaroslav Halchenko 018e4a115d decided to tag before getting fresh upstream 2005-09-20 16:17:39 +00:00
Cyril Jaquier 1c3f233475 - Updated for 0.5.4
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@201 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-09-13 20:43:00 +00:00
Cyril Jaquier c07015129b - Formatting
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@200 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-09-13 20:42:33 +00:00
Cyril Jaquier 3ca5a75094 - Updated
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@199 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-09-12 14:44:07 +00:00
Cyril Jaquier cfa8d0a7fe - Updated to CVS version
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@198 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-09-12 14:43:51 +00:00
Cyril Jaquier 0d4302c912 - Fixed bug #1286222
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@197 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-09-12 14:42:08 +00:00
Cyril Jaquier 11d887c603 - Formatting
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@196 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-09-12 14:41:40 +00:00
Yaroslav Halchenko f0e4ef017c fresh changes I forgotten to submit :-/ 2005-09-11 19:22:54 +00:00
Yaroslav Halchenko 12ddba6cf2 fresh changes I forgotten to submit :-/ 2005-09-11 19:22:32 +00:00
Yaroslav Halchenko eb11caa621 Propagated patches introduced by Debian maintainer
* Fixed handling of SYSLOG logging target. Now it can log
    to any SYSLOG target and facility as directed by the
    config
  * Format of SYSLOG entries fixed to look closer to standard
  * Fixed errata in config/gentoo-confd
  * Introduced findtime configuration variable to control the
    lifetime of caught "failed" log entries


git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@195 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-09-11 15:42:32 +00:00
Yaroslav Halchenko b25140b40c fixed changelog 2005-09-09 21:16:14 +00:00
Yaroslav Halchenko 66c8660494 merged with upstream. Need to propagate 'Debian' patches into upstream as soon as possible because they lead to conflicts on upgrades 2005-09-09 21:15:41 +00:00
Yaroslav Halchenko e32a92e7c9 adjusted watch for uscan 2005-09-09 19:17:25 +00:00
Yaroslav Halchenko 0415da9229 see changelog 2005-09-09 18:57:53 +00:00
Cyril Jaquier 10c0307ad5 - Updated
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@193 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-09-08 18:21:04 +00:00
Cyril Jaquier d0c70e1535 - Updated for 0.5.3
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@191 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-09-08 18:20:51 +00:00
Cyril Jaquier 830ac2001e - Added more debug output if an error occurs when sending mail. Thanks to Stephen Gildea
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@190 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-09-08 18:05:59 +00:00
Cyril Jaquier c1a86f9e18 - Updated
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@189 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-09-05 21:12:32 +00:00
Cyril Jaquier c573432e74 - Fixed a bug when overriding "maxfailures" or "bantime". Thanks to Yaroslav Halchenko
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@188 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-09-05 21:12:08 +00:00
Cyril Jaquier 54f4a7d240 - Hopefully fixed bug #1256075
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@187 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-09-05 21:06:15 +00:00
Cyril Jaquier cdc7b4b048 - Renamed "maxretry" to "maxfailures" and changed default value to 5. Thanks to Stephen Gildea
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@186 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-09-05 21:05:00 +00:00
Yaroslav Halchenko ea7f23e534 corrected for proper format of SYSLOG entries 2005-08-19 10:34:03 +00:00
Yaroslav Halchenko 21ed0e04e0 proper cleaning 2005-08-19 08:56:12 +00:00
Yaroslav Halchenko 3ca4b1f0df minor bug introduced while modifying handling of per section configs 2005-08-19 08:45:42 +00:00
Yaroslav Halchenko 79d9c5fdba minor bug 2005-08-19 08:41:52 +00:00
Yaroslav Halchenko 22e3fd1708 added findtime configuration parameter 2005-08-19 08:40:09 +00:00
Yaroslav Halchenko 1acb0f2648 fixed man pages - cross referenced them, placed fail2ban into section 8
added upstream README and TODO, patched with SYSLOG (160:166)
2005-08-19 07:14:17 +00:00
Yaroslav Halchenko 61f10ac4cb fixed man pages - cross referenced them, placed fail2ban into section 8
added upstream README and TODO
2005-08-18 23:40:49 +00:00
Cyril Jaquier 631f2ac352 - Updated
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@185 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-08-17 19:34:00 +00:00
Cyril Jaquier c5c90b182a - Fixed bug #1262345
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@184 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-08-17 19:26:49 +00:00
Cyril Jaquier daf35a3535 - Added a warning message if IP address is not valid in ignoreip
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@183 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-08-17 19:26:14 +00:00
Yaroslav Halchenko d8d79656f5 fixed errata... closes #323451 2005-08-16 21:30:27 +00:00
Yaroslav Halchenko e099536945 adjusted changelog 2005-08-13 08:55:08 +00:00
Yaroslav Halchenko e5e22cf50d Adjusted description and added logrotate config 2005-08-13 08:31:19 +00:00
Cyril Jaquier 8a1241533f - Removed warning when using "-V" or "-h" with no config file. Thanks to Yaroslav Halchenko
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@182 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-08-07 13:12:15 +00:00
Cyril Jaquier ed46bcdaf2 - Removed "It needs log4py" from description
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@181 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-08-07 13:10:39 +00:00
Cyril Jaquier 38f2c24be1 - Updated
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@180 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-08-07 13:10:00 +00:00
Cyril Jaquier dd27cafee3 - Added better handling of exception
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@179 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-08-07 13:08:18 +00:00
Cyril Jaquier b3a90d7492 - Changed mask to 16
- Removed "-i eth0". Match all interfaces


git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@178 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-08-07 13:06:56 +00:00
Yaroslav Halchenko 1ae50b123d uff... pid file is now removed by fail2ban itself... so for it to don't choke - I removed rm -f from init script 2005-08-06 22:30:00 +00:00
Yaroslav Halchenko 46d43bb128 lib->share 2005-08-06 22:18:28 +00:00
Yaroslav Halchenko fe6d07eae5 moved -v --help options to be acted before config file is read 2005-08-06 21:51:51 +00:00
Yaroslav Halchenko 87a6c5a069 fixed a bug which came during conflict resolution /usr/share insteadh of /usr/lib 2005-08-06 19:52:21 +00:00
Yaroslav Halchenko e46b5f6665 New upstream release, removed log4py, fresh man file for conf 2005-08-06 19:43:43 +00:00
Cyril Jaquier d2f3d1c263 - Fixed a bug with "-k"
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@177 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-08-06 18:44:06 +00:00
Cyril Jaquier 9548edaff0 - Do not exit on exception. Continue and wait for an unhandled exception
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@176 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-08-06 18:43:11 +00:00
Cyril Jaquier 7e0e005e24 - Prepared for 0.5.2
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@174 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-08-06 15:07:11 +00:00
Cyril Jaquier 800115a422 - Fixed a bug in logging level
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@173 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-08-04 21:03:49 +00:00
Cyril Jaquier a8f98be252 - Updated
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@172 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-08-04 21:01:12 +00:00
Cyril Jaquier e93c0db20b - Added new PID lock file management
- Fixed a bug with daemon mode and logging


git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@171 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-08-04 20:52:13 +00:00
Cyril Jaquier 1fcf7612fd - Added new PID lock file management
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@170 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-08-04 20:51:14 +00:00
Cyril Jaquier 9761d31f4b - Updated
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@169 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-08-04 20:49:00 +00:00
Cyril Jaquier 4d0c5f6341 - Added a PID lock file class
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@168 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-08-04 20:48:30 +00:00
Cyril Jaquier d0a0088894 - Redirect stdout to /dev/null
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@167 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-08-01 16:58:14 +00:00
Cyril Jaquier e8b4d66c54 - Removed log4py dependency
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@166 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-08-01 16:41:33 +00:00
Cyril Jaquier 5a38a2563c - Removed log4py dependency
- Catch the unhandled exceptions


git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@165 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-08-01 16:40:46 +00:00
Cyril Jaquier c2d30a29de - Updated
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@164 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-08-01 16:39:11 +00:00
Cyril Jaquier 8688acab65 - Removed log4py dependency
- Better handling of the return value of os.system()


git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@163 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-08-01 16:38:07 +00:00
Cyril Jaquier 4d9c24adbf - Removed log4py dependency
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@162 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-08-01 16:35:18 +00:00
Cyril Jaquier bed25265d7 - Added man pages
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@161 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-08-01 16:33:56 +00:00
Yaroslav Halchenko e965ab1504 fixed description as ftpmaster required + fixed dependency on python-dev 2005-07-31 01:25:17 +00:00
Cyril Jaquier a081e8b3f5 - Updated
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@160 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-28 20:59:28 +00:00
Cyril Jaquier bebba84f0e - Updated
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@159 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-28 20:31:00 +00:00
Cyril Jaquier e40dd99727 - Added description
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@158 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-28 20:30:34 +00:00
Cyril Jaquier 84042dbd31 - "maxretry" and "bantime" can be overridden in each section
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@157 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-28 20:29:45 +00:00
Cyril Jaquier 45426598dd - "maxretry" and "bantime" can be overridden in each section
- Fixed bug #1246278 (excessive memory usage)


git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@156 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-28 20:27:26 +00:00
Cyril Jaquier 8686151421 - Fixed crash on wrong option value in configuration file
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@155 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-28 20:20:13 +00:00
Cyril Jaquier 46a4f1fcf3 - Changed custom chains to lowercase
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@154 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-28 20:18:59 +00:00
Yaroslav Halchenko bc7318245b Fixed a bug: conf file wasn't copied as of revision 73 2005-07-26 21:27:19 +00:00
Yaroslav Halchenko d62486656e tiny one - forgotten to remove conf script installation from top Makefile 2005-07-23 19:47:18 +00:00
Yaroslav Halchenko a96ec80625 tiny one - forgotten to remove conf script installation from top Makefile 2005-07-23 19:46:19 +00:00
Yaroslav Halchenko 35c7616cc0 * down cased the name of the chain so it doesn't appear first in iptables -L 2005-07-23 19:44:01 +00:00
Yaroslav Halchenko ff32f0ec9a * because upstream includes debian-init file I decided to just copy it during installation into debian
* adjusted Makefile/rules to handle /etc/default/fail2ban correctly
2005-07-23 19:30:44 +00:00
Yaroslav Halchenko 120a1d9fbc * Merged with upstream
* Changed debian/watch to run svn-upgrade
2005-07-23 19:15:22 +00:00
Yaroslav Halchenko c3909b8ec4 fixed watch file 2005-07-23 18:46:16 +00:00
Cyril Jaquier d6e7bc7b03 - Prepared for 0.5.1
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@152 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-23 09:31:12 +00:00
Cyril Jaquier 891b8d9e8a - Fixed a bug in the previous... bug fix
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@151 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-23 09:07:53 +00:00
Cyril Jaquier 02386131e9 - Fixed bug #1239557
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@150 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-22 21:13:19 +00:00
Cyril Jaquier a3f30d8555 - Updated
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@149 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-22 21:12:14 +00:00
Cyril Jaquier ec299bd60f - Better check of IPv4 validity
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@148 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-22 21:11:42 +00:00
Cyril Jaquier bbfc65f569 - Fixed bug #1241756
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@147 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-22 21:10:29 +00:00
Yaroslav Halchenko ddc2d0f708 to please Linda and common sense or to be fair - Debian policy, we install .py files into /usr/share, not to /usr/lib 2005-07-17 03:38:51 +00:00
Yaroslav Halchenko 880b6584f2 Absorbed LICENSE.log4py inside a copyright file so to make lintian shut up 2005-07-15 22:37:42 +00:00
Yaroslav Halchenko a57a4908bf Absorbed LICENSE.log4py inside a copyright file so to make lintian shut up 2005-07-15 22:37:13 +00:00
Yaroslav Halchenko 54c7125feb added a license file for log4py which is distributed according to MIT license 2005-07-15 22:33:12 +00:00
Cyril Jaquier 5dbed848bc - Updated
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@146 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-15 19:28:15 +00:00
Cyril Jaquier bb430ec25c - Removed logfile option and added logtargets
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@145 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-15 19:27:38 +00:00
Cyril Jaquier 74dfb8440e - Added obsolete files detection and update config reminder after install
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@144 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-15 14:14:12 +00:00
Cyril Jaquier 2b8df84fa9 - Changed Fail2Ban description
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@143 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-15 14:12:51 +00:00
Cyril Jaquier cd1ede8d5b - Updated
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@142 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-15 14:11:49 +00:00
Cyril Jaquier 8e43d98ca4 - Moved path.append() before importing log4py
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@141 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-15 14:11:21 +00:00
Cyril Jaquier 3b154baae5 - Removed os.umask(0) as it is a potential security issue. Thanks to Yaroslav Halchenko
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@140 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-15 14:08:17 +00:00
Cyril Jaquier d2f7dc0521 - Fixed banList which must not be static
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@139 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-15 14:07:08 +00:00
Cyril Jaquier 6be14566e1 - Corrected logfile path
- Changed firewall rules in order to create a specific chain for each section


git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@138 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-15 14:06:11 +00:00
Cyril Jaquier e919d8372b - Initial commit. Thanks to Yaroslav Halchenko
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@137 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-15 14:04:39 +00:00
Yaroslav Halchenko 8c17f3180f * tuned description to satisfy lintian
* went to a new Stadards-Version
* adjusted shipped config to ignore all private nets of 
  class A, so mask is /16, not /24
2005-07-13 10:19:20 +00:00
Yaroslav Halchenko ce98955f34 I"m not paranoid but fixed umask also in utils/process.py although it seems that fail2ban.py corrects it properly later on 2005-07-13 10:04:20 +00:00
Yaroslav Halchenko b8240499b1 forgotten to adjust make clean due to inclusion of proper fail2ban 2005-07-13 10:01:49 +00:00
Yaroslav Halchenko 61e23f45f7 Merged with 0.5.0 upstream release 2005-07-13 10:01:01 +00:00
Yaroslav Halchenko 5930368ed9 few grammatical errors fixed in the description of the package and --help message 2005-07-13 09:21:21 +00:00
Cyril Jaquier df28acf495 - Prepared for 0.5.0
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@136 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-12 13:12:40 +00:00
Cyril Jaquier 158110aa46 - Updated
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@135 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-12 13:12:22 +00:00
Cyril Jaquier 0a8905e3a6 - Fixed bug #1234699
- Added mail notification support


git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@134 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-12 13:11:58 +00:00
Cyril Jaquier 3acb0b8548 - Added CIDR mask support
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@133 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-12 13:10:14 +00:00
Cyril Jaquier a50d0ace81 - Initial commit
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@132 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-12 13:09:47 +00:00
Cyril Jaquier dba169ae9c - Moved replaceTag() to utils/strings.py
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@131 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-12 13:08:24 +00:00
Cyril Jaquier 8a94f873de - Removed MAIL for getSections()
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@130 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-12 13:07:35 +00:00
Cyril Jaquier 6ae8556d15 - Added mail notification support
- Added CIDR mask support in ignoreip


git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@129 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-12 13:06:25 +00:00
Cyril Jaquier 7cdb6c94bb - Added more tags in firewall rules definition. Should help for Feature Request #1229479
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@128 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-09 15:11:48 +00:00
Cyril Jaquier 18486d66bd - Updated
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@127 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-09 15:09:03 +00:00
Cyril Jaquier 6ae86bd7d6 - Removed unused options
- Cleanup


git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@126 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-09 13:18:59 +00:00
Cyril Jaquier cb97a9e091 - Oups... I forgot to add this one. Now, this is the main executable
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@125 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-08 10:21:52 +00:00
Cyril Jaquier 8e16185ef1 - Applied changes (command line options) from Yaroslav Halchenko
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@124 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-08 10:01:04 +00:00
Yaroslav Halchenko fc4531ff45 fixed security hole with world-open umask 2005-07-08 05:05:49 +00:00
Yaroslav Halchenko 02c1a20bf6 fixed a bug with duplicate information in man page, removed link to sbin and now it should start from /usr/bin 2005-07-08 04:27:03 +00:00
Barak A. Pearlmutter 2a8be4bf8c domain change 2005-07-07 23:10:33 +00:00
Cyril Jaquier ebccfea6cb - Added new fail2ban binary
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@123 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-07 16:57:05 +00:00
Cyril Jaquier 5595ffcac7 - Lot of changes. Most of them are cleanup
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@122 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-07 16:56:30 +00:00
Cyril Jaquier e98f8c8182 - Updated
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@121 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-07 16:55:50 +00:00
Cyril Jaquier 3d79d9d1cb - Initial import
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@120 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-07 16:53:47 +00:00
Cyril Jaquier 3df3c510f4 - Moved __executeCmd to utils/process.py
- Removed interface


git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@119 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-07 16:52:54 +00:00
Cyril Jaquier 65fef83e56 - Made configreader more generic. Also used for global options now
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@118 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-07 16:51:52 +00:00
Cyril Jaquier 1014183f3f - Changed fail2ban binary name
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@117 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-07 16:50:56 +00:00
Cyril Jaquier 992a3f7d31 - Added start and end command options
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@116 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-07 16:50:20 +00:00
Yaroslav Halchenko b2cfa213eb adjusted just to check if svn works for different users 2005-07-07 03:54:33 +00:00
Yaroslav Halchenko e6555108b9 added stupid not for now regarding help2man malfunction 2005-07-07 03:22:57 +00:00
Yaroslav Halchenko cbef51548f minor 2005-07-07 03:19:29 +00:00
Yaroslav Halchenko f62b0345b2 adjusted for proper help2man functioning. still help2man freeks out a bit and duplicates help output -- that is for later to fix 2005-07-07 03:06:56 +00:00
Yaroslav Halchenko a527233718 removed shdeps 2005-07-07 02:21:04 +00:00
Yaroslav Halchenko 549ac7290e fixed a bug in Makefile which forbid man page creation 2005-07-07 02:20:24 +00:00
Yaroslav Halchenko f544c58d74 added help2man to builddepends 2005-07-07 01:56:20 +00:00
Yaroslav Halchenko c3666f222d removed cdbs from build-depends 2005-07-07 01:54:33 +00:00
Yaroslav Halchenko 88aa27bb21 adjusted email 2005-07-07 01:52:07 +00:00
Yaroslav Halchenko 12304aa348 went away from cdbs, compiled simple man using help2man, removed conffiles 2005-07-07 01:47:23 +00:00
Yaroslav Halchenko 1634aa9532 added cdbs to Build-Depends 2005-07-07 00:11:01 +00:00
Yaroslav Halchenko edd7ed5d30 Load fail2ban-0.4.1 into debs/fail2ban/trunk. 2005-07-06 23:10:26 +00:00
Yaroslav Halchenko 2b5c103cd0 [svn-inject] Forking fail2ban source to Trunk 2005-07-06 23:10:20 +00:00
Yaroslav Halchenko 28cca31e3f [svn-inject] Installing original source of fail2ban 2005-07-06 23:10:19 +00:00
Cyril Jaquier 685f4aad99 - Initial 0.5 commit
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@115 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-05 12:57:20 +00:00
Cyril Jaquier ea9a671e88 This commit was manufactured by cvs2svn to create branch 'FAIL2BAN-0_5'.
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@114 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-07-01 09:30:52 +00:00
Cyril Jaquier 5c9c6e82cf This commit was manufactured by cvs2svn to create branch 'FAIL2BAN-0_5'.
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@12 a942ae1a-1317-0410-a47c-b1dcaea8d605
2004-10-10 23:41:08 +00:00
245 changed files with 5763 additions and 6064 deletions
+1 -8
View File
@@ -1,11 +1,4 @@
[run]
branch = True
source =
config
fail2ban
[report]
exclude_lines =
pragma: no cover
pragma: systemd no cover
omit = /usr*
-49
View File
@@ -1,49 +0,0 @@
_We will be very grateful, if your problem was described as completely as possible,
enclosing excerpts from logs (if possible within DEBUG mode, if no errors evident
within INFO mode), and configuration in particular of effected relevant settings
(e.g., with ` fail2ban-client -d | grep 'affected-jail-name' ` for a particular
jail troubleshooting).
Thank you in advance for the details, because such issues like "It does not work"
alone could not help to resolve anything!
Thanks! (remove this paragraph and other comments upon reading)_
### Environment:
_Fill out and check (`[x]`) the boxes which apply. If your Fail2Ban version is outdated,
and you can't verify that the issue persists in the recent release, better seek support
from the distribution you obtained Fail2Ban from_
- Fail2Ban version (including any possible distribution suffixes):
- OS, including release name/version:
- [ ] Fail2Ban installed via OS/distribution mechanisms
- [ ] You have not applied any additional foreign patches to the codebase
- [ ] Some customizations were done to the configuration (provide details below is so)
### The issue:
_Summary here_
#### Steps to reproduce
#### Expected behavior
#### Observed behavior
#### Any additional information
### Configuration, dump and another helpful excerpts
#### Any customizations done to /etc/fail2ban/ configuration
```
```
#### Relevant parts of /var/log/fail2ban.log file:
_preferably obtained while running fail2ban with `loglevel = 4`_
```
```
#### Relevant lines from monitored log files in question:
```
```
-9
View File
@@ -1,9 +0,0 @@
Before submitting your PR, please review the following checklist:
- [ ] **CONSIDER adding a unit test** if your PR resolves an issue
- [ ] **LIST ISSUES** this PR resolves
- [ ] **MAKE SURE** this PR doesn't break existing tests
- [ ] **KEEP PR small** so it could be easily reviewed.
- [ ] **AVOID** making unnecessary stylistic changes in unrelated code
- [ ] **ACCOMPANY** each new `failregex` for filter `X` with sample log lines
within `fail2ban/tests/files/logs/X` file
+1 -1
View File
@@ -1,3 +1,4 @@
.pc/*
*~
build
dist
@@ -9,4 +10,3 @@ htmlcov
*.bak
__pycache__
.vagrant/
.idea/
-5
View File
@@ -1,5 +0,0 @@
Lee Clemens <java@leeclemens.net>
Serg G. Brester <info@sebres.de>
Serg G. Brester <serg.brester@sebres.de>
Serg G. Brester <sergey.brester@W7-DEHBG0189.wincor-nixdorf.com>
Viktor Szépe <viktor@szepe.net>
+12
View File
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?>
<pydev_project>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.3</pydev_property>
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
<path>/fail2ban-0.8/client</path>
<path>/fail2ban-0.8/server</path>
<path>/fail2ban-0.8/testcases</path>
<path>/fail2ban-0.8</path>
</pydev_pathproperty>
</pydev_project>
+14 -50
View File
@@ -1,58 +1,22 @@
# vim ft=yaml
# travis-ci.org definition for Fail2Ban build
# https://travis-ci.org/fail2ban/fail2ban/
language: python
python:
- 2.6
- 2.7
- pypy
# disabled until coverage module fixes up compatibility issue
# - 3.2
- 3.3
- 3.4
- pypy3
- "2.6"
- "2.7"
- "3.2"
- "3.3"
- "3.4"
- "pypy"
before_install:
- if [[ $TRAVIS_PYTHON_VERSION == 2* || $TRAVIS_PYTHON_VERSION == 'pypy' ]]; then export F2B_PY_2=true && echo "Set F2B_PY_2"; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3* || $TRAVIS_PYTHON_VERSION == 'pypy3' ]]; then export F2B_PY_3=true && echo "Set F2B_PY_3"; fi
- travis_retry sudo apt-get update -qq
# Set this so sudo executes the correct python binary
# Anything not using sudo will already have the correct environment
- export VENV_BIN="$VIRTUAL_ENV/bin" && echo "VENV_BIN set to $VENV_BIN"
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then sudo apt-get update -qq; fi
install:
# Install Python packages / dependencies
# coverage
- travis_retry pip install coverage
# coveralls
- travis_retry pip install coveralls codecov
# dnspython or dnspython3
- if [[ "$F2B_PY_2" ]]; then travis_retry pip install dnspython; fi
- if [[ "$F2B_PY_3" ]]; then travis_retry pip install dnspython3; fi
# gamin - install manually (not in PyPI) - travis-ci system Python is 2.7
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then travis_retry sudo apt-get install -qq python-gamin && cp /usr/share/pyshared/gamin.py /usr/lib/pyshared/python2.7/_gamin.so $VIRTUAL_ENV/lib/python2.7/site-packages/; fi
# pyinotify
- travis_retry pip install pyinotify
before_script:
# Manually execute 2to3 for now
- if [[ "$F2B_PY_3" ]]; then ./fail2ban-2to3; fi
- pip install pyinotify
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then sudo apt-get install -qq python-gamin; cp /usr/share/pyshared/gamin.py /usr/lib/pyshared/python2.7/_gamin.so $VIRTUAL_ENV/lib/python2.7/site-packages/; fi
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then cd ..; pip install -q coveralls; cd -; fi
script:
# Keep the legacy setup.py test approach of checking coverage for python2
- if [[ "$F2B_PY_2" ]]; then coverage run setup.py test; fi
# Coverage doesn't pick up setup.py test with python3, so run it directly
- if [[ "$F2B_PY_3" ]]; then coverage run bin/fail2ban-testcases; fi
# Use $VENV_BIN (not python) or else sudo will always run the system's python (2.7)
- sudo $VENV_BIN/pip install .
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then coverage run --rcfile=.travis_coveragerc setup.py test; else python setup.py test; fi
after_success:
- coveralls
- codecov
matrix:
fast_finish: true
# Might be worth looking into
#notifications:
# email: true
# irc:
# channels: "irc.freenode.org#fail2ban"
# template:
# - "%{repository}@%{branch}: %{message} (%{build_url})"
# on_success: change
# on_failure: change
# skip_join: true
# Coverage config file must be .coveragerc for coveralls
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then cp -v .travis_coveragerc .coveragerc; fi
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then coveralls; fi
+7
View File
@@ -0,0 +1,7 @@
[run]
branch = True
omit =
/usr/*
/home/travis/virtualenv/*
fail2ban/server/filtersystemd.py
Vendored Executable
+181
View File
@@ -0,0 +1,181 @@
#!/usr/bin/perl
##########################################################################
# $Id: fail2ban 150 2013-06-18 22:19:38Z mtremaine $
##########################################################################
# $Log: fail2ban,v $
# Revision 1.5 2008/08/18 16:07:46 mike
# Patches from Paul Gear <paul at libertysys.com> -mgt
#
# Revision 1.4 2008/06/30 23:07:51 kirk
# fixed copyright holders for files where I know who they should be
#
# Revision 1.3 2008/03/24 23:31:26 kirk
# added copyright/license notice to each script
#
# Revision 1.2 2006/12/15 04:53:59 bjorn
# Additional filtering, by Willi Mann.
#
# Revision 1.1 2006/05/30 19:04:26 bjorn
# Added fail2ban service, written by Yaroslav Halchenko.
#
# Written by Yaroslav Halchenko <debian@onerussian.com> for fail2ban
#
##########################################################################
########################################################
## Copyright (c) 2008 Yaroslav Halchenko
## Covered under the included MIT/X-Consortium License:
## http://www.opensource.org/licenses/mit-license.php
## All modifications and contributions by other persons to
## this script are assumed to have been donated to the
## Logwatch project and thus assume the above copyright
## and licensing terms. If you want to make contributions
## under your own copyright or a different license this
## must be explicitly stated in the contribution an the
## Logwatch project reserves the right to not accept such
## contributions. If you have made significant
## contributions to this script and want to claim
## copyright please contact logwatch-devel@lists.sourceforge.net.
#########################################################
use strict;
use Logwatch ':all';
my $Debug = $ENV{'LOGWATCH_DEBUG'} || 0;
my $Detail = $ENV{'LOGWATCH_DETAIL_LEVEL'} || 0;
my $IgnoreHost = $ENV{'sshd_ignore_host'} || "";
my $DebugCounter = 0;
my $ReInitializations = 0;
my @IptablesErrors = ();
my @ActionErrors = ();
my $NotValidIP = 0; # reported invalid IPs number
my @OtherList = ();
my %ServicesBans = ();
if ( $Debug >= 5 ) {
print STDERR "\n\nDEBUG: Inside Fail2Ban Filter \n\n";
$DebugCounter = 1;
}
while (defined(my $ThisLine = <STDIN>)) {
if ( $Debug >= 5 ) {
print STDERR "DEBUG($DebugCounter): $ThisLine";
$DebugCounter++;
}
chomp($ThisLine);
if ( ($ThisLine =~ /..,... DEBUG: /) or
($ThisLine =~ /..,... \S*\s*: DEBUG /) or # syntax of 0.7.? fail2ban
($ThisLine =~ /..,... INFO: (Fail2Ban v.* is running|Exiting|Enabled sections:)/) or
($ThisLine =~ /INFO\s+Log rotation detected for/) or
($ThisLine =~ /INFO\s+Jail.+(?:stopped|started|uses poller)/) or
($ThisLine =~ /INFO\s+Changed logging target to/) or
($ThisLine =~ /INFO\s+Creating new jail/) or
($ThisLine =~ /..,... \S+\s*: INFO\s+(Set |Socket|Exiting|Gamin|Created|Added|Using)/) or # syntax of 0.7.? fail2ban
($ThisLine =~ /..,... WARNING: Verbose level is /) or
($ThisLine =~ /..,... WARNING: Restoring firewall rules/)
)
{
if ( $Debug >= 6 ) {
print STDERR "DEBUG($DebugCounter): line ignored\n";
}
} elsif ( my ($Service,$Action,$Host) = ($ThisLine =~ m/WARNING:?\s\[?(.*?)[]:]?\s(Ban|Unban)[^\.]* (\S+)/)) {
if ( $Debug >= 6 ) {
print STDERR "DEBUG($DebugCounter): Found $Action for $Service from $Host\n";
}
$ServicesBans{$Service}{$Host}{$Action}++;
$ServicesBans{$Service}{"(all)"}{$Action}++;
} elsif ( my ($Service,$Host,$NumFailures) = ($ThisLine =~ m/INFO: (\S+): (.+) has (\d+) login failure\(s\). Banned./)) {
if ($Debug >= 4) {
print STDERR "DEBUG: Found host $Host trying to access $Service - failed $NumFailures times\n";
}
push @{$ServicesBans{$Service}{$Host}{'Failures'}}, $NumFailures;
} elsif ( my ($Service,$Host) = ($ThisLine =~ m/ ERROR:\s(.*):\s(\S+)\salready in ban list/)) {
$ServicesBans{$Service}{$Host}{'AlreadyInTheList'}++;
} elsif ( my ($Service,$Host) = ($ThisLine =~ m/WARNING\s*\[(.*)\]\s*(\S+)\s*already banned/)) {
$ServicesBans{$Service}{$Host}{'AlreadyInTheList'}++;
} elsif ( my ($Service,$Host) = ($ThisLine =~ m/ WARNING:\s(.*):\sReBan (\S+)/)) {
$ServicesBans{$Service}{$Host}{'ReBan'}++;
} elsif ($ThisLine =~ / ERROR:?\s*(Execution of command )?\'?iptables/) {
push @IptablesErrors, "$ThisLine\n";
} elsif ($ThisLine =~ /ERROR.*returned \d+$/) {
push @ActionErrors, "$ThisLine\n";
} elsif (($ThisLine =~ /..,... WARNING: \#\S+ reinitialization of firewalls/) or
($ThisLine =~ / ERROR\s*Invariant check failed. Trying to restore a sane environment/)) {
$ReInitializations++;
} elsif ($ThisLine =~ /..,... WARNING: is not a valid IP address/) {
# just ignore - this will be fixed within fail2ban and is harmless warning
}
else
{
# Report any unmatched entries...
push @OtherList, "$ThisLine\n";
}
}
###########################################################
if (keys %ServicesBans) {
printf("\nBanned services with Fail2Ban: Bans:Unbans\n");
foreach my $service (sort {$a cmp $b} keys %ServicesBans) {
printf(" %-55s [%3d:%-3d]\n", "$service:",
$ServicesBans{$service}{'(all)'}{'Ban'},
$ServicesBans{$service}{'(all)'}{'Unban'});
delete $ServicesBans{$service}{'(all)'};
my $totalSort = TotalCountOrder(%{$ServicesBans{$service}}, \&SortIP);
if ($Detail >= 5) {
foreach my $ip (sort $totalSort keys %{$ServicesBans{$service}}) {
my $name = LookupIP($ip);
printf(" %-53s %3d:%-3d\n",
$name,
$ServicesBans{$service}{$ip}{'Ban'},
$ServicesBans{$service}{$ip}{'Unban'});
if (($Detail >= 10) and ($ServicesBans{$service}{$ip}{'Failures'}>0)) {
print " Failed ";
foreach my $fails (@{$ServicesBans{$service}{$ip}{'Failures'}}) {
print " $fails";
}
print " times";
printf("\n %d Duplicate Ban attempts", $ServicesBans{$service}{$ip}{'AlreadyInTheList'}) ;
printf("\n %d ReBans due to rules reinitilizations", $ServicesBans{$service}{$ip}{'ReBan'}) ;
print "\n";
}
}
}
}
}
if ($Detail>0) {
if ($#IptablesErrors > 0) {
printf("\n%d faulty iptables invocation(s)", $#IptablesErrors);
if ($Detail > 5) {
print ":\n";
print @IptablesErrors ;
}
}
if ($#ActionErrors > 0) {
printf("\n%d error(s) returned from actions", $#ActionErrors);
if ($Detail > 5) {
print ":\n";
print @ActionErrors ;
}
}
if ($ReInitializations > 0) {
printf("\n%d fail2ban rules reinitialization(s)", $ReInitializations);
}
if ($#OtherList >= 0) {
print "\n**Unmatched Entries**\n";
print @OtherList;
}
}
exit(0);
# vi: shiftwidth=3 tabstop=3 syntax=perl et
# Local Variables:
# mode: perl
# perl-indent-level: 3
# indent-tabs-mode: nil
# End:
-10
View File
@@ -15,13 +15,3 @@ join the [mailing list](https://lists.sourceforge.net/lists/listinfo/fail2ban-us
### You would like to contribute (new filters/actions/code/documentation)?
send a [pull request](https://github.com/fail2ban/fail2ban/pulls)
Pull requests guidelines
========================
- If there is an issue on github to be closed by the pull request, include
```Closes #ISSUE``` (where ISSUE is issue's number)
- Add a brief summary of the change to the ChangeLog file into a corresponding
section out of Fixes, New Features or Enhancements (improvements to existing
features)
+5 -261
View File
@@ -3,256 +3,11 @@
| _/ _` | | |/ /| '_ \/ _` | ' \
|_| \__,_|_|_/___|_.__/\__,_|_||_|
Fail2Ban: Changelog
===================
================================================================================
Fail2Ban (version 0.9.0.dev) 2014/xx/xx
================================================================================
ver. 0.9.4 (2016/03/08) - for-you-ladies
-----------
- Fixes:
* roundcube-auth jail typo for logpath
* Fix dnsToIp resolver for fqdn with large list of IPs (gh-1164)
* filter.d/apache-badbots.conf
- Updated useragent string regex adding escape for `+`
* filter.d/mysqld-auth.conf
- Updated "Access denied ..." regex for MySQL 5.6 and later (gh-1211, gh-1332)
* filter.d/sshd.conf
- Updated "Auth fail" regex for OpenSSH 5.9 and later
* Treat failed and killed execution of commands identically (only
different log messages), which addresses different behavior on different
exit codes of dash and bash (gh-1155)
* Fix jail.conf.5 man's section (gh-1226)
* Fixed default banaction for allports jails like pam-generic, recidive, etc
with new default variable `banaction_allports` (gh-1216)
* Fixed `fail2ban-regex` stops working on invalid (wrong encoded) character
for python version < 3.x (gh-1248)
* Use postfix_log logpath for postfix-rbl jail
* filters.d/postfix.conf - add 'Sender address rejected: Domain not found' failregex
* use `fail2ban_agent` as user-agent in actions badips, blocklist_de, etc (gh-1271)
* Fix ignoring the sender option by action_mw, action_mwl and action_c_mwl
* Changed filter.d/asterisk regex for "Call from ..." (few vulnerable now)
* Removed compression and rotation count from logrotate (inherit them from
the global logrotate config)
- New Features:
* New interpolation feature for definition config readers - `<known/parameter>`
(means last known init definition of filters or actions with name `parameter`).
This interpolation makes possible to extend a parameters of stock filter or
action directly in jail inside jail.local file, without creating a separately
filter.d/*.local file.
As extension to interpolation `%(known/parameter)s`, that does not works for
filter and action init parameters
* New actions:
- nftables-multiport and nftables-allports - filtering using nftables
framework. Note: it requires a pre-existing chain for the filtering rule.
* New filters:
- openhab - domotic software authentication failure with the
rest api and web interface (gh-1223)
- nginx-limit-req - ban hosts, that were failed through nginx by limit
request processing rate (ngx_http_limit_req_module)
- murmur - ban hosts that repeatedly attempt to connect to
murmur/mumble-server with an invalid server password or certificate.
- haproxy-http-auth - filter to match failed HTTP Authentications against a
HAProxy server
* New jails:
- murmur - bans TCP and UDP from the bad host on the default murmur port.
* sshd filter got new failregex to match "maximum authentication
attempts exceeded" (introduced in openssh 6.8)
* Added filter for Mac OS screen sharing (VNC) daemon
- Enhancements:
* Do not rotate empty log files
* Added new date pattern with year after day (e.g. Sun Jan 23 2005 21:59:59)
http://bugs.debian.org/798923
* Added openSUSE path configuration (Thanks Johannes Weberhofer)
* Allow to split ignoreip entries by ',' as well as by ' ' (gh-1197)
* Added a timeout (3 sec) to urlopen within badips.py action
(Thanks M. Maraun)
* Added check against atacker's Googlebot PTR fake records
(Thanks Pablo Rodriguez Fernandez)
* Enhance filter against atacker's Googlebot PTR fake records
(gh-1226)
* Nginx log paths extended (prefixed with "*" wildcard) (gh-1237)
* Added filter for openhab domotic software authentication failure with the
rest api and web interface (gh-1223)
* Add *_backend options for services to allow distros to set the default
backend per service, set default to systemd for Fedora as appropriate
* Performance improvements while monitoring large number of files (gh-1265).
Use associative array (dict) for monitored log files to speed up lookup
operations. Thanks @kshetragia
* Specified that fail2ban is PartOf iptables.service firewalld.service in
.service file -- would reload fail2ban if those services are restarted
* Provides new default `fail2ban_version` and interpolation variable
`fail2ban_agent` in jail.conf
* Enhance filter 'postfix' to ban incoming SMTP client with no fqdn hostname,
and to support multiple instances of postfix having varying suffix (gh-1331)
(Thanks Tom Hendrikx)
* files/gentoo-initd to use start-stop-daemon to robustify restarting the service
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
ver. 0.9.2 (2015/04/29) - better-quick-now-than-later
----------
- Fixes:
* Fix ufw action commands
* infinite busy loop on _escapedTags match in substituteRecursiveTags gh-907.
Thanks TonyThompson
* port[s] typo in jail.conf/nginx-http-auth gh-913. Thanks Frederik Wagner
(fnerdwq)
* $ typo in jail.conf. Thanks Skibbi. Debian bug #767255
* grep'ing for IP in *mail-whois-lines.conf should now match also
at the beginning and EOL. Thanks Dean Lee
* jail.conf
- php-url-fopen: separate logpath entries by newline
* failregex declared direct in jail was joined to single line (specifying of
multiple expressions was not possible).
* filters.d/exim.conf - cover different settings of exim logs
details. Thanks bes.internal
* filter.d/postfix-sasl.conf - failregex is now case insensitive
* filters.d/postfix.conf - add 'Client host rejected error message' failregex
* fail2ban/__init__.py - add strptime thread safety hack-around
* recidive uses iptables-allports banaction by default now.
Avoids problems with iptables versions not understanding 'all' for
protocols and ports
* filter.d/dovecot.conf
- match pam_authenticate line from EL7
- match unknown user line from EL7
* Use use_poll=True for Python 2.7 and >=3.4 to overcome "Bad file
descriptor" msgs issue (gh-161)
* filter.d/postfix-sasl.conf - tweak failregex and add ignoreregex to ignore
system authentication issues
* fail2ban-regex reads filter file(s) completely, incl. '.local' file etc.
(gh-954)
* firewallcmd-* actions: split output into separate lines for grepping (gh-908)
* Guard unicode encode/decode issues while storing records in the database.
Fixes "binding parameter error (unsupported type)" (gh-973), thanks to kot
for reporting
* filter.d/sshd added regex for matching openSUSE ssh authentication failure
* filter.d/asterisk.conf:
- Dropped "Sending fake auth rejection" failregex since it incorrectly
targets the asterisk server itself
- match "hacking attempt detected" logs
- New Features:
- New filters:
- postfix-rbl Thanks Lee Clemens
- apache-fakegooglebot.conf Thanks Lee Clemens
- nginx-botsearch Thanks Frantisek Sumsal
- drupal-auth Thanks Lee Clemens
- New recursive embedded substitution feature added:
- `<<PREF>HOST>` becomes `<IPV4HOST>` for PREF=`IPV4`;
- `<<PREF>HOST>` becomes `1.2.3.4` for PREF=`IPV4` and IPV4HOST=`1.2.3.4`;
- New interpolation feature for config readers - `%(known/parameter)s`.
(means last known option with name `parameter`). This interpolation makes
possible to extend a stock filter or jail regexp in .local file
(opposite to simply set failregex/ignoreregex that overwrites it),
see gh-867.
- Monit config for fail2ban in files/monit/
- New actions:
- action.d/firewallcmd-multiport and action.d/firewallcmd-allports Thanks Donald Yandt
- action.d/sendmail-geoip-lines.conf
- action.d/nsupdate to update DNSBL. Thanks Andrew St. Jean
- New status argument for fail2ban-client -- flavor:
fail2ban-client status <jail> [flavor]
- empty or "basic" works as-is
- "cymru" additionally prints (ASN, Country RIR) per banned IP
(requires dnspython or dnspython3)
- Flush log at USR1 signal
- Enhancements:
* Enable multiport for firewallcmd-new action. Closes gh-834
* files/debian-initd migrated from the debian branch and should be
suitable for manual installations now (thanks Juan Karlo de Guzman)
* Define empty ignoreregex in filters which didn't have it to avoid
warnings (gh-934)
* action.d/{sendmail-*,xarf-login-attack}.conf - report local
timezone not UTC time/zone. Closes gh-911
* Conditionally log Ignore IP with reason (dns, ip, command). Closes gh-916
* Absorbed DNSUtils.cidr into addr2bin in filter.py, added unittests
* Added syslogsocket configuration to fail2ban.conf
* Note in the jail.conf for the recidive jail to increase dbpurgeage (gh-964)
ver. 0.9.1 (2014/10/29) - better, faster, stronger
ver. 0.9.1 (2014/xx/xx) - better, faster, stronger
----------
- Refactoring (IMPORTANT -- Please review your setup and configuration):
@@ -261,8 +16,6 @@ ver. 0.9.1 (2014/10/29) - better, faster, stronger
provides defaults for the chain, port, protocol and name tags
- Fixes:
* start of file2ban aborted (on slow hosts, systemd considers the server has
been timed out and kills him), see gh-824
* UTF-8 fixes in pure-ftp thanks to Johannes Weberhofer. Closes gh-806.
* systemd backend error on bad utf-8 in python3
* badips.py action error when logging HTTP error raised with badips request
@@ -295,26 +48,18 @@ ver. 0.9.1 (2014/10/29) - better, faster, stronger
* cyrus-imap -- also catch also failed logins via secured (imaps/pop3s).
Regression was introduced while strengthening failregex in 0.8.11 (bd175f)
Debian bug #755173
* postfix-sasl - added journalmatch. Thanks Luc Maisonobe
* postfix* - match with a new daemon string (postfix/submission/smtpd).
Closes gh-804 . Thanks Paul Traina
* apache - added filter for AH01630 client denied by server configuration.
* postfix-sasl -- added journalmatch. Thanks Luc Maisonobe
- New features:
- New filters:
- monit Thanks Jason H Martin
- directadmin Thanks niorg
- apache-shellshock Thanks Eugene Hopkinson (SlowRiot)
- New actions:
- symbiosis-blacklist-allports for Bytemark symbiosis firewall
- fail2ban-client can fetch the running server version
- Added Cloudflare API action
- Enhancements
* Start performance of fail2ban-client (and tests) increased, start time
and cpu usage rapidly reduced. Introduced a shared storage logic, to
bypass reading lots of config files (see gh-824).
Thanks to Joost Molenaar for good catch (reported gh-820).
* Fail2ban-regex - add print-all-matched option. Closes gh-652
* Suppress fail2ban-client warnings for non-critical config options
* Match non "Bye Bye" disconnect messages for sshd locked account regex
@@ -326,7 +71,6 @@ ver. 0.9.1 (2014/10/29) - better, faster, stronger
not affect SYSLOG output
* Log unhandled exceptions
* cyrus-imap: catch "user not found" attempts
* Add support for Portsentry
ver. 0.9.0 (2014/03/14) - beta
----------
+1 -16
View File
@@ -56,12 +56,9 @@ following (note: on Debian-based systems, the script is called
`python-coverage`)::
coverage run bin/fail2ban-testcases
coverage report
Optionally:
coverage html
And then browse htmlcov/index.html and see how much coverage your test cases
Then look at htmlcov/index.html and see how much coverage your test cases
exert over the code base. Full coverage is a good thing however it may not be
complete. Try to ensure tests cover as many independent paths through the
code.
@@ -84,18 +81,6 @@ some quick commands::
status test
Testing with vagrant
--------------------
Testing can now be done inside a vagrant VM. Vagrantfile provided in
source code repository established two VMs:
- VM "secure" which can be used for testing fail2ban code.
- VM "attacker" which can be used to perform attack against our "secure" VM.
Both VMs are sharing the 192.168.200/24 network. If you are using this network
take a look into the Vagrantfile and change the IP.
Coding Standards
================
+244 -305
View File
@@ -1,268 +1,122 @@
bin/fail2ban-client
bin/fail2ban-regex
bin/fail2ban-server
bin/fail2ban-testcases
README.md
README.Solaris
ChangeLog
config/action.d/apf.conf
config/action.d/badips.conf
config/action.d/badips.py
config/action.d/blocklist_de.conf
config/action.d/bsd-ipfw.conf
config/action.d/cloudflare.conf
config/action.d/complain.conf
config/action.d/dshield.conf
config/action.d/dummy.conf
config/action.d/firewallcmd-allports.conf
config/action.d/firewallcmd-ipset.conf
config/action.d/firewallcmd-multiport.conf
config/action.d/firewallcmd-new.conf
config/action.d/hostsdeny.conf
config/action.d/ipfilter.conf
config/action.d/ipfw.conf
config/action.d/iptables-allports.conf
config/action.d/iptables-common.conf
config/action.d/iptables.conf
config/action.d/iptables-ipset-proto4.conf
config/action.d/iptables-ipset-proto6-allports.conf
config/action.d/iptables-ipset-proto6.conf
config/action.d/iptables-multiport.conf
config/action.d/iptables-multiport-log.conf
config/action.d/iptables-new.conf
config/action.d/iptables-xt_recent-echo.conf
config/action.d/mail-buffered.conf
config/action.d/mail.conf
config/action.d/mail-whois.conf
config/action.d/mail-whois-lines.conf
config/action.d/mynetwatchman.conf
config/action.d/nftables-allports.conf
config/action.d/nftables-common.conf
config/action.d/nftables-multiport.conf
config/action.d/nsupdate.conf
config/action.d/osx-afctl.conf
config/action.d/osx-ipfw.conf
config/action.d/pf.conf
config/action.d/route.conf
config/action.d/sendmail-buffered.conf
config/action.d/sendmail-common.conf
config/action.d/sendmail.conf
config/action.d/sendmail-geoip-lines.conf
config/action.d/sendmail-whois.conf
config/action.d/sendmail-whois-ipjailmatches.conf
config/action.d/sendmail-whois-ipmatches.conf
config/action.d/sendmail-whois-lines.conf
config/action.d/sendmail-whois-matches.conf
config/action.d/shorewall.conf
config/action.d/smtp.py
config/action.d/symbiosis-blacklist-allports.conf
config/action.d/ufw.conf
config/action.d/xarf-login-attack.conf
config/fail2ban.conf
config/filter.d/3proxy.conf
config/filter.d/apache-auth.conf
config/filter.d/apache-badbots.conf
config/filter.d/apache-botsearch.conf
config/filter.d/apache-common.conf
config/filter.d/apache-fakegooglebot.conf
config/filter.d/apache-modsecurity.conf
config/filter.d/apache-nohome.conf
config/filter.d/apache-noscript.conf
config/filter.d/apache-overflows.conf
config/filter.d/apache-shellshock.conf
config/filter.d/assp.conf
config/filter.d/asterisk.conf
config/filter.d/botsearch-common.conf
config/filter.d/common.conf
config/filter.d/counter-strike.conf
config/filter.d/courier-auth.conf
config/filter.d/courier-smtp.conf
config/filter.d/cyrus-imap.conf
config/filter.d/directadmin.conf
config/filter.d/dovecot.conf
config/filter.d/dropbear.conf
config/filter.d/ejabberd-auth.conf
config/filter.d/exim-common.conf
config/filter.d/exim.conf
config/filter.d/exim-spam.conf
config/filter.d/freeswitch.conf
config/filter.d/groupoffice.conf
config/filter.d/gssftpd.conf
config/filter.d/guacamole.conf
config/filter.d/haproxy-http-auth.conf
config/filter.d/horde.conf
config/filter.d/ignorecommands
config/filter.d/ignorecommands/apache-fakegooglebot
config/filter.d/kerio.conf
config/filter.d/lighttpd-auth.conf
config/filter.d/monit.conf
config/filter.d/murmur.conf
config/filter.d/mysqld-auth.conf
config/filter.d/nagios.conf
config/filter.d/named-refused.conf
config/filter.d/nginx-botsearch.conf
config/filter.d/nginx-http-auth.conf
config/filter.d/nginx-limit-req.conf
config/filter.d/nsd.conf
config/filter.d/openhab.conf
config/filter.d/openwebmail.conf
config/filter.d/oracleims.conf
config/filter.d/pam-generic.conf
config/filter.d/perdition.conf
config/filter.d/php-url-fopen.conf
config/filter.d/portsentry.conf
config/filter.d/postfix.conf
config/filter.d/postfix-rbl.conf
config/filter.d/postfix-sasl.conf
config/filter.d/proftpd.conf
config/filter.d/pure-ftpd.conf
config/filter.d/qmail.conf
config/filter.d/recidive.conf
config/filter.d/roundcube-auth.conf
config/filter.d/screensharingd.conf
config/filter.d/selinux-common.conf
config/filter.d/selinux-ssh.conf
config/filter.d/sendmail-auth.conf
config/filter.d/sendmail-reject.conf
config/filter.d/sendmail-spam.conf
config/filter.d/sieve.conf
config/filter.d/sogo-auth.conf
config/filter.d/solid-pop3d.conf
config/filter.d/squid.conf
config/filter.d/squirrelmail.conf
config/filter.d/sshd.conf
config/filter.d/sshd-ddos.conf
config/filter.d/stunnel.conf
config/filter.d/suhosin.conf
config/filter.d/tine20.conf
config/filter.d/uwimap-auth.conf
config/filter.d/vsftpd.conf
config/filter.d/webmin-auth.conf
config/filter.d/wuftpd.conf
config/filter.d/xinetd-fail.conf
config/jail.conf
config/paths-common.conf
config/paths-debian.conf
config/paths-fedora.conf
config/paths-freebsd.conf
config/paths-opensuse.conf
config/paths-osx.conf
CONTRIBUTING.md
TODO
THANKS
COPYING
DEVELOP
doc/run-rootless.txt
FILTERS
fail2ban-2to3
fail2ban/client/actionreader.py
fail2ban/client/beautifier.py
fail2ban/client/configparserinc.py
fail2ban/client/configreader.py
fail2ban/client/configurator.py
fail2ban/client/csocket.py
fail2ban/client/fail2banreader.py
fail2ban/client/fail2banregex.py
fail2ban/client/filterreader.py
fail2ban/client/__init__.py
fail2ban/client/jailreader.py
fail2ban/client/jailsreader.py
fail2ban/exceptions.py
fail2ban/helpers.py
fail2ban/__init__.py
fail2ban/protocol.py
fail2ban/server/action.py
fail2ban/server/actions.py
fail2ban/server/asyncserver.py
fail2ban/server/banmanager.py
fail2ban/server/database.py
fail2ban/server/datedetector.py
fail2ban/server/datetemplate.py
fail2ban/server/faildata.py
fail2ban/server/failmanager.py
fail2ban/server/failregex.py
fail2ban/server/filtergamin.py
fail2ban/server/filterpoll.py
fail2ban/server/filter.py
fail2ban/server/filterpyinotify.py
fail2ban/server/filtersystemd.py
fail2ban/server/__init__.py
fail2ban/server/iso8601.py
fail2ban/server/jail.py
fail2ban/server/jails.py
fail2ban/server/jailthread.py
fail2ban/server/mytime.py
fail2ban/server/server.py
fail2ban/server/strptime.py
fail2ban/server/ticket.py
fail2ban/server/transmitter.py
fail2ban-testcases-all
fail2ban-testcases-all-python3
fail2ban/tests/action_d/__init__.py
fail2ban/tests/action_d/test_badips.py
fail2ban/tests/action_d/test_smtp.py
fail2ban/tests/actionstestcase.py
fail2ban/tests/actiontestcase.py
bin/fail2ban-client
bin/fail2ban-server
bin/fail2ban-testcases
bin/fail2ban-regex
doc/run-rootless.txt
fail2ban/client/configreader.py
fail2ban/client/configparserinc.py
fail2ban/client/jailreader.py
fail2ban/client/fail2banreader.py
fail2ban/client/jailsreader.py
fail2ban/client/beautifier.py
fail2ban/client/filterreader.py
fail2ban/client/actionreader.py
fail2ban/client/__init__.py
fail2ban/client/configurator.py
fail2ban/client/csocket.py
fail2ban/server/asyncserver.py
fail2ban/server/database.py
fail2ban/server/filter.py
fail2ban/server/filterpyinotify.py
fail2ban/server/filtergamin.py
fail2ban/server/filterpoll.py
fail2ban/server/filtersystemd.py
fail2ban/server/iso8601.py
fail2ban/server/server.py
fail2ban/server/actions.py
fail2ban/server/faildata.py
fail2ban/server/failmanager.py
fail2ban/server/datedetector.py
fail2ban/server/jailthread.py
fail2ban/server/transmitter.py
fail2ban/server/action.py
fail2ban/server/ticket.py
fail2ban/server/jail.py
fail2ban/server/jails.py
fail2ban/server/__init__.py
fail2ban/server/banmanager.py
fail2ban/server/datetemplate.py
fail2ban/server/mytime.py
fail2ban/server/failregex.py
fail2ban/server/database.py
fail2ban/tests/banmanagertestcase.py
fail2ban/tests/failmanagertestcase.py
fail2ban/tests/clientreadertestcase.py
fail2ban/tests/config/action.d/brokenaction.conf
fail2ban/tests/config/fail2ban.conf
fail2ban/tests/config/filter.d/simple.conf
fail2ban/tests/config/filter.d/test.conf
fail2ban/tests/config/filter.d/test.local
fail2ban/tests/filtertestcase.py
fail2ban/tests/__init__.py
fail2ban/tests/dummyjail.py
fail2ban/tests/samplestestcase.py
fail2ban/tests/datedetectortestcase.py
fail2ban/tests/actiontestcase.py
fail2ban/tests/servertestcase.py
fail2ban/tests/sockettestcase.py
fail2ban/tests/utils.py
fail2ban/tests/misctestcase.py
fail2ban/tests/databasetestcase.py
fail2ban/tests/config/jail.conf
fail2ban/tests/config/fail2ban.conf
fail2ban/tests/config/paths-common.conf
fail2ban/tests/config/paths-debian.conf
fail2ban/tests/config/paths-freebsd.conf
fail2ban/tests/config/paths-osx.conf
fail2ban/tests/databasetestcase.py
fail2ban/tests/datedetectortestcase.py
fail2ban/tests/dummyjail.py
fail2ban/tests/fail2banregextestcase.py
fail2ban/tests/failmanagertestcase.py
fail2ban/tests/files/action.d/action_checkainfo.py
fail2ban/tests/files/action.d/action_errors.py
fail2ban/tests/files/action.d/action_modifyainfo.py
fail2ban/tests/files/action.d/action_noAction.py
fail2ban/tests/files/action.d/action_nomethod.py
fail2ban/tests/files/action.d/action.py
fail2ban/tests/files/config/apache-auth/basic/authz_owner/cant_get_me.html
fail2ban/tests/config/paths-debian.conf
fail2ban/tests/config/filter.d/simple.conf
fail2ban/tests/config/action.d/brokenaction.conf
fail2ban/tests/files/config/apache-auth/digest/.htaccess
fail2ban/tests/files/config/apache-auth/digest/.htpasswd
fail2ban/tests/files/config/apache-auth/digest_time/.htaccess
fail2ban/tests/files/config/apache-auth/digest_time/.htpasswd
fail2ban/tests/files/config/apache-auth/basic/authz_owner/.htaccess
fail2ban/tests/files/config/apache-auth/basic/authz_owner/cant_get_me.html
fail2ban/tests/files/config/apache-auth/basic/authz_owner/.htpasswd
fail2ban/tests/files/config/apache-auth/basic/file/.htaccess
fail2ban/tests/files/config/apache-auth/basic/file/.htpasswd
fail2ban/tests/files/config/apache-auth/digest_anon/.htaccess
fail2ban/tests/files/config/apache-auth/digest_anon/.htpasswd
fail2ban/tests/files/config/apache-auth/digest/.htaccess
fail2ban/tests/files/config/apache-auth/digest/.htpasswd
fail2ban/tests/files/config/apache-auth/digest.py
fail2ban/tests/files/config/apache-auth/digest_time/.htaccess
fail2ban/tests/files/config/apache-auth/digest_time/.htpasswd
fail2ban/tests/files/config/apache-auth/digest_wrongrelm/.htaccess
fail2ban/tests/files/config/apache-auth/digest_wrongrelm/.htpasswd
fail2ban/tests/files/config/apache-auth/noentry/.htaccess
fail2ban/tests/files/config/apache-auth/digest_anon/.htaccess
fail2ban/tests/files/config/apache-auth/digest_anon/.htpasswd
fail2ban/tests/files/config/apache-auth/README
fail2ban/tests/files/config/apache-auth/noentry/.htaccess
fail2ban/tests/files/database_v1.db
fail2ban/tests/files/filter.d/substition.conf
fail2ban/tests/files/filter.d/testcase01.conf
fail2ban/tests/files/filter.d/testcase-common.conf
fail2ban/tests/files/ignorecommand.py
fail2ban/tests/files/filter.d/substition.conf
fail2ban/tests/files/filter.d/testcase-common.conf
fail2ban/tests/files/filter.d/testcase01.conf
fail2ban/tests/files/testcase01.log
fail2ban/tests/files/testcase02.log
fail2ban/tests/files/testcase03.log
fail2ban/tests/files/testcase04.log
fail2ban/tests/files/testcase-usedns.log
fail2ban/tests/files/testcase-journal.log
fail2ban/tests/files/testcase-multiline.log
fail2ban/tests/files/logs/bsd/syslog-plain.txt
fail2ban/tests/files/logs/bsd/syslog-v.txt
fail2ban/tests/files/logs/bsd/syslog-vv.txt
fail2ban/tests/files/logs/3proxy
fail2ban/tests/files/logs/apache-auth
fail2ban/tests/files/logs/apache-badbots
fail2ban/tests/files/logs/apache-botscripts
fail2ban/tests/files/logs/apache-botsearch
fail2ban/tests/files/logs/apache-fakegooglebot
fail2ban/tests/files/logs/apache-modsecurity
fail2ban/tests/files/logs/apache-nohome
fail2ban/tests/files/logs/apache-noscript
fail2ban/tests/files/logs/apache-overflows
fail2ban/tests/files/logs/apache-shellshock
fail2ban/tests/files/logs/assp
fail2ban/tests/files/logs/asterisk
fail2ban/tests/files/logs/bsd/syslog-plain.txt
fail2ban/tests/files/logs/bsd/syslog-v.txt
fail2ban/tests/files/logs/bsd/syslog-vv.txt
fail2ban/tests/files/logs/counter-strike
fail2ban/tests/files/logs/courier-auth
fail2ban/tests/files/logs/courier-smtp
fail2ban/tests/files/logs/cyrus-imap
fail2ban/tests/files/logs/directadmin
fail2ban/tests/files/logs/dovecot
fail2ban/tests/files/logs/dropbear
fail2ban/tests/files/logs/ejabberd-auth
@@ -272,108 +126,193 @@ fail2ban/tests/files/logs/freeswitch
fail2ban/tests/files/logs/groupoffice
fail2ban/tests/files/logs/gssftpd
fail2ban/tests/files/logs/guacamole
fail2ban/tests/files/logs/haproxy-http-auth
fail2ban/tests/files/logs/horde
fail2ban/tests/files/logs/kerio
fail2ban/tests/files/logs/lighttpd-auth
fail2ban/tests/files/logs/monit
fail2ban/tests/files/logs/murmur
fail2ban/tests/files/logs/mysqld-auth
fail2ban/tests/files/logs/nagios
fail2ban/tests/files/logs/named-refused
fail2ban/tests/files/logs/nginx-botsearch
fail2ban/tests/files/logs/nginx-http-auth
fail2ban/tests/files/logs/nginx-limit-req
fail2ban/tests/files/logs/nsd
fail2ban/tests/files/logs/openhab
fail2ban/tests/files/logs/openwebmail
fail2ban/tests/files/logs/oracleims
fail2ban/tests/files/logs/pam-generic
fail2ban/tests/files/logs/perdition
fail2ban/tests/files/logs/php-url-fopen
fail2ban/tests/files/logs/portsentry
fail2ban/tests/files/logs/postfix
fail2ban/tests/files/logs/postfix-rbl
fail2ban/tests/files/logs/postfix-sasl
fail2ban/tests/files/logs/named-refused
fail2ban/tests/files/logs/nginx-http-auth
fail2ban/tests/files/logs/pam-generic
fail2ban/tests/files/logs/postfix
fail2ban/tests/files/logs/proftpd
fail2ban/tests/files/logs/pure-ftpd
fail2ban/tests/files/logs/qmail
fail2ban/tests/files/logs/recidive
fail2ban/tests/files/logs/roundcube-auth
fail2ban/tests/files/logs/screensharingd
fail2ban/tests/files/logs/selinux-ssh
fail2ban/tests/files/logs/sendmail-auth
fail2ban/tests/files/logs/sendmail-reject
fail2ban/tests/files/logs/sendmail-spam
fail2ban/tests/files/logs/sieve
fail2ban/tests/files/logs/sogo-auth
fail2ban/tests/files/logs/solid-pop3d
fail2ban/tests/files/logs/squid
fail2ban/tests/files/logs/squirrelmail
fail2ban/tests/files/logs/sshd
fail2ban/tests/files/logs/sshd-ddos
fail2ban/tests/files/logs/stunnel
fail2ban/tests/files/logs/suhosin
fail2ban/tests/files/logs/tine20
fail2ban/tests/files/logs/uwimap-auth
fail2ban/tests/files/logs/sogo-auth
fail2ban/tests/files/logs/solid-pop3d
fail2ban/tests/files/logs/sshd
fail2ban/tests/files/logs/sshd-ddos
fail2ban/tests/files/logs/vsftpd
fail2ban/tests/files/logs/webmin-auth
fail2ban/tests/files/logs/wuftpd
fail2ban/tests/files/logs/uwimap-auth
fail2ban/tests/files/logs/xinetd-fail
fail2ban/tests/files/testcase01.log
fail2ban/tests/files/testcase02.log
fail2ban/tests/files/testcase03.log
fail2ban/tests/files/testcase04.log
fail2ban/tests/files/testcase-journal.log
fail2ban/tests/files/testcase-multiline.log
fail2ban/tests/files/testcase-usedns.log
fail2ban/tests/files/testcase-wrong-char.log
fail2ban/tests/filtertestcase.py
fail2ban/tests/__init__.py
fail2ban/tests/misctestcase.py
fail2ban/tests/samplestestcase.py
fail2ban/tests/servertestcase.py
fail2ban/tests/sockettestcase.py
fail2ban/tests/utils.py
fail2ban/tests/config/jail.conf
fail2ban/tests/config/fail2ban.conf
fail2ban/tests/config/filter.d/simple.conf
fail2ban/tests/config/action.d/brokenaction.conf
setup.py
setup.cfg
fail2ban/__init__.py
fail2ban/exceptions.py
fail2ban/helpers.py
fail2ban/version.py
files/bash-completion
files/cacti/cacti_host_template_fail2ban.xml
files/cacti/fail2ban_stats.sh
files/cacti/README
files/debian-initd
files/fail2ban-logrotate
files/fail2ban.service
files/fail2ban-tmpfiles.conf
files/fail2ban.upstart
files/gen_badbots
files/gentoo-confd
fail2ban/protocol.py
setup.py
setup.cfg
kill-server
config/jail.conf
config/fail2ban.conf
config/filter.d/common.conf
config/filter.d/apache-auth.conf
config/filter.d/apache-badbots.conf
config/filter.d/apache-botsearch.conf
config/filter.d/apache-modsecurity.conf
config/filter.d/apache-nohome.conf
config/filter.d/apache-noscript.conf
config/filter.d/apache-overflows.conf
config/filter.d/nginx-http-auth.conf
config/filter.d/counter-strike.conf
config/filter.d/courier-auth.conf
config/filter.d/courier-smtp.conf
config/filter.d/cyrus-imap.conf
config/filter.d/ejabberd-auth.conf
config/filter.d/exim.conf
config/filter.d/freeswitch.conf
config/filter.d/gssftpd.conf
config/filter.d/kerio.conf
config/filter.d/horde.conf
config/filter.d/suhosin.conf
config/filter.d/nagios.conf
config/filter.d/named-refused.conf
config/filter.d/nsd.conf
config/filter.d/openwebmail.conf
config/filter.d/pam-generic.conf
config/filter.d/php-url-fopen.conf
config/filter.d/postfix-sasl.conf
config/filter.d/pam-generic.conf
config/filter.d/php-url-fopen.conf
config/filter.d/postfix-sasl.conf
config/filter.d/postfix.conf
config/filter.d/proftpd.conf
config/filter.d/pure-ftpd.conf
config/filter.d/qmail.conf
config/filter.d/pam-generic.conf
config/filter.d/php-url-fopen.conf
config/filter.d/postfix-sasl.conf
config/filter.d/sendmail-auth.conf
config/filter.d/sendmail-reject.conf
config/filter.d/sieve.conf
config/filter.d/solid-pop3d.conf
config/filter.d/squid.conf
config/filter.d/sshd.conf
config/filter.d/sshd-ddos.conf
config/filter.d/stunnel.conf
config/filter.d/vsftpd.conf
config/filter.d/webmin-auth.conf
config/filter.d/wuftpd.conf
config/filter.d/xinetd-fail.conf
config/filter.d/asterisk.conf
config/filter.d/dovecot.conf
config/filter.d/dropbear.conf
config/filter.d/lighttpd-auth.conf
config/filter.d/recidive.conf
config/filter.d/roundcube-auth.conf
config/filter.d/assp.conf
config/filter.d/sogo-auth.conf
config/filter.d/mysqld-auth.conf
config/filter.d/selinux-common.conf
config/filter.d/selinux-ssh.conf
config/filter.d/3proxy.conf
config/filter.d/apache-common.conf
config/filter.d/exim-common.conf
config/filter.d/exim-spam.conf
config/filter.d/freeswitch.conf
config/filter.d/groupoffice.conf
config/filter.d/perdition.conf
config/filter.d/uwimap-auth.conf
config/filter.d/courier-auth.conf
config/filter.d/courier-smtp.conf
config/filter.d/ejabberd-auth.conf
config/filter.d/guacamole.conf
config/filter.d/sendmail-spam.conf
config/action.d/apf.conf
config/action.d/blocklist_de.conf
config/action.d/osx-afctl.conf
config/action.d/osx-ipfw.conf
config/action.d/sendmail-common.conf
config/action.d/badips.conf
config/action.d/bsd-ipfw.conf
config/action.d/dummy.conf
config/action.d/firewallcmd-new.conf
config/action.d/firewallcmd-ipset.conf
config/action.d/iptables-ipset-proto6-allports.conf
config/action.d/iptables-common.conf
config/action.d/iptables-ipset-proto4.conf
config/action.d/iptables-ipset-proto6.conf
config/action.d/iptables-xt_recent-echo.conf
config/action.d/route.conf
config/action.d/complain.conf
config/action.d/dshield.conf
config/action.d/hostsdeny.conf
config/action.d/ipfw.conf
config/action.d/ipfilter.conf
config/action.d/iptables.conf
config/action.d/iptables-allports.conf
config/action.d/iptables-multiport.conf
config/action.d/iptables-multiport-log.conf
config/action.d/iptables-new.conf
config/action.d/mail.conf
config/action.d/mail-buffered.conf
config/action.d/mail-whois.conf
config/action.d/mail-whois-lines.conf
config/action.d/mynetwatchman.conf
config/action.d/pf.conf
config/action.d/sendmail.conf
config/action.d/sendmail-buffered.conf
config/action.d/sendmail-whois-ipmatches.conf
config/action.d/sendmail-whois.conf
config/action.d/sendmail-whois-lines.conf
config/action.d/shorewall.conf
config/action.d/xarf-login-attack.conf
config/action.d/ufw.conf
config/fail2ban.conf
doc/run-rootless.txt
man/fail2ban-client.1
man/fail2ban.1
man/jail.conf.5
man/fail2ban-client.h2m
man/fail2ban-server.1
man/fail2ban-server.h2m
man/fail2ban-regex.1
man/fail2ban-regex.h2m
man/generate-man
files/gentoo-initd
files/ipmasq-ZZZzzz_fail2ban.rul
files/logwatch/fail2ban
files/macosx-initd
files/monit/fail2ban
files/nagios/check_fail2ban
files/nagios/README
files/gentoo-confd
files/redhat-initd
files/macosx-initd
files/solaris-fail2ban.xml
files/solaris-svc-fail2ban
files/suse-initd
FILTERS
kill-server
man/fail2ban.1
man/fail2ban-client.1
man/fail2ban-client.h2m
man/fail2ban-regex.1
man/fail2ban-regex.h2m
man/fail2ban-server.1
man/fail2ban-server.h2m
man/generate-man
man/jail.conf.5
README.md
README.Solaris
RELEASE
setup.cfg
setup.py
THANKS
TODO
Vagrantfile
files/fail2ban-logrotate
files/cacti/fail2ban_stats.sh
files/cacti/cacti_host_template_fail2ban.xml
files/cacti/README
files/nagios/check_fail2ban
files/nagios/README
files/bash-completion
files/fail2ban-tmpfiles.conf
files/fail2ban.service
files/ipmasq-ZZZzzz_fail2ban.rul
files/gen_badbots
+1 -2
View File
@@ -1,5 +1,4 @@
include ChangeLog COPYING DEVELOP FILTERS README.* THANKS TODO CONTRIBUTING* Vagrantfile
include ChangeLog COPYING DEVELOP FILTERS README.* THANKS TODO
graft doc
graft files
recursive-include config *.conf *.py
recursive-include config/filter.d/ignorecommands *
+12 -26
View File
@@ -2,19 +2,17 @@
/ _|__ _(_) |_ ) |__ __ _ _ _
| _/ _` | | |/ /| '_ \/ _` | ' \
|_| \__,_|_|_/___|_.__/\__,_|_||_|
v0.9.4 2015/03/08
v0.9.0 2014/03/14
## Fail2Ban: ban hosts that cause multiple authentication errors
Fail2Ban scans log files like `/var/log/auth.log` and bans IP addresses having
too many failed login attempts. It does this by updating system firewall rules
to reject new connections from those IP addresses, for a configurable amount
of time. Fail2Ban comes out-of-the-box ready to read many standard log files,
such as those for sshd and Apache, and is easy to configure to read any log
file you choose, for any error you choose.
Fail2Ban scans log files like /var/log/pwdfail and bans IP that makes too many
password failures. It updates firewall rules to reject the IP address. These
rules can be defined by the user. Fail2Ban can read multiple log files such as
sshd or Apache web server ones.
Though Fail2Ban is able to reduce the rate of incorrect authentications
attempts, it cannot eliminate the risk that weak authentication presents.
Fail2Ban is able to reduce the rate of incorrect authentications attempts
however it cannot eliminate the risk that weak authentication presents.
Configure services to use only two factor or public/private authentication
mechanisms if you really want to protect services.
@@ -35,16 +33,15 @@ Optional:
- Linux >= 2.6.13
- [gamin >= 0.0.21](http://www.gnome.org/~veillard/gamin)
- [systemd >= 204](http://www.freedesktop.org/wiki/Software/systemd)
- [dnspython](http://www.dnspython.org/)
To install, just do:
tar xvfj fail2ban-0.9.4.tar.bz2
cd fail2ban-0.9.4
tar xvfj fail2ban-0.9.0.tar.bz2
cd fail2ban-0.9.0
python setup.py install
This will install Fail2Ban into the python library directory. The executable
scripts are placed into `/usr/bin`, and configuration under `/etc/fail2ban`.
scripts are placed into /usr/bin, and configuration under /etc/fail2ban.
Fail2Ban should be correctly installed now. Just type:
@@ -53,20 +50,11 @@ Fail2Ban should be correctly installed now. Just type:
to see if everything is alright. You should always use fail2ban-client and
never call fail2ban-server directly.
Please note that the system init/service script is not automatically installed.
To enable fail2ban as an automatic service, simply copy the script for your
distro from the `files` directory to `/etc/init.d`. Example (on a Debian-based
system):
cp files/debian-initd /etc/init.d/fail2ban
update-rc.d fail2ban defaults
service fail2ban start
Configuration:
--------------
You can configure Fail2Ban using the files in `/etc/fail2ban`. It is possible to
configure the server using commands sent to it by `fail2ban-client`. The
You can configure Fail2Ban using the files in /etc/fail2ban. It is possible to
configure the server using commands sent to it by fail2ban-client. The
available commands are described in the fail2ban-client(1) manpage. Also see
fail2ban(1) and jail.conf(5) manpages for further references.
@@ -77,8 +65,6 @@ Code status:
* [![Coverage Status](https://coveralls.io/repos/fail2ban/fail2ban/badge.png?branch=master)](https://coveralls.io/r/fail2ban/fail2ban)
* [![codecov.io](https://codecov.io/github/fail2ban/fail2ban/coverage.svg?branch=master)](https://codecov.io/github/fail2ban/fail2ban?branch=master)
Contact:
--------
+9 -18
View File
@@ -47,15 +47,6 @@ Preparation
* Ensure the MANIFEST is complete
ad-hoc bash script to run in a clean clone:
find -type f | grep -v -e '\.git' -e '/doc/' -e '\.travis' -e MANIFEST | sed -e 's,^\./,,g' | while read f; do grep -ne "^$f\$" MANIFEST >/dev/null || echo "$f" ; done
or an alternative for comparison with previous release
git diff 0.9.4 | grep -B2 'index 0000000..' | grep -B1 'new file mode' | sed -n -e '/^diff /s,.* b/,,gp' >> MANIFEST
sort MANIFEST | uniq | sponge MANIFEST
* Run::
python setup.py sdist
@@ -66,24 +57,24 @@ Preparation
* Which indicates that testcases/files/logs/mysqld.log has been moved or is a directory::
tar -C /tmp -jxf dist/fail2ban-0.9.4.tar.bz2
tar -C /tmp -jxf dist/fail2ban-0.9.0.tar.bz2
* clean up current direcory::
diff -rul --exclude \*.pyc . /tmp/fail2ban-0.9.4/
diff -rul --exclude \*.pyc . /tmp/fail2ban-0.9.0/
* Only differences should be files that you don't want distributed.
* Ensure the tests work from the tarball::
cd /tmp/fail2ban-0.9.4/ && bin/fail2ban-testcases
cd /tmp/fail2ban-0.9.0/ && export PYTHONPATH=`pwd` && bin/fail2ban-testcases
* Add/finalize the corresponding entry in the ChangeLog
* To generate a list of committers use e.g.::
git shortlog -sn 0.9.4.. | sed -e 's,^[ 0-9\t]*,,g' | tr '\n' '\|' | sed -e 's:|:, :g'
git shortlog -sn 0.8.12.. | sed -e 's,^[ 0-9\t]*,,g' | tr '\n' '\|' | sed -e 's:|:, :g'
* Ensure the top of the ChangeLog has the right version and current date.
* Ensure the top entry of the ChangeLog has the right version and current date.
@@ -106,7 +97,7 @@ Preparation
* Tag the release by using a signed (and annotated) tag. Cut/paste
release ChangeLog entry as tag annotation::
git tag -s 0.9.4
git tag -s 0.9.1
Pre Release
===========
@@ -121,7 +112,7 @@ Pre Release
* http://packages.qa.debian.org/f/fail2ban.html
* FreeBSD: Christoph Theis theis@gmx.at>
* FreeBSD: Christoph Theis theis@gmx.at>, Nick Hilliard <nick@foobar.org>
* http://svnweb.freebsd.org/ports/head/security/py-fail2ban/Makefile?view=markup
* http://www.freebsd.org/cgi/query-pr-summary.cgi?text=fail2ban
@@ -149,7 +140,7 @@ Pre Release
* https://bugs.mageia.org/buglist.cgi?quicksearch=fail2ban
* And potentially to the fail2ban-users email list.
* An potentially to the fail2ban-users email list.
* Wait for feedback from distributors
@@ -190,7 +181,7 @@ Post Release
Add the following to the top of the ChangeLog::
ver. 0.9.5 (2015/XX/XXX) - wanna-be-released
ver. 0.9.1 (2014/XX/XXX) - wanna-be-released
-----------
- Fixes:
@@ -202,5 +193,5 @@ Add the following to the top of the ChangeLog::
Alter the git shortlog command in the previous section to refer to the just
released version.
and adjust fail2ban/version.py to carry .dev0 suffix to signal
and adjust fail2ban/version.py to carry .dev suffix to signal
a version under development.
-14
View File
@@ -6,7 +6,6 @@ the project. If you have been left off, please let us know
(preferably send a pull request on github with the "fix") and you will
be added
Aaron Brice
Adam Tkac
Adrien Clerc
ache
@@ -14,7 +13,6 @@ ag4ve (Shawn)
Alasdair D. Campbell
Amir Caspi
Amy
Andrew St. Jean
Andrey G. Grozin
Andy Fragen
Arturo 'Buanzo' Busleiman
@@ -28,21 +26,16 @@ Christian Rauch
Christophe Carles
Christoph Haas
Christos Psonis
craneworks
Cyril Jaquier
Daniel B. Cid
Daniel B.
Daniel Black
David Nutter
Derek Atkins
Donald Yandt
Eric Gerbier
Enrico Labedzki
Eugene Hopkinson (SlowRiot)
ftoppi
Florian Robert (1technophile)
François Boulogne
Frantisek Sumsal
Frédéric
Georgiy Mernov
Guilhem Lettron
@@ -66,14 +59,12 @@ Joël Bertrand
JP Espinosa
jserrachinha
Justin Shore
Kevin Locke
Kévin Drapel
kjohnsonecl
kojiro
Lars Kneschke
Lee Clemens
leftyfb (Mike Rushton)
M. Maraun
Manuel Arostegui Ramirez
Marcel Dopita
Mark Edgington
@@ -89,10 +80,7 @@ Michael Hanselmann
Mika (mkl)
Nick Munger
onorua
Orion Poplawski
Pablo Rodriguez Fernandez
Paul Marrapese
Paul Traina
Noel Butler
Patrick Börjesson
Pressy
@@ -113,9 +101,7 @@ Stefan Tatschner
Stephen Gildea
Steven Hiscocks
TESTOVIK
Thomas Mayer
Tom Pike
Tom Hendrikx
Tomas Pihl
Tony Lawrence
Tomasz Ciolek
Vendored
+5
View File
@@ -1,5 +1,10 @@
Vagrant.configure("2") do |config|
config.vm.define "builder" do |builder|
builder.vm.box = "vm144"
builder.vm.provision "shell", path: "provision.sh"
end
config.vm.define "secure" do |secure|
secure.vm.box = "ubuntu/trusty64"
secure.vm.hostname = "secure.dev.fail2ban.org"
+66 -101
View File
@@ -22,17 +22,8 @@ __author__ = "Cyril Jaquier"
__copyright__ = "Copyright (c) 2004 Cyril Jaquier"
__license__ = "GPL"
import getopt
import logging
import os
import pickle
import re
import shlex
import signal
import socket
import string
import sys
import time
import sys, string, os, pickle, re, logging, signal
import getopt, time, shlex, socket
from fail2ban.version import version
from fail2ban.protocol import printFormatted
@@ -68,53 +59,53 @@ class Fail2banClient:
self.__conf["pidfile"] = None
def dispVersion(self):
print "Fail2Ban v" + version
print
print "Copyright (c) 2004-2008 Cyril Jaquier, 2008- Fail2Ban Contributors"
print "Copyright of modifications held by their respective authors."
print "Licensed under the GNU General Public License v2 (GPL)."
print
print "Written by Cyril Jaquier <cyril.jaquier@fail2ban.org>."
print "Many contributions by Yaroslav O. Halchenko <debian@onerussian.com>."
print("Fail2Ban v" + version)
print()
print("Copyright (c) 2004-2008 Cyril Jaquier, 2008- Fail2Ban Contributors")
print("Copyright of modifications held by their respective authors.")
print("Licensed under the GNU General Public License v2 (GPL).")
print()
print("Written by Cyril Jaquier <cyril.jaquier@fail2ban.org>.")
print("Many contributions by Yaroslav O. Halchenko <debian@onerussian.com>.")
def dispUsage(self):
""" Prints Fail2Ban command line options and exits
"""
print "Usage: "+self.__argv[0]+" [OPTIONS] <COMMAND>"
print
print "Fail2Ban v" + version + " reads log file that contains password failure report"
print "and bans the corresponding IP addresses using firewall rules."
print
print "Options:"
print " -c <DIR> configuration directory"
print " -s <FILE> socket path"
print " -p <FILE> pidfile path"
print " -d dump configuration. For debugging"
print " -i interactive mode"
print " -v increase verbosity"
print " -q decrease verbosity"
print " -x force execution of the server (remove socket file)"
print " -b start server in background (default)"
print " -f start server in foreground (note that the client forks once itself)"
print " -h, --help display this help message"
print " -V, --version print the version"
print
print "Command:"
print("Usage: "+self.__argv[0]+" [OPTIONS] <COMMAND>")
print()
print("Fail2Ban v" + version + " reads log file that contains password failure report")
print("and bans the corresponding IP addresses using firewall rules.")
print()
print("Options:")
print(" -c <DIR> configuration directory")
print(" -s <FILE> socket path")
print(" -p <FILE> pidfile path")
print(" -d dump configuration. For debugging")
print(" -i interactive mode")
print(" -v increase verbosity")
print(" -q decrease verbosity")
print(" -x force execution of the server (remove socket file)")
print(" -b start server in background (default)")
print(" -f start server in foreground (note that the client forks once itself)")
print(" -h, --help display this help message")
print(" -V, --version print the version")
print()
print("Command:")
# Prints the protocol
printFormatted()
print
print "Report bugs to https://github.com/fail2ban/fail2ban/issues"
print()
print("Report bugs to https://github.com/fail2ban/fail2ban/issues")
def dispInteractive(self):
print "Fail2Ban v" + version + " reads log file that contains password failure report"
print "and bans the corresponding IP addresses using firewall rules."
print
print("Fail2Ban v" + version + " reads log file that contains password failure report")
print("and bans the corresponding IP addresses using firewall rules.")
print()
def __sigTERMhandler(self, signum, frame):
# Print a new line because we probably come from wait
print
print()
logSys.warning("Caught signal %d. Exiting" % signum)
sys.exit(-1)
@@ -153,57 +144,31 @@ class Fail2banClient:
return self.__processCmd([["ping"]], False)
def __processCmd(self, cmd, showRet = True):
client = None
try:
beautifier = Beautifier()
streamRet = True
for c in cmd:
beautifier.setInputCmd(c)
try:
if not client:
client = CSocket(self.__conf["socket"])
ret = client.send(c)
if ret[0] == 0:
logSys.debug("OK : " + `ret[1]`)
if showRet:
print beautifier.beautify(ret[1])
else:
logSys.error("NOK: " + `ret[1].args`)
if showRet:
print beautifier.beautifyError(ret[1])
streamRet = False
except socket.error:
beautifier = Beautifier()
streamRet = True
for c in cmd:
beautifier.setInputCmd(c)
try:
client = CSocket(self.__conf["socket"])
ret = client.send(c)
if ret[0] == 0:
logSys.debug("OK : " + repr(ret[1]))
if showRet:
self.__logSocketError()
return False
except Exception, e:
if showRet:
logSys.error(e)
return False
finally:
if client:
client.close()
return streamRet
def __logSocketError(self):
try:
if os.access(self.__conf["socket"], os.F_OK):
# This doesn't check if path is a socket,
# but socket.error should be raised
if os.access(self.__conf["socket"], os.W_OK):
# Permissions look good, but socket.error was raised
logSys.error("Unable to contact server. Is it running?")
print(beautifier.beautify(ret[1]))
else:
logSys.error("Permission denied to socket: %s,"
" (you must be root)", self.__conf["socket"])
else:
logSys.error("Failed to access socket path: %s."
" Is fail2ban running?",
self.__conf["socket"])
except Exception as e:
logSys.error("Exception while checking socket access: %s",
self.__conf["socket"])
logSys.error(e)
logSys.error("NOK: " + repr(ret[1].args))
if showRet:
print(beautifier.beautifyError(ret[1]))
streamRet = False
except socket.error:
if showRet:
logSys.error("Unable to contact server. Is it running?")
return False
except Exception as e:
if showRet:
logSys.error(e)
return False
return streamRet
##
# Process a command line.
@@ -418,7 +383,7 @@ class Fail2banClient:
readline.parse_and_bind("tab: complete")
self.dispInteractive()
while True:
cmd = raw_input(self.PROMPT)
cmd = input(self.PROMPT)
if cmd == "exit" or cmd == "quit":
# Exit
return True
@@ -427,10 +392,10 @@ class Fail2banClient:
elif not cmd == "":
try:
self.__processCommand(shlex.split(cmd))
except Exception, e:
except Exception as e:
logSys.error(e)
except (EOFError, KeyboardInterrupt):
print
print()
return True
# Single command mode
else:
@@ -444,21 +409,21 @@ class Fail2banClient:
# TODO: get away from stew of return codes and exception
# handling -- handle via exceptions
try:
self.__configurator.Reload()
self.__configurator.readAll()
ret = self.__configurator.getOptions(jail)
self.__configurator.convertToProtocol()
self.__stream = self.__configurator.getConfigStream()
except Exception, e:
except Exception as e:
logSys.error("Failed during configuration: %s" % e)
ret = False
return ret
@staticmethod
#@staticmethod
def dumpConfig(cmd):
for c in cmd:
print c
print(c)
return True
dumpConfig = staticmethod(dumpConfig)
class ServerExecutionException(Exception):
+539 -2
View File
@@ -29,6 +29,543 @@ __author__ = "Fail2Ban Developers"
__copyright__ = "Copyright (c) 2004-2008 Cyril Jaquier, 2012-2014 Yaroslav Halchenko"
__license__ = "GPL"
from fail2ban.client.fail2banregex import exec_command_line
import getopt, sys, time, logging, os, locale, shlex, time, urllib.request, urllib.parse, urllib.error
from optparse import OptionParser, Option
exec_command_line()
from configparser import NoOptionError, NoSectionError, MissingSectionHeaderError
try:
from systemd import journal
from fail2ban.server.filtersystemd import FilterSystemd
except ImportError:
journal = None
from fail2ban.version import version
from fail2ban.client.filterreader import FilterReader
from fail2ban.server.filter import Filter
from fail2ban.server.failregex import RegexException
from fail2ban.helpers import FormatterWithTraceBack, getLogger
# Gets the instance of the logger.
logSys = getLogger("fail2ban")
def debuggexURL(sample, regex):
q = urllib.parse.urlencode({ 're': regex.replace('<HOST>', '(?&.ipv4)'),
'str': sample,
'flavor': 'python' })
return 'http://www.debuggex.com/?' + q
def shortstr(s, l=53):
"""Return shortened string
"""
if len(s) > l:
return s[:l-3] + '...'
return s
def pprint_list(l, header=None):
if not len(l):
return
if header:
s = "|- %s\n" % header
else:
s = ''
print(s + "| " + "\n| ".join(l) + '\n`-')
def file_lines_gen(hdlr):
for line in hdlr:
try:
line = line.decode(fail2banRegex.encoding, 'strict')
except UnicodeDecodeError:
if sys.version_info >= (3,): # Python 3 must be decoded
line = line.decode(fail2banRegex.encoding, 'ignore')
yield line
def journal_lines_gen(myjournal):
while True:
try:
entry = myjournal.get_next()
except OSError:
continue
if not entry:
break
yield FilterSystemd.formatJournalEntry(entry)
def get_opt_parser():
# use module docstring for help output
p = OptionParser(
usage="%s [OPTIONS] <LOG> <REGEX> [IGNOREREGEX]\n" % sys.argv[0] + __doc__
+ """
LOG:
string a string representing a log line
filename path to a log file (/var/log/auth.log)
"systemd-journal" search systemd journal (systemd-python required)
REGEX:
string a string representing a 'failregex'
filename path to a filter file (filter.d/sshd.conf)
IGNOREREGEX:
string a string representing an 'ignoreregex'
filename path to a filter file (filter.d/sshd.conf)
Copyright (c) 2004-2008 Cyril Jaquier, 2008- Fail2Ban Contributors
Copyright of modifications held by their respective authors.
Licensed under the GNU General Public License v2 (GPL).
Written by Cyril Jaquier <cyril.jaquier@fail2ban.org>.
Many contributions by Yaroslav O. Halchenko and Steven Hiscocks.
Report bugs to https://github.com/fail2ban/fail2ban/issues
""",
version="%prog " + version)
p.add_options([
Option("-d", "--datepattern",
help="set custom pattern used to match date/times"),
Option("-e", "--encoding",
help="File encoding. Default: system locale"),
Option("-L", "--maxlines", type=int, default=0,
help="maxlines for multi-line regex"),
Option("-m", "--journalmatch",
help="journalctl style matches overriding filter file. "
"\"systemd-journal\" only"),
Option('-l', "--log-level", type="choice",
dest="log_level",
choices=('heavydebug', 'debug', 'info', 'notice', 'warning', 'error', 'critical'),
default=None,
help="Log level for the Fail2Ban logger to use"),
Option("-v", "--verbose", action='store_true',
help="Be verbose in output"),
Option("-D", "--debuggex", action='store_true',
help="Produce debuggex.com urls for debugging there"),
Option("--print-no-missed", action='store_true',
help="Do not print any missed lines"),
Option("--print-no-ignored", action='store_true',
help="Do not print any ignored lines"),
Option("--print-all-matched", action='store_true',
help="Print all matched lines"),
Option("--print-all-missed", action='store_true',
help="Print all missed lines, no matter how many"),
Option("--print-all-ignored", action='store_true',
help="Print all ignored lines, no matter how many"),
Option("-t", "--log-traceback", action='store_true',
help="Enrich log-messages with compressed tracebacks"),
Option("--full-traceback", action='store_true',
help="Either to make the tracebacks full, not compressed (as by default)"),
])
return p
class RegexStat(object):
def __init__(self, failregex):
self._stats = 0
self._failregex = failregex
self._ipList = list()
def __str__(self):
return "%s(%r) %d failed: %s" \
% (self.__class__, self._failregex, self._stats, self._ipList)
def inc(self):
self._stats += 1
def getStats(self):
return self._stats
def getFailRegex(self):
return self._failregex
def appendIP(self, value):
self._ipList.append(value)
def getIPList(self):
return self._ipList
class LineStats(object):
"""Just a convenience container for stats
"""
def __init__(self):
self.tested = self.matched = 0
self.matched_lines = []
self.missed = 0
self.missed_lines = []
self.missed_lines_timeextracted = []
self.ignored = 0
self.ignored_lines = []
self.ignored_lines_timeextracted = []
def __str__(self):
return "%(tested)d lines, %(ignored)d ignored, %(matched)d matched, %(missed)d missed" % self
# just for convenient str
def __getitem__(self, key):
return getattr(self, key)
class Fail2banRegex(object):
def __init__(self, opts):
self._verbose = opts.verbose
self._debuggex = opts.debuggex
self._maxlines = 20
self._print_no_missed = opts.print_no_missed
self._print_no_ignored = opts.print_no_ignored
self._print_all_matched = opts.print_all_matched
self._print_all_missed = opts.print_all_missed
self._print_all_ignored = opts.print_all_ignored
self._maxlines_set = False # so we allow to override maxlines in cmdline
self._datepattern_set = False
self._journalmatch = None
self._filter = Filter(None)
self._ignoreregex = list()
self._failregex = list()
self._time_elapsed = None
self._line_stats = LineStats()
if opts.maxlines:
self.setMaxLines(opts.maxlines)
if opts.journalmatch is not None:
self.setJournalMatch(opts.journalmatch.split())
if opts.datepattern:
self.setDatePattern(opts.datepattern)
if opts.encoding:
self.encoding = opts.encoding
else:
self.encoding = locale.getpreferredencoding()
def setDatePattern(self, pattern):
if not self._datepattern_set:
self._filter.setDatePattern(pattern)
self._datepattern_set = True
if pattern is not None:
print("Use datepattern : %s" % (
self._filter.getDatePattern()[1], ))
def setMaxLines(self, v):
if not self._maxlines_set:
self._filter.setMaxLines(int(v))
self._maxlines_set = True
print("Use maxlines : %d" % self._filter.getMaxLines())
def setJournalMatch(self, v):
if self._journalmatch is None:
self._journalmatch = v
def readRegex(self, value, regextype):
assert(regextype in ('fail', 'ignore'))
regex = regextype + 'regex'
if os.path.isfile(value):
print("Use %11s file : %s" % (regex, value))
reader = FilterReader(value, 'fail2ban-regex-jail', {})
reader.setBaseDir(None)
if reader.readexplicit():
reader.getOptions(None)
readercommands = reader.convert()
regex_values = [
RegexStat(m[3])
for m in [x for x in readercommands if x[0] == 'set' and x[2] == "add%sregex" % regextype]]
# Read out and set possible value of maxlines
for command in readercommands:
if command[2] == "maxlines":
maxlines = int(command[3])
try:
self.setMaxLines(maxlines)
except ValueError:
print("ERROR: Invalid value for maxlines (%(maxlines)r) " \
"read from %(value)s" % locals())
return False
elif command[2] == 'addjournalmatch':
journalmatch = command[3]
self.setJournalMatch(shlex.split(journalmatch))
elif command[2] == 'datepattern':
datepattern = command[3]
self.setDatePattern(datepattern)
else:
print("ERROR: failed to read %s" % value)
return False
else:
print("Use %11s line : %s" % (regex, shortstr(value)))
regex_values = [RegexStat(value)]
setattr(self, "_" + regex, regex_values)
for regex in regex_values:
getattr(
self._filter,
'add%sRegex' % regextype.title())(regex.getFailRegex())
return True
def testIgnoreRegex(self, line):
found = False
try:
ret = self._filter.ignoreLine([(line, "", "")])
if ret is not None:
found = True
regex = self._ignoreregex[ret].inc()
except RegexException as e:
print(e)
return False
return found
def testRegex(self, line, date=None):
orgLineBuffer = self._filter._Filter__lineBuffer
fullBuffer = len(orgLineBuffer) >= self._filter.getMaxLines()
try:
line, ret = self._filter.processLine(line, date, checkAllRegex=True)
for match in ret:
# Append True/False flag depending if line was matched by
# more than one regex
match.append(len(ret)>1)
regex = self._failregex[match[0]]
regex.inc()
regex.appendIP(match)
except RegexException as e:
print(e)
return False
except IndexError:
print("Sorry, but no <HOST> found in regex")
return False
for bufLine in orgLineBuffer[int(fullBuffer):]:
if bufLine not in self._filter._Filter__lineBuffer:
try:
self._line_stats.missed_lines.pop(
self._line_stats.missed_lines.index("".join(bufLine)))
self._line_stats.missed_lines_timeextracted.pop(
self._line_stats.missed_lines_timeextracted.index(
"".join(bufLine[::2])))
except ValueError:
pass
else:
self._line_stats.matched += 1
self._line_stats.missed -= 1
return line, ret
def process(self, test_lines):
t0 = time.time()
for line_no, line in enumerate(test_lines):
if isinstance(line, tuple):
line_datetimestripped, ret = fail2banRegex.testRegex(
line[0], line[1])
line = "".join(line[0])
else:
line = line.rstrip('\r\n')
if line.startswith('#') or not line:
# skip comment and empty lines
continue
line_datetimestripped, ret = fail2banRegex.testRegex(line)
is_ignored = fail2banRegex.testIgnoreRegex(line_datetimestripped)
if is_ignored:
self._line_stats.ignored += 1
if not self._print_no_ignored and (self._print_all_ignored or self._line_stats.ignored <= self._maxlines + 1):
self._line_stats.ignored_lines.append(line)
self._line_stats.ignored_lines_timeextracted.append(line_datetimestripped)
if len(ret) > 0:
assert(not is_ignored)
self._line_stats.matched += 1
if self._print_all_matched:
self._line_stats.matched_lines.append(line)
else:
if not is_ignored:
self._line_stats.missed += 1
if not self._print_no_missed and (self._print_all_missed or self._line_stats.missed <= self._maxlines + 1):
self._line_stats.missed_lines.append(line)
self._line_stats.missed_lines_timeextracted.append(line_datetimestripped)
self._line_stats.tested += 1
if line_no % 10 == 0 and self._filter.dateDetector is not None:
self._filter.dateDetector.sortTemplate()
self._time_elapsed = time.time() - t0
def printLines(self, ltype):
lstats = self._line_stats
assert(self._line_stats.missed == lstats.tested - (lstats.matched + lstats.ignored))
lines = lstats[ltype]
l = lstats[ltype + '_lines']
if lines:
header = "%s line(s):" % (ltype.capitalize(),)
if self._debuggex:
if ltype == 'missed' or ltype == 'matched':
regexlist = self._failregex
else:
regexlist = self._ignoreregex
l = lstats[ltype + '_lines_timeextracted']
if lines < self._maxlines or getattr(self, '_print_all_' + ltype):
ans = [[]]
for arg in [l, regexlist]:
ans = [ x + [y] for x in ans for y in arg ]
b = [a[0] + ' | ' + a[1].getFailRegex() + ' | ' + debuggexURL(a[0], a[1].getFailRegex()) for a in ans]
pprint_list([x.rstrip() for x in b], header)
else:
print("%s too many to print. Use --print-all-%s " \
"to print all %d lines" % (header, ltype, lines))
elif lines < self._maxlines or getattr(self, '_print_all_' + ltype):
pprint_list([x.rstrip() for x in l], header)
else:
print("%s too many to print. Use --print-all-%s " \
"to print all %d lines" % (header, ltype, lines))
def printStats(self):
print()
print("Results")
print("=======")
def print_failregexes(title, failregexes):
# Print title
total, out = 0, []
for cnt, failregex in enumerate(failregexes):
match = failregex.getStats()
total += match
if (match or self._verbose):
out.append("%2d) [%d] %s" % (cnt+1, match, failregex.getFailRegex()))
if self._verbose and len(failregex.getIPList()):
for ip in failregex.getIPList():
timeTuple = time.localtime(ip[2])
timeString = time.strftime("%a %b %d %H:%M:%S %Y", timeTuple)
out.append(
" %s %s%s" % (
ip[1],
timeString,
ip[-1] and " (multiple regex matched)" or ""))
print("\n%s: %d total" % (title, total))
pprint_list(out, " #) [# of hits] regular expression")
return total
# Print title
total = print_failregexes("Failregex", self._failregex)
_ = print_failregexes("Ignoreregex", self._ignoreregex)
if self._filter.dateDetector is not None:
print("\nDate template hits:")
out = []
for template in self._filter.dateDetector.templates:
if self._verbose or template.hits:
out.append("[%d] %s" % (
template.hits, template.name))
pprint_list(out, "[# of hits] date format")
print("\nLines: %s" % self._line_stats, end=' ')
if self._time_elapsed is not None:
print("[processed in %.2f sec]" % self._time_elapsed, end=' ')
print()
if self._print_all_matched:
self.printLines('matched')
if not self._print_no_ignored:
self.printLines('ignored')
if not self._print_no_missed:
self.printLines('missed')
return True
if __name__ == "__main__":
parser = get_opt_parser()
(opts, args) = parser.parse_args()
if opts.print_no_missed and opts.print_all_missed:
sys.stderr.write("ERROR: --print-no-missed and --print-all-missed are mutually exclusive.\n\n")
parser.print_help()
sys.exit(-1)
if opts.print_no_ignored and opts.print_all_ignored:
sys.stderr.write("ERROR: --print-no-ignored and --print-all-ignored are mutually exclusive.\n\n")
parser.print_help()
sys.exit(-1)
print()
print("Running tests")
print("=============")
print()
fail2banRegex = Fail2banRegex(opts)
# We need 2 or 3 parameters
if not len(args) in (2, 3):
sys.stderr.write("ERROR: provide both <LOG> and <REGEX>.\n\n")
parser.print_help()
sys.exit(-1)
# TODO: taken from -testcases -- move common functionality somewhere
if opts.log_level is not None: # pragma: no cover
# so we had explicit settings
logSys.setLevel(getattr(logging, opts.log_level.upper()))
else: # pragma: no cover
# suppress the logging but it would leave unittests' progress dots
# ticking, unless like with '-l critical' which would be silent
# unless error occurs
logSys.setLevel(getattr(logging, 'CRITICAL'))
# Add the default logging handler
stdout = logging.StreamHandler(sys.stdout)
fmt = 'D: %(message)s'
if opts.log_traceback:
Formatter = FormatterWithTraceBack
fmt = (opts.full_traceback and ' %(tb)s' or ' %(tbc)s') + fmt
else:
Formatter = logging.Formatter
# Custom log format for the verbose tests runs
if opts.verbose: # pragma: no cover
stdout.setFormatter(Formatter(' %(asctime)-15s %(thread)s' + fmt))
else: # pragma: no cover
# just prefix with the space
stdout.setFormatter(Formatter(fmt))
logSys.addHandler(stdout)
cmd_log, cmd_regex = args[:2]
fail2banRegex.readRegex(cmd_regex, 'fail') or sys.exit(-1)
if len(args) == 3:
fail2banRegex.readRegex(args[2], 'ignore') or sys.exit(-1)
if os.path.isfile(cmd_log):
try:
hdlr = open(cmd_log, 'rb')
print("Use log file : %s" % cmd_log)
print("Use encoding : %s" % fail2banRegex.encoding)
test_lines = file_lines_gen(hdlr)
except IOError as e:
print(e)
sys.exit(-1)
elif cmd_log == "systemd-journal":
if not journal:
print("Error: systemd library not found. Exiting...")
sys.exit(-1)
myjournal = journal.Reader(converters={'__CURSOR': lambda x: x})
journalmatch = fail2banRegex._journalmatch
fail2banRegex.setDatePattern(None)
if journalmatch:
try:
for element in journalmatch:
if element == "+":
myjournal.add_disjunction()
else:
myjournal.add_match(element)
except ValueError:
print("Error: Invalid journalmatch: %s" % shortstr(" ".join(journalmatch)))
sys.exit(-1)
print("Use journal match : %s" % " ".join(journalmatch))
test_lines = journal_lines_gen(myjournal)
else:
print("Use single line : %s" % shortstr(cmd_log))
test_lines = [ cmd_log ]
print()
fail2banRegex.process(test_lines)
fail2banRegex.printStats() or sys.exit(-1)
+29 -31
View File
@@ -22,9 +22,7 @@ __author__ = "Cyril Jaquier"
__copyright__ = "Copyright (c) 2004 Cyril Jaquier"
__license__ = "GPL"
import getopt
import os
import sys
import getopt, sys, os
from fail2ban.version import version
from fail2ban.server.server import Server
@@ -53,37 +51,37 @@ class Fail2banServer:
self.__conf["pidfile"] = "/var/run/fail2ban/fail2ban.pid"
def dispVersion(self):
print "Fail2Ban v" + version
print
print "Copyright (c) 2004-2008 Cyril Jaquier, 2008- Fail2Ban Contributors"
print "Copyright of modifications held by their respective authors."
print "Licensed under the GNU General Public License v2 (GPL)."
print
print "Written by Cyril Jaquier <cyril.jaquier@fail2ban.org>."
print "Many contributions by Yaroslav O. Halchenko <debian@onerussian.com>."
print("Fail2Ban v" + version)
print()
print("Copyright (c) 2004-2008 Cyril Jaquier, 2008- Fail2Ban Contributors")
print("Copyright of modifications held by their respective authors.")
print("Licensed under the GNU General Public License v2 (GPL).")
print()
print("Written by Cyril Jaquier <cyril.jaquier@fail2ban.org>.")
print("Many contributions by Yaroslav O. Halchenko <debian@onerussian.com>.")
def dispUsage(self):
""" Prints Fail2Ban command line options and exits
"""
print "Usage: "+self.__argv[0]+" [OPTIONS]"
print
print "Fail2Ban v" + version + " reads log file that contains password failure report"
print "and bans the corresponding IP addresses using firewall rules."
print
print "Only use this command for debugging purpose. Start the server with"
print "fail2ban-client instead. The default behaviour is to start the server"
print "in background."
print
print "Options:"
print " -b start in background"
print " -f start in foreground"
print " -s <FILE> socket path"
print " -p <FILE> pidfile path"
print " -x force execution of the server (remove socket file)"
print " -h, --help display this help message"
print " -V, --version print the version"
print
print "Report bugs to https://github.com/fail2ban/fail2ban/issues"
print("Usage: "+self.__argv[0]+" [OPTIONS]")
print()
print("Fail2Ban v" + version + " reads log file that contains password failure report")
print("and bans the corresponding IP addresses using firewall rules.")
print()
print("Only use this command for debugging purpose. Start the server with")
print("fail2ban-client instead. The default behaviour is to start the server")
print("in background.")
print()
print("Options:")
print(" -b start in background")
print(" -f start in foreground")
print(" -s <FILE> socket path")
print(" -p <FILE> pidfile path")
print(" -x force execution of the server (remove socket file)")
print(" -h, --help display this help message")
print(" -V, --version print the version")
print()
print("Report bugs to https://github.com/fail2ban/fail2ban/issues")
def __getCmdLineOptions(self, optList):
""" Gets the command line options
@@ -127,7 +125,7 @@ class Fail2banServer:
self.__conf["pidfile"],
self.__conf["force"])
return True
except Exception, e:
except Exception as e:
logSys.exception(e)
self.__server.quit()
return False
+3 -6
View File
@@ -25,10 +25,7 @@ __copyright__ = "Copyright (c) 2004 Cyril Jaquier, 2012- Yaroslav Halchenko"
__license__ = "GPL"
import logging
import os
import sys
import time
import unittest
import unittest, sys, time, os
# Check if local fail2ban module exists, and use if it exists by
# modifying the path. This is such that tests can be used in dev
@@ -117,8 +114,8 @@ logSys.addHandler(stdout)
# Let know the version
#
if not opts.log_level or opts.log_level != 'critical': # pragma: no cover
print("Fail2ban %s test suite. Python %s. Please wait..." \
% (version, str(sys.version).replace('\n', '')))
print(("Fail2ban %s test suite. Python %s. Please wait..." \
% (version, str(sys.version).replace('\n', ''))))
tests = gatherTests(regexps, opts.no_network)
#
+1 -1
View File
@@ -10,7 +10,7 @@
[Definition]
actionban = curl --fail --user-agent "<agent>" http://www.badips.com/add/<category>/<ip>
actionban = curl --fail --user-agent "fail2ban v0.8.12" http://www.badips.com/add/<category>/<ip>
[Init]
+7 -18
View File
@@ -21,6 +21,7 @@ import sys
if sys.version_info < (2, 7):
raise ImportError("badips.py action requires Python >= 2.7")
import json
from functools import partial
import threading
import logging
if sys.version_info >= (3, ):
@@ -32,7 +33,7 @@ else:
from urllib import urlencode
from fail2ban.server.actions import ActionBase
from fail2ban.version import version as f2bVersion
class BadIPsAction(ActionBase):
"""Fail2Ban action which reports bans to badips.com, and also
@@ -70,9 +71,6 @@ class BadIPsAction(ActionBase):
updateperiod : int, optional
Time in seconds between updating bad IPs blacklist.
Default 900 (15 minutes)
agent : str, optional
User agent transmitted to server.
Default `Fail2Ban/ver.`
Raises
------
@@ -81,14 +79,13 @@ class BadIPsAction(ActionBase):
"""
_badips = "http://www.badips.com"
def _Request(self, url, **argv):
return Request(url, headers={'User-Agent': self.agent}, **argv)
_Request = partial(
Request, headers={'User-Agent': "Fail2Ban %s" % f2bVersion})
def __init__(self, jail, name, category, score=3, age="24h", key=None,
banaction=None, bancategory=None, bankey=None, updateperiod=900, agent="Fail2Ban"):
banaction=None, bancategory=None, bankey=None, updateperiod=900):
super(BadIPsAction, self).__init__(jail, name)
self.agent = agent
self.category = category
self.score = score
self.age = age
@@ -114,12 +111,10 @@ class BadIPsAction(ActionBase):
------
HTTPError
Any issues with badips.com request.
ValueError
If badips.com response didn't contain necessary information
"""
try:
response = urlopen(
self._Request("/".join([self._badips, "get", "categories"])), None, 3)
self._Request("/".join([self._badips, "get", "categories"])))
except HTTPError as response:
messages = json.loads(response.read().decode('utf-8'))
self._logSys.error(
@@ -127,13 +122,7 @@ class BadIPsAction(ActionBase):
messages['err'])
raise
else:
response_json = json.loads(response.read().decode('utf-8'))
if not 'categories' in response_json:
err = "badips.com response lacked categories specification. Response was: %s" \
% (response_json,)
self._logSys.error(err)
raise ValueError(err)
categories = response_json['categories']
categories = json.loads(response.read().decode('utf-8'))['categories']
categories_names = set(
value['Name'] for value in categories)
if incParents:
+1 -1
View File
@@ -54,7 +54,7 @@ actioncheck =
# Tags: See jail.conf(5) man page
# Values: CMD
#
actionban = curl --fail --data-urlencode 'server=<email>' --data 'apikey=<apikey>' --data 'service=<service>' --data 'ip=<ip>' --data-urlencode 'logs=<matches>' --data 'format=text' --user-agent "<agent>" "https://www.blocklist.de/en/httpreports.html"
actionban = curl --fail --data-urlencode 'server=<email>' --data 'apikey=<apikey>' --data 'service=<service>' --data 'ip=<ip>' --data-urlencode 'logs=<matches>' --data 'format=text' --user-agent "fail2ban v0.8.12" "https://www.blocklist.de/en/httpreports.html"
# Option: actionunban
# Notes.: command executed when unbanning an IP. Take care that the
+2 -2
View File
@@ -38,7 +38,7 @@ actioncheck =
# Values: CMD
#
# requires an ipfw rule like "deny ip from table(1) to me"
actionban = e=`ipfw table <table> add <ip> 2>&1`; x=$?; [ $x -eq 0 -o "$e" = 'ipfw: setsockopt(IP_FW_TABLE_XADD): File exists' ] || { echo "$e" 1>&2; exit $x; }
actionban = ipfw table <table> add <ip>
# Option: actionunban
@@ -47,7 +47,7 @@ actionban = e=`ipfw table <table> add <ip> 2>&1`; x=$?; [ $x -eq 0 -o "$e" = 'ip
# Tags: See jail.conf(5) man page
# Values: CMD
#
actionunban = e=`ipfw table <table> delete <ip> 2>&1`; x=$?; [ $x -eq 0 -o "$e" = 'ipfw: setsockopt(IP_FW_TABLE_XDEL): No such process' ] || { echo "$e" 1>&2; exit $x; }
actionunban = ipfw table <table> delete <ip>
[Init]
# Option: table
+9 -22
View File
@@ -1,16 +1,10 @@
#
# Author: Mike Rushton
#
# IMPORTANT
# Referenced from from http://www.normyee.net/blog/2012/02/02/adding-cloudflare-support-to-fail2ban by NORM YEE
#
# Please set jail.local's permission to 640 because it contains your CF API key.
# To get your Cloudflare API key: https://www.cloudflare.com/my-account
#
# This action depends on curl.
# Referenced from http://www.normyee.net/blog/2012/02/02/adding-cloudflare-support-to-fail2ban by NORM YEE
#
# To get your CloudFlare API Key: https://www.cloudflare.com/a/account/my-account
#
# CloudFlare API error codes: https://www.cloudflare.com/docs/host-api.html#s4.2
[Definition]
@@ -40,8 +34,7 @@ actioncheck =
# <time> unix timestamp of the ban time
# Values: CMD
#
actionban = curl -s -o /dev/null https://www.cloudflare.com/api_json.html -d 'a=ban' -d 'tkn=<cftoken>' -d 'email=<cfuser>' -d 'key=<ip>'
actionban = curl https://www.cloudflare.com/api_json.html -d 'a=ban' -d 'tkn=<cftoken>' -d 'email=<cfuser>' -d 'key=<ip>'
# Option: actionunban
# Notes.: command executed when unbanning an IP. Take care that the
# command is executed with Fail2Ban user rights.
@@ -50,19 +43,13 @@ actionban = curl -s -o /dev/null https://www.cloudflare.com/api_json.html -d 'a=
# <time> unix timestamp of the ban time
# Values: CMD
#
actionunban = curl -s -o /dev/null https://www.cloudflare.com/api_json.html -d 'a=nul' -d 'tkn=<cftoken>' -d 'email=<cfuser>' -d 'key=<ip>'
actionunban = curl https://www.cloudflare.com/api_json.html -d 'a=nul' -d 'tkn=<cftoken>' -d 'email=<cfuser>' -d 'key=<ip>'
[Init]
# If you like to use this action with mailing whois lines, you could use the composite action
# action_cf_mwl predefined in jail.conf, just define in your jail:
#
# action = %(action_cf_mwl)s
# # Your CF account e-mail
# cfemail =
# # Your CF API Key
# cfapikey =
# Default Cloudflare API token
cftoken =
cftoken =
cfuser =
# Default Cloudflare username
cfuser =
-53
View File
@@ -1,53 +0,0 @@
# Fail2Ban configuration file
#
# Author: Donald Yandt
# Because of the --remove-rules in stop this action requires firewalld-0.3.8+
[INCLUDES]
before = iptables-blocktype.conf
[Definition]
actionstart = firewall-cmd --direct --add-chain ipv4 filter f2b-<name>
firewall-cmd --direct --add-rule ipv4 filter f2b-<name> 1000 -j RETURN
firewall-cmd --direct --add-rule ipv4 filter <chain> 0 -j f2b-<name>
actionstop = firewall-cmd --direct --remove-rule ipv4 filter <chain> 0 -j f2b-<name>
firewall-cmd --direct --remove-rules ipv4 filter f2b-<name>
firewall-cmd --direct --remove-chain ipv4 filter f2b-<name>
# Example actioncheck: firewall-cmd --direct --get-chains ipv4 filter | sed -e 's, ,\n,g' | grep -q '^f2b-recidive$'
actioncheck = firewall-cmd --direct --get-chains ipv4 filter | sed -e 's, ,\n,g' | grep -q '^f2b-<name>$'
actionban = firewall-cmd --direct --add-rule ipv4 filter f2b-<name> 0 -s <ip> -j <blocktype>
actionunban = firewall-cmd --direct --remove-rule ipv4 filter f2b-<name> 0 -s <ip> -j <blocktype>
[Init]
# Default name of the chain
#
name = default
chain = INPUT_direct
# DEV NOTES:
#
# Author: Donald Yandt
# Uses "FirewallD" instead of the "iptables daemon".
#
#
# Output:
# actionstart:
# $ firewall-cmd --direct --add-chain ipv4 filter f2b-recidive
# success
# $ firewall-cmd --direct --add-rule ipv4 filter f2b-recidive 1000 -j RETURN
# success
# $ sudo firewall-cmd --direct --add-rule ipv4 filter INPUT_direct 0 -j f2b-recidive
# success
@@ -1,63 +0,0 @@
# Fail2Ban configuration file
#
# Author: Donald Yandt
# Because of the --remove-rules in stop this action requires firewalld-0.3.8+
[INCLUDES]
before = iptables-blocktype.conf
[Definition]
actionstart = firewall-cmd --direct --add-chain ipv4 filter f2b-<name>
firewall-cmd --direct --add-rule ipv4 filter f2b-<name> 1000 -j RETURN
firewall-cmd --direct --add-rule ipv4 filter <chain> 0 -m state --state NEW -p <protocol> -m multiport --dports <port> -j f2b-<name>
actionstop = firewall-cmd --direct --remove-rule ipv4 filter <chain> 0 -m state --state NEW -p <protocol> -m multiport --dports <port> -j f2b-<name>
firewall-cmd --direct --remove-rules ipv4 filter f2b-<name>
firewall-cmd --direct --remove-chain ipv4 filter f2b-<name>
# Example actioncheck: firewall-cmd --direct --get-chains ipv4 filter | sed -e 's, ,\n,g' | grep -q '^f2b-apache-modsecurity$'
actioncheck = firewall-cmd --direct --get-chains ipv4 filter | sed -e 's, ,\n,g' | grep -q '^f2b-<name>$'
actionban = firewall-cmd --direct --add-rule ipv4 filter f2b-<name> 0 -s <ip> -j <blocktype>
actionunban = firewall-cmd --direct --remove-rule ipv4 filter f2b-<name> 0 -s <ip> -j <blocktype>
[Init]
# Default name of the chain
name = default
chain = INPUT_direct
# Could also use port numbers separated by a comma.
port = 1:65535
# Option: protocol
# Values: [ tcp | udp | icmp | all ]
protocol = tcp
# DEV NOTES:
#
# Author: Donald Yandt
# Uses "FirewallD" instead of the "iptables daemon".
#
#
# Output:
# actionstart:
# $ firewall-cmd --direct --add-chain ipv4 filter f2b-apache-modsecurity
# success
# $ firewall-cmd --direct --add-rule ipv4 filter f2b-apache-modsecurity 1000 -j RETURN
# success
# $ sudo firewall-cmd --direct --add-rule ipv4 filter INPUT_direct 0 -m state --state NEW -p tcp -m multiport --dports 80,443 -j f2b-apache-modsecurity
# success
# actioncheck:
# $ firewall-cmd --direct --get-chains ipv4 filter f2b-apache-modsecurity | sed -e 's, ,\n,g' | grep -q '^f2b-apache-modsecurity$'
# f2b-apache-modsecurity
+3 -3
View File
@@ -10,9 +10,9 @@ before = iptables-common.conf
actionstart = firewall-cmd --direct --add-chain ipv4 filter f2b-<name>
firewall-cmd --direct --add-rule ipv4 filter f2b-<name> 1000 -j RETURN
firewall-cmd --direct --add-rule ipv4 filter <chain> 0 -m state --state NEW -p <protocol> -m multiport --dports <port> -j f2b-<name>
firewall-cmd --direct --add-rule ipv4 filter <chain> 0 -m state --state NEW -p <protocol> --dport <port> -j f2b-<name>
actionstop = firewall-cmd --direct --remove-rule ipv4 filter <chain> 0 -m state --state NEW -p <protocol> -m multiport --dports <port> -j f2b-<name>
actionstop = firewall-cmd --direct --remove-rule ipv4 filter <chain> 0 -m state --state NEW -p <protocol> --dport <port> -j f2b-<name>
firewall-cmd --direct --remove-rules ipv4 filter f2b-<name>
firewall-cmd --direct --remove-chain ipv4 filter f2b-<name>
@@ -43,7 +43,7 @@ chain = INPUT_direct
# success
# $ firewall-cmd --direct --add-rule ipv4 filter fail2ban-name 1000 -j RETURN
# success
# $ sudo firewall-cmd --direct --add-rule ipv4 filter INPUT_direct 0 -m state --state NEW -p tcp -m multiport --dports 22 -j fail2ban-name
# $ sudo firewall-cmd --direct --add-rule ipv4 filter INPUT_direct 0 -m state --state NEW -p tcp --dport 22 -j fail2ban-name
# success
# $ firewall-cmd --direct --get-chains ipv4 filter
# fail2ban-name
+9 -9
View File
@@ -17,23 +17,23 @@ before = iptables-common.conf
# Notes.: command executed once at the start of Fail2Ban.
# Values: CMD
#
actionstart = <iptables> -N f2b-<name>
<iptables> -A f2b-<name> -j <returntype>
<iptables> -I <chain> -p <protocol> -j f2b-<name>
actionstart = iptables -N f2b-<name>
iptables -A f2b-<name> -j RETURN
iptables -I <chain> -p <protocol> -j f2b-<name>
# Option: actionstop
# Notes.: command executed once at the end of Fail2Ban
# Values: CMD
#
actionstop = <iptables> -D <chain> -p <protocol> -j f2b-<name>
<iptables> -F f2b-<name>
<iptables> -X f2b-<name>
actionstop = iptables -D <chain> -p <protocol> -j f2b-<name>
iptables -F f2b-<name>
iptables -X f2b-<name>
# Option: actioncheck
# Notes.: command executed once before each actionban command
# Values: CMD
#
actioncheck = <iptables> -n -L <chain> | grep -q 'f2b-<name>[ \t]'
actioncheck = iptables -n -L <chain> | grep -q 'f2b-<name>[ \t]'
# Option: actionban
# Notes.: command executed when banning an IP. Take care that the
@@ -41,7 +41,7 @@ actioncheck = <iptables> -n -L <chain> | grep -q 'f2b-<name>[ \t]'
# Tags: See jail.conf(5) man page
# Values: CMD
#
actionban = <iptables> -I f2b-<name> 1 -s <ip> -j <blocktype>
actionban = iptables -I f2b-<name> 1 -s <ip> -j <blocktype>
# Option: actionunban
# Notes.: command executed when unbanning an IP. Take care that the
@@ -49,7 +49,7 @@ actionban = <iptables> -I f2b-<name> 1 -s <ip> -j <blocktype>
# Tags: See jail.conf(5) man page
# Values: CMD
#
actionunban = <iptables> -D f2b-<name> -s <ip> -j <blocktype>
actionunban = iptables -D f2b-<name> -s <ip> -j <blocktype>
[Init]
-19
View File
@@ -43,22 +43,3 @@ protocol = tcp
# REJECT, REJECT --reject-with icmp-port-unreachable
# Values: STRING
blocktype = REJECT --reject-with icmp-port-unreachable
# Option: returntype
# Note: This is the default rule on "actionstart". This should be RETURN
# in all (blocking) actions, except REJECT in allowing actions.
# Values: STRING
returntype = RETURN
# Option: lockingopt
# Notes.: Option was introduced to iptables to prevent multiple instances from
# running concurrently and causing irratic behavior. -w was introduced
# in iptables 1.4.20, so might be absent on older systems
# See https://github.com/fail2ban/fail2ban/issues/1122
# Values: STRING
lockingopt = -w
# Option: iptables
# Notes.: Actual command to be executed, including common to all calls options
# Values: STRING
iptables = iptables <lockingopt>
+2 -2
View File
@@ -28,13 +28,13 @@ before = iptables-common.conf
# Values: CMD
#
actionstart = ipset --create f2b-<name> iphash
<iptables> -I <chain> -p <protocol> -m multiport --dports <port> -m set --match-set f2b-<name> src -j <blocktype>
iptables -I <chain> -p <protocol> -m multiport --dports <port> -m set --match-set f2b-<name> src -j <blocktype>
# Option: actionstop
# Notes.: command executed once at the end of Fail2Ban
# Values: CMD
#
actionstop = <iptables> -D <chain> -p <protocol> -m multiport --dports <port> -m set --match-set f2b-<name> src -j <blocktype>
actionstop = iptables -D <chain> -p <protocol> -m multiport --dports <port> -m set --match-set f2b-<name> src -j <blocktype>
ipset --flush f2b-<name>
ipset --destroy f2b-<name>
@@ -24,13 +24,13 @@ before = iptables-common.conf
# Values: CMD
#
actionstart = ipset create f2b-<name> hash:ip timeout <bantime>
<iptables> -I <chain> -m set --match-set f2b-<name> src -j <blocktype>
iptables -I <chain> -m set --match-set f2b-<name> src -j <blocktype>
# Option: actionstop
# Notes.: command executed once at the end of Fail2Ban
# Values: CMD
#
actionstop = <iptables> -D <chain> -m set --match-set f2b-<name> src -j <blocktype>
actionstop = iptables -D <chain> -m set --match-set f2b-<name> src -j <blocktype>
ipset flush f2b-<name>
ipset destroy f2b-<name>
+2 -2
View File
@@ -24,13 +24,13 @@ before = iptables-common.conf
# Values: CMD
#
actionstart = ipset create f2b-<name> hash:ip timeout <bantime>
<iptables> -I <chain> -p <protocol> -m multiport --dports <port> -m set --match-set f2b-<name> src -j <blocktype>
iptables -I <chain> -p <protocol> -m multiport --dports <port> -m set --match-set f2b-<name> src -j <blocktype>
# Option: actionstop
# Notes.: command executed once at the end of Fail2Ban
# Values: CMD
#
actionstop = <iptables> -D <chain> -p <protocol> -m multiport --dports <port> -m set --match-set f2b-<name> src -j <blocktype>
actionstop = iptables -D <chain> -p <protocol> -m multiport --dports <port> -m set --match-set f2b-<name> src -j <blocktype>
ipset flush f2b-<name>
ipset destroy f2b-<name>
+14 -14
View File
@@ -19,28 +19,28 @@ before = iptables-common.conf
# Notes.: command executed once at the start of Fail2Ban.
# Values: CMD
#
actionstart = <iptables> -N f2b-<name>
<iptables> -A f2b-<name> -j <returntype>
<iptables> -I <chain> 1 -p <protocol> -m multiport --dports <port> -j f2b-<name>
<iptables> -N f2b-<name>-log
<iptables> -I f2b-<name>-log -j LOG --log-prefix "$(expr f2b-<name> : '\(.\{1,23\}\)'):DROP " --log-level warning -m limit --limit 6/m --limit-burst 2
<iptables> -A f2b-<name>-log -j <blocktype>
actionstart = iptables -N f2b-<name>
iptables -A f2b-<name> -j RETURN
iptables -I <chain> 1 -p <protocol> -m multiport --dports <port> -j f2b-<name>
iptables -N f2b-<name>-log
iptables -I f2b-<name>-log -j LOG --log-prefix "$(expr f2b-<name> : '\(.\{1,23\}\)'):DROP " --log-level warning -m limit --limit 6/m --limit-burst 2
iptables -A f2b-<name>-log -j <blocktype>
# Option: actionstop
# Notes.: command executed once at the end of Fail2Ban
# Values: CMD
#
actionstop = <iptables> -D <chain> -p <protocol> -m multiport --dports <port> -j f2b-<name>
<iptables> -F f2b-<name>
<iptables> -F f2b-<name>-log
<iptables> -X f2b-<name>
<iptables> -X f2b-<name>-log
actionstop = iptables -D <chain> -p <protocol> -m multiport --dports <port> -j f2b-<name>
iptables -F f2b-<name>
iptables -F f2b-<name>-log
iptables -X f2b-<name>
iptables -X f2b-<name>-log
# Option: actioncheck
# Notes.: command executed once before each actionban command
# Values: CMD
#
actioncheck = <iptables> -n -L f2b-<name>-log >/dev/null
actioncheck = iptables -n -L f2b-<name>-log >/dev/null
# Option: actionban
# Notes.: command executed when banning an IP. Take care that the
@@ -48,7 +48,7 @@ actioncheck = <iptables> -n -L f2b-<name>-log >/dev/null
# Tags: See jail.conf(5) man page
# Values: CMD
#
actionban = <iptables> -I f2b-<name> 1 -s <ip> -j f2b-<name>-log
actionban = iptables -I f2b-<name> 1 -s <ip> -j f2b-<name>-log
# Option: actionunban
# Notes.: command executed when unbanning an IP. Take care that the
@@ -56,7 +56,7 @@ actionban = <iptables> -I f2b-<name> 1 -s <ip> -j f2b-<name>-log
# Tags: See jail.conf(5) man page
# Values: CMD
#
actionunban = <iptables> -D f2b-<name> -s <ip> -j f2b-<name>-log
actionunban = iptables -D f2b-<name> -s <ip> -j f2b-<name>-log
[Init]
+9 -9
View File
@@ -14,23 +14,23 @@ before = iptables-common.conf
# Notes.: command executed once at the start of Fail2Ban.
# Values: CMD
#
actionstart = <iptables> -N f2b-<name>
<iptables> -A f2b-<name> -j <returntype>
<iptables> -I <chain> -p <protocol> -m multiport --dports <port> -j f2b-<name>
actionstart = iptables -N f2b-<name>
iptables -A f2b-<name> -j RETURN
iptables -I <chain> -p <protocol> -m multiport --dports <port> -j f2b-<name>
# Option: actionstop
# Notes.: command executed once at the end of Fail2Ban
# Values: CMD
#
actionstop = <iptables> -D <chain> -p <protocol> -m multiport --dports <port> -j f2b-<name>
<iptables> -F f2b-<name>
<iptables> -X f2b-<name>
actionstop = iptables -D <chain> -p <protocol> -m multiport --dports <port> -j f2b-<name>
iptables -F f2b-<name>
iptables -X f2b-<name>
# Option: actioncheck
# Notes.: command executed once before each actionban command
# Values: CMD
#
actioncheck = <iptables> -n -L <chain> | grep -q 'f2b-<name>[ \t]'
actioncheck = iptables -n -L <chain> | grep -q 'f2b-<name>[ \t]'
# Option: actionban
# Notes.: command executed when banning an IP. Take care that the
@@ -38,7 +38,7 @@ actioncheck = <iptables> -n -L <chain> | grep -q 'f2b-<name>[ \t]'
# Tags: See jail.conf(5) man page
# Values: CMD
#
actionban = <iptables> -I f2b-<name> 1 -s <ip> -j <blocktype>
actionban = iptables -I f2b-<name> 1 -s <ip> -j <blocktype>
# Option: actionunban
# Notes.: command executed when unbanning an IP. Take care that the
@@ -46,7 +46,7 @@ actionban = <iptables> -I f2b-<name> 1 -s <ip> -j <blocktype>
# Tags: See jail.conf(5) man page
# Values: CMD
#
actionunban = <iptables> -D f2b-<name> -s <ip> -j <blocktype>
actionunban = iptables -D f2b-<name> -s <ip> -j <blocktype>
[Init]
+9 -9
View File
@@ -16,23 +16,23 @@ before = iptables-common.conf
# Notes.: command executed once at the start of Fail2Ban.
# Values: CMD
#
actionstart = <iptables> -N f2b-<name>
<iptables> -A f2b-<name> -j <returntype>
<iptables> -I <chain> -m state --state NEW -p <protocol> --dport <port> -j f2b-<name>
actionstart = iptables -N f2b-<name>
iptables -A f2b-<name> -j RETURN
iptables -I <chain> -m state --state NEW -p <protocol> --dport <port> -j f2b-<name>
# Option: actionstop
# Notes.: command executed once at the end of Fail2Ban
# Values: CMD
#
actionstop = <iptables> -D <chain> -m state --state NEW -p <protocol> --dport <port> -j f2b-<name>
<iptables> -F f2b-<name>
<iptables> -X f2b-<name>
actionstop = iptables -D <chain> -m state --state NEW -p <protocol> --dport <port> -j f2b-<name>
iptables -F f2b-<name>
iptables -X f2b-<name>
# Option: actioncheck
# Notes.: command executed once before each actionban command
# Values: CMD
#
actioncheck = <iptables> -n -L <chain> | grep -q 'f2b-<name>[ \t]'
actioncheck = iptables -n -L <chain> | grep -q 'f2b-<name>[ \t]'
# Option: actionban
# Notes.: command executed when banning an IP. Take care that the
@@ -40,7 +40,7 @@ actioncheck = <iptables> -n -L <chain> | grep -q 'f2b-<name>[ \t]'
# Tags: See jail.conf(5) man page
# Values: CMD
#
actionban = <iptables> -I f2b-<name> 1 -s <ip> -j <blocktype>
actionban = iptables -I f2b-<name> 1 -s <ip> -j <blocktype>
# Option: actionunban
# Notes.: command executed when unbanning an IP. Take care that the
@@ -48,7 +48,7 @@ actionban = <iptables> -I f2b-<name> 1 -s <ip> -j <blocktype>
# Tags: See jail.conf(5) man page
# Values: CMD
#
actionunban = <iptables> -D f2b-<name> -s <ip> -j <blocktype>
actionunban = iptables -D f2b-<name> -s <ip> -j <blocktype>
[Init]
+2 -2
View File
@@ -32,14 +32,14 @@ before = iptables-common.conf
# own rules. The 3600 second timeout is independent and acts as a
# safeguard in case the fail2ban process dies unexpectedly. The
# shorter of the two timeouts actually matters.
actionstart = if [ `id -u` -eq 0 ];then <iptables> -I <chain> -m recent --update --seconds 3600 --name f2b-<name> -j <blocktype>;fi
actionstart = if [ `id -u` -eq 0 ];then iptables -I <chain> -m recent --update --seconds 3600 --name f2b-<name> -j <blocktype>;fi
# Option: actionstop
# Notes.: command executed once at the end of Fail2Ban
# Values: CMD
#
actionstop = echo / > /proc/net/xt_recent/f2b-<name>
if [ `id -u` -eq 0 ];then <iptables> -D <chain> -m recent --update --seconds 3600 --name f2b-<name> -j <blocktype>;fi
if [ `id -u` -eq 0 ];then iptables -D <chain> -m recent --update --seconds 3600 --name f2b-<name> -j <blocktype>;fi
# Option: actioncheck
# Notes.: command executed once before each actionban command
+9 -9
View File
@@ -14,23 +14,23 @@ before = iptables-common.conf
# Notes.: command executed once at the start of Fail2Ban.
# Values: CMD
#
actionstart = <iptables> -N f2b-<name>
<iptables> -A f2b-<name> -j <returntype>
<iptables> -I <chain> -p <protocol> --dport <port> -j f2b-<name>
actionstart = iptables -N f2b-<name>
iptables -A f2b-<name> -j RETURN
iptables -I <chain> -p <protocol> --dport <port> -j f2b-<name>
# Option: actionstop
# Notes.: command executed once at the end of Fail2Ban
# Values: CMD
#
actionstop = <iptables> -D <chain> -p <protocol> --dport <port> -j f2b-<name>
<iptables> -F f2b-<name>
<iptables> -X f2b-<name>
actionstop = iptables -D <chain> -p <protocol> --dport <port> -j f2b-<name>
iptables -F f2b-<name>
iptables -X f2b-<name>
# Option: actioncheck
# Notes.: command executed once before each actionban command
# Values: CMD
#
actioncheck = <iptables> -n -L <chain> | grep -q 'f2b-<name>[ \t]'
actioncheck = iptables -n -L <chain> | grep -q 'f2b-<name>[ \t]'
# Option: actionban
# Notes.: command executed when banning an IP. Take care that the
@@ -38,7 +38,7 @@ actioncheck = <iptables> -n -L <chain> | grep -q 'f2b-<name>[ \t]'
# Tags: See jail.conf(5) man page
# Values: CMD
#
actionban = <iptables> -I f2b-<name> 1 -s <ip> -j <blocktype>
actionban = iptables -I f2b-<name> 1 -s <ip> -j <blocktype>
# Option: actionunban
# Notes.: command executed when unbanning an IP. Take care that the
@@ -46,7 +46,7 @@ actionban = <iptables> -I f2b-<name> 1 -s <ip> -j <blocktype>
# Tags: See jail.conf(5) man page
# Values: CMD
#
actionunban = <iptables> -D f2b-<name> -s <ip> -j <blocktype>
actionunban = iptables -D f2b-<name> -s <ip> -j <blocktype>
[Init]
-28
View File
@@ -1,28 +0,0 @@
# Fail2Ban configuration file
#
# Common settings for mail actions
#
# Users can override the defaults in mail-whois-common.local
[INCLUDES]
# Load customizations if any available
after = mail-whois-common.local
[DEFAULT]
#original character set of whois output will be sent to mail program
_whois = whois <ip> || echo "missing whois program"
# use heuristics to convert charset of whois output to a target
# character set before sending it to a mail program
# make sure you have 'file' and 'iconv' commands installed when opting for that
_whois_target_charset = UTF-8
_whois_convert_charset = whois <ip> |
{ WHOIS_OUTPUT=$(cat) ; WHOIS_CHARSET=$(printf %%b "$WHOIS_OUTPUT" | file -b --mime-encoding -) ; printf %%b "$WHOIS_OUTPUT" | iconv -f $WHOIS_CHARSET -t %(_whois_target_charset)s//TRANSLIT - ; }
# choose between _whois and _whois_convert_charset in mail-whois-common.local
# or other *.local which include mail-whois-common.conf.
_whois_command = %(_whois)s
#_whois_command = %(_whois_convert_charset)s
[Init]
+3 -11
View File
@@ -4,10 +4,6 @@
# Modified-By: Yaroslav Halchenko to include grepping on IP over log files
#
[INCLUDES]
before = mail-whois-common.conf
[Definition]
# Option: actionstart
@@ -43,10 +39,10 @@ actioncheck =
actionban = printf %%b "Hi,\n
The IP <ip> has just been banned by Fail2Ban after
<failures> attempts against <name>.\n\n
Here is more information about <ip> :\n
`%(_whois_command)s`\n\n
Here is more information about <ip>:\n
`whois <ip> || echo missing whois program`\n\n
Lines containing IP:<ip> in <logpath>\n
`grep -E <grepopts> '(^|[^0-9])<ip>([^0-9]|$)' <logpath>`\n\n
`grep '[^0-9]<ip>[^0-9]' <logpath>`\n\n
Regards,\n
Fail2Ban"|mail -s "[Fail2Ban] <name>: banned <ip> from `uname -n`" <dest>
@@ -71,7 +67,3 @@ dest = root
# Path to the log files which contain relevant lines for the abuser IP
#
logpath = /dev/null
# Number of log lines to include in the email
#
grepopts = -m 1000
+2 -6
View File
@@ -4,10 +4,6 @@
#
#
[INCLUDES]
before = mail-whois-common.conf
[Definition]
# Option: actionstart
@@ -43,8 +39,8 @@ actioncheck =
actionban = printf %%b "Hi,\n
The IP <ip> has just been banned by Fail2Ban after
<failures> attempts against <name>.\n\n
Here is more information about <ip> :\n
`%(_whois_command)s`\n
Here is more information about <ip>:\n
`whois <ip> || echo missing whois program`\n
Regards,\n
Fail2Ban"|mail -s "[Fail2Ban] <name>: banned <ip> from `uname -n`" <dest>
+2 -6
View File
@@ -111,17 +111,13 @@ myip = `ip -4 addr show dev eth0 | grep inet | head -n 1 | sed -r 's/.*inet ([0-
#
protocol = tcp
# Option: agent
# Default: Fail2ban
agent = Fail2ban
# Option: getcmd
# Notes.: A command to fetch a URL. Should output page to STDOUT
# Values: CMD Default: wget
#
getcmd = wget --no-verbose --tries=3 --waitretry=10 --connect-timeout=10 --read-timeout=60 --retry-connrefused --output-document=- --user-agent=<agent>
getcmd = wget --no-verbose --tries=3 --waitretry=10 --connect-timeout=10 --read-timeout=60 --retry-connrefused --output-document=- --user-agent=Fail2Ban
# Alternative value:
# getcmd = curl --silent --show-error --retry 3 --connect-timeout 10 --max-time 60 --user-agent <agent>
# getcmd = curl --silent --show-error --retry 3 --connect-timeout 10 --max-time 60 --user-agent Fail2Ban
# Option: srcport
# Notes.: The source port of the attack. You're unlikely to have this info, so
-22
View File
@@ -1,22 +0,0 @@
# Fail2Ban configuration file
#
# Author: Cyril Jaquier
# Modified: Yaroslav O. Halchenko <debian@onerussian.com>
# made active on all ports from original iptables.conf
# Modified: Alexander Belykh <albel727@ngs.ru>
# adapted for nftables
#
[INCLUDES]
before = nftables-common.conf
[Definition]
# Option: nftables_mode
# Notes.: additional expressions for nftables filter rule
# Values: nftables expressions
#
nftables_mode = ip protocol <protocol>
[Init]
-119
View File
@@ -1,119 +0,0 @@
# Fail2Ban configuration file
#
# Author: Daniel Black
# Author: Cyril Jaquier
# Modified: Yaroslav O. Halchenko <debian@onerussian.com>
# made active on all ports from original iptables.conf
# Modified: Alexander Belykh <albel727@ngs.ru>
# adapted for nftables
#
# This is a included configuration file and includes the definitions for the nftables
# used in all nftables based actions by default.
#
# The user can override the defaults in nftables-common.local
[INCLUDES]
after = nftables-common.local
[Definition]
# Option: nftables_mode
# Notes.: additional expressions for nftables filter rule
# Values: nftables expressions
#
nftables_mode = <protocol> dport \{ <port> \}
# Option: actionstart
# Notes.: command executed once at the start of Fail2Ban.
# Values: CMD
#
actionstart = <nftables> add set <nftables_family> <nftables_table> f2b-<name> \{ type <nftables_type>\; \}
<nftables> insert rule <nftables_family> <nftables_table> <chain> %(nftables_mode)s ip saddr @f2b-<name> <blocktype>
_nft_list = <nftables> --handle --numeric list chain <nftables_family> <nftables_table> <chain>
_nft_get_handle_id = grep -m1 'ip saddr @f2b-<name> <blocktype> # handle' | grep -oe ' handle [0-9]*'
# Option: actionstop
# Notes.: command executed once at the end of Fail2Ban
# Values: CMD
#
actionstop = HANDLE_ID=$(%(_nft_list)s | %(_nft_get_handle_id)s)
<nftables> delete rule <nftables_family> <nftables_table> <chain> $HANDLE_ID
<nftables> delete set <nftables_family> <nftables_table> f2b-<name>
# Option: actioncheck
# Notes.: command executed once before each actionban command
# Values: CMD
#
actioncheck = <nftables> list chain <nftables_family> <nftables_table> <chain> | grep -q '@f2b-<name>[ \t]'
# Option: actionban
# Notes.: command executed when banning an IP. Take care that the
# command is executed with Fail2Ban user rights.
# Tags: See jail.conf(5) man page
# Values: CMD
#
actionban = <nftables> add element <nftables_family> <nftables_table> f2b-<name> \{ <ip> \}
# Option: actionunban
# Notes.: command executed when unbanning an IP. Take care that the
# command is executed with Fail2Ban user rights.
# Tags: See jail.conf(5) man page
# Values: CMD
#
actionunban = <nftables> delete element <nftables_family> <nftables_table> f2b-<name> \{ <ip> \}
[Init]
# Option: nftables_type
# Notes.: address type to work with
# Values: [ipv4_addr | ipv6_addr] Default: ipv4_addr
#
nftables_type = ipv4_addr
# Option: nftables_family
# Notes.: address family to work in
# Values: [ip | ip6 | inet] Default: inet
#
nftables_family = inet
# Option: nftables_table
# Notes.: table in the address family to work in
# Values: STRING Default: filter
#
nftables_table = filter
# Option: chain
# Notes specifies the nftables chain to which the Fail2Ban rules should be
# added
# Values: STRING Default: input
chain = input
# Default name of the filtering set
#
name = default
# Option: port
# Notes.: specifies port to monitor
# Values: [ NUM | STRING ] Default:
#
port = ssh
# Option: protocol
# Notes.: internally used by config reader for interpolations.
# Values: [ tcp | udp ] Default: tcp
#
protocol = tcp
# Option: blocktype
# Note: This is what the action does with rules. This can be any jump target
# as per the nftables man page (section 8). Common values are drop
# reject, reject with icmp type host-unreachable
# Values: STRING
blocktype = reject
# Option: nftables
# Notes.: Actual command to be executed, including common to all calls options
# Values: STRING
nftables = nft
-22
View File
@@ -1,22 +0,0 @@
# Fail2Ban configuration file
#
# Author: Cyril Jaquier
# Modified: Yaroslav O. Halchenko <debian@onerussian.com>
# made active on all ports from original iptables.conf
# Modified: Alexander Belykh <albel727@ngs.ru>
# adapted for nftables
#
[INCLUDES]
before = nftables-common.conf
[Definition]
# Option: nftables_mode
# Notes.: additional expressions for nftables filter rule
# Values: nftables expressions
#
nftables_mode = <protocol> dport \{ <port> \}
[Init]
-114
View File
@@ -1,114 +0,0 @@
# Fail2Ban configuration file
#
# Author: Andrew St. Jean
#
# Use nsupdate to perform dynamic DNS updates on a BIND zone file.
# One may want to do this to update a local RBL with banned IP addresses.
#
# Options
#
# domain DNS domain that will appear in nsupdate add and delete
# commands.
#
# ttl The time to live (TTL) in seconds of the TXT resource
# record.
#
# rdata Data portion of the TXT resource record.
#
# nsupdatecmd Full path to the nsupdate command.
#
# keyfile Full path to TSIG key file used for authentication between
# nsupdate and BIND.
#
# Create an nsupdate.local to set at least the <domain> and <keyfile>
# options as they don't have default values.
#
# The ban and unban commands assume nsupdate will authenticate to the BIND
# server using a TSIG key. The full path to the key file must be specified
# in the <keyfile> parameter. Use this command to generate your TSIG key.
#
# dnssec-keygen -a HMAC-MD5 -b 256 -n HOST <key_name>
#
# Replace <key_name> with some meaningful name.
#
# This command will generate two files. Specify the .private file in the
# <keyfile> option. Note that the .key file must also be present in the same
# directory for nsupdate to use the key.
#
# Don't forget to add the key and appropriate allow-update or update-policy
# option to your named.conf file.
#
[Definition]
# Option: actionstart
# Notes.: command executed once at the start of Fail2Ban.
# Values: CMD
#
actionstart =
# Option: actionstop
# Notes.: command executed once at the end of Fail2Ban
# Values: CMD
#
actionstop =
# Option: actioncheck
# Notes.: command executed once before each actionban command
# Values: CMD
#
actioncheck =
# Option: actionban
# Notes.: command executed when banning an IP. Take care that the
# command is executed with Fail2Ban user rights.
# Tags: See jail.conf(5) man page
# Values: CMD
#
actionban = echo <ip> | awk -F. '{print "prereq nxrrset "$4"."$3"."$2"."$1".<domain> TXT"; print "update add "$4"."$3"."$2"."$1".<domain> <ttl> IN TXT \"<rdata>\""; print "send"}' | <nsupdatecmd> -k <keyfile>
# Option: actionunban
# Notes.: command executed when unbanning an IP. Take care that the
# command is executed with Fail2Ban user rights.
# Tags: See jail.conf(5) man page
# Values: CMD
#
actionunban = echo <ip> | awk -F. '{print "update delete "$4"."$3"."$2"."$1".<domain>"; print "send"}' | <nsupdatecmd> -k <keyfile>
[Init]
# Option: domain
# Notes.: DNS domain that nsupdate will update.
# Values: STRING
#
domain =
# Option: ttl
# Notes.: time to live (TTL) in seconds of TXT resource record
# added by nsupdate.
# Values: NUM
#
ttl = 60
# Option: rdata
# Notes.: data portion of the TXT resource record added by nsupdate.
# Values: STRING
#
rdata = Your IP has been banned
# Option: nsupdatecmd
# Notes.: specifies the full path to the nsupdate program that dynamically
# updates BIND zone files.
# Values: CMD
#
nsupdatecmd = /usr/bin/nsupdate
# Option: keyfile
# Notes.: specifies the full path to the file containing the
# TSIG key for communicating with BIND.
# Values: STRING
#
keyfile =
-3
View File
@@ -17,9 +17,6 @@
[Definition]
actionban = ip route add <blocktype> <ip>
actionunban = ip route del <blocktype> <ip>
actioncheck =
actionstart =
actionstop =
[Init]
+5 -5
View File
@@ -15,7 +15,7 @@ after = sendmail-common.local
# Values: CMD
#
actionstart = printf %%b "Subject: [Fail2Ban] <name>: started on `uname -n`
Date: `LC_ALL=C date +"%%a, %%d %%h %%Y %%T %%z"`
Date: `LC_TIME=C date -u +"%%a, %%d %%h %%Y %%T +0000"`
From: <sendername> <<sender>>
To: <dest>\n
Hi,\n
@@ -28,7 +28,7 @@ actionstart = printf %%b "Subject: [Fail2Ban] <name>: started on `uname -n`
# Values: CMD
#
actionstop = printf %%b "Subject: [Fail2Ban] <name>: stopped on `uname -n`
Date: `LC_ALL=C date +"%%a, %%d %%h %%Y %%T %%z"`
Date: `LC_TIME=C date -u +"%%a, %%d %%h %%Y %%T +0000"`
From: <sendername> <<sender>>
To: <dest>\n
Hi,\n
@@ -40,7 +40,7 @@ actionstop = printf %%b "Subject: [Fail2Ban] <name>: stopped on `uname -n`
# Notes.: command executed once before each actionban command
# Values: CMD
#
actioncheck =
actioncheck =
# Option: actionban
# Notes.: command executed when banning an IP. Take care that the
@@ -48,7 +48,7 @@ actioncheck =
# Tags: See jail.conf(5) man page
# Values: CMD
#
actionban =
actionban =
# Option: actionunban
# Notes.: command executed when unbanning an IP. Take care that the
@@ -56,7 +56,7 @@ actionban =
# Tags: See jail.conf(5) man page
# Values: CMD
#
actionunban =
actionunban =
[Init]
-53
View File
@@ -1,53 +0,0 @@
# Fail2Ban configuration file
#
# Author: Viktor Szépe
#
#
[INCLUDES]
before = sendmail-common.conf
[Definition]
# Option: actionban
# Notes.: Command executed when banning an IP. Take care that the
# command is executed with Fail2Ban user rights.
# You need to install geoiplookup and the GeoLite or GeoIP databases.
# (geoip-bin and geoip-database in Debian)
# The host command comes from bind9-host package.
# Tags: See jail.conf(5) man page
# Values: CMD
#
actionban = printf %%b "Subject: [Fail2Ban] <name>: banned <ip> from `uname -n`
Date: `LC_ALL=C date +"%%a, %%d %%h %%Y %%T %%z"`
From: <sendername> <<sender>>
To: <dest>\n
Hi,\n
The IP <ip> has just been banned by Fail2Ban after
<failures> attempts against <name>.\n\n
Here is more information about <ip> :\n
http://bgp.he.net/ip/<ip>
http://www.projecthoneypot.org/ip_<ip>
http://whois.domaintools.com/<ip>\n\n
Country:`geoiplookup -f /usr/share/GeoIP/GeoIP.dat "<ip>" | cut -d':' -f2-`
AS:`geoiplookup -f /usr/share/GeoIP/GeoIPASNum.dat "<ip>" | cut -d':' -f2-`
hostname: `host -t A <ip> 2>&1`\n\n
Lines containing IP:<ip> in <logpath>\n
`grep -E <grepopts> '(^|[^0-9])<ip>([^0-9]|$)' <logpath>`\n\n
Regards,\n
Fail2Ban" | /usr/sbin/sendmail -f <sender> <dest>
[Init]
# Default name of the chain
#
name = default
# Path to the log files which contain relevant lines for the abuser IP
#
logpath = /dev/null
# Number of log lines to include in the email
#
grepopts = -m 1000
@@ -17,13 +17,13 @@ before = sendmail-common.conf
# Values: CMD
#
actionban = printf %%b "Subject: [Fail2Ban] <name>: banned <ip> from `uname -n`
Date: `LC_ALL=C date +"%%a, %%d %%h %%Y %%T %%z"`
Date: `LC_TIME=C date -u +"%%a, %%d %%h %%Y %%T +0000"`
From: <sendername> <<sender>>
To: <dest>\n
Hi,\n
The IP <ip> has just been banned by Fail2Ban after
<failures> attempts against <name>.\n\n
Here is more information about <ip> :\n
Here are more information about <ip>:\n
`/usr/bin/whois <ip>`\n\n
Matches for <name> with <ipjailfailures> failures IP:<ip>\n
<ipjailmatches>\n\n
@@ -17,13 +17,13 @@ before = sendmail-common.conf
# Values: CMD
#
actionban = printf %%b "Subject: [Fail2Ban] <name>: banned <ip> from `uname -n`
Date: `LC_ALL=C date +"%%a, %%d %%h %%Y %%T %%z"`
Date: `LC_TIME=C date -u +"%%a, %%d %%h %%Y %%T +0000"`
From: <sendername> <<sender>>
To: <dest>\n
Hi,\n
The IP <ip> has just been banned by Fail2Ban after
<failures> attempts against <name>.\n\n
Here is more information about <ip> :\n
Here are more information about <ip>:\n
`/usr/bin/whois <ip>`\n\n
Matches with <ipfailures> failures IP:<ip>\n
<ipmatches>\n\n
+3 -6
View File
@@ -17,16 +17,16 @@ before = sendmail-common.conf
# Values: CMD
#
actionban = printf %%b "Subject: [Fail2Ban] <name>: banned <ip> from `uname -n`
Date: `LC_ALL=C date +"%%a, %%d %%h %%Y %%T %%z"`
Date: `LC_TIME=C date -u +"%%a, %%d %%h %%Y %%T +0000"`
From: <sendername> <<sender>>
To: <dest>\n
Hi,\n
The IP <ip> has just been banned by Fail2Ban after
<failures> attempts against <name>.\n\n
Here is more information about <ip> :\n
Here is more information about <ip>:\n
`/usr/bin/whois <ip> || echo missing whois program`\n\n
Lines containing IP:<ip> in <logpath>\n
`grep -E <grepopts> '(^|[^0-9])<ip>([^0-9]|$)' <logpath>`\n\n
`grep '[^0-9]<ip>[^0-9]' <logpath>`\n\n
Regards,\n
Fail2Ban" | /usr/sbin/sendmail -f <sender> <dest>
@@ -40,6 +40,3 @@ name = default
#
logpath = /dev/null
# Number of log lines to include in the email
#
grepopts = -m 1000
+2 -2
View File
@@ -17,13 +17,13 @@ before = sendmail-common.conf
# Values: CMD
#
actionban = printf %%b "Subject: [Fail2Ban] <name>: banned <ip> from `uname -n`
Date: `LC_ALL=C date +"%%a, %%d %%h %%Y %%T %%z"`
Date: `LC_TIME=C date -u +"%%a, %%d %%h %%Y %%T +0000"`
From: <sendername> <<sender>>
To: <dest>\n
Hi,\n
The IP <ip> has just been banned by Fail2Ban after
<failures> attempts against <name>.\n\n
Here is more information about <ip> :\n
Here are more information about <ip>:\n
`/usr/bin/whois <ip>`\n\n
Matches:\n
<matches>\n\n
+2 -2
View File
@@ -17,13 +17,13 @@ before = sendmail-common.conf
# Values: CMD
#
actionban = printf %%b "Subject: [Fail2Ban] <name>: banned <ip> from `uname -n`
Date: `LC_ALL=C date +"%%a, %%d %%h %%Y %%T %%z"`
Date: `LC_TIME=C date -u +"%%a, %%d %%h %%Y %%T +0000"`
From: <sendername> <<sender>>
To: <dest>\n
Hi,\n
The IP <ip> has just been banned by Fail2Ban after
<failures> attempts against <name>.\n\n
Here is more information about <ip> :\n
Here is more information about <ip>:\n
`/usr/bin/whois <ip> || echo missing whois program`\n
Regards,\n
Fail2Ban" | /usr/sbin/sendmail -f <sender> <dest>
+1 -1
View File
@@ -17,7 +17,7 @@ before = sendmail-common.conf
# Values: CMD
#
actionban = printf %%b "Subject: [Fail2Ban] <name>: banned <ip> from `uname -n`
Date: `LC_ALL=C date +"%%a, %%d %%h %%Y %%T %%z"`
Date: `LC_TIME=C date -u +"%%a, %%d %%h %%Y %%T +0000"`
From: <sendername> <<sender>>
To: <dest>\n
Hi,\n
@@ -1,85 +0,0 @@
# Fail2Ban configuration file
#
# Author: Eduardo Diaz
#
# This is for ipset protocol 6 (and hopefully later) (ipset v6.14).
# for shorewall
#
# Use this setting in jail.conf to modify use this action instead of a
# default one
#
# banaction = shorewall-ipset-proto6
#
# This requires the program ipset which is normally in package called ipset.
#
# IPset was a feature introduced in the linux kernel 2.6.39 and 3.0.0
# kernels, and you need Shorewall >= 4.5.5 to use this action.
#
# The default Shorewall configuration is with "BLACKLISTNEWONLY=Yes" (see
# file /etc/shorewall/shorewall.conf). This means that when Fail2ban adds a
# new shorewall rule to ban an IP address, that rule will affect only new
# connections. So if the attacker goes on trying using the same connection
# he could even log in. In order to get the same behavior of the iptable
# action (so that the ban is immediate) the /etc/shorewall/shorewall.conf
# file should me modified with "BLACKLISTNEWONLY=No".
#
#
# Enable shorewall to use a blacklist using iptables creating a file
# /etc/shorewall/blrules and adding "DROP net:+f2b-ssh all" and
# similar lines for every jail. To enable restoring you ipset you
# must set SAVE_IPSETS=Yes in shorewall.conf . You can read more
# about ipsets handling in Shorewall at http://shorewall.net/ipsets.html
#
# To force creation of the ipset in the case that somebody deletes the
# ipset create a file /etc/shorewall/initdone and add one line for
# every ipset (this files are in Perl) and add 1 at the end of the file.
# The example:
# system("/usr/sbin/ipset -quiet -exist create f2b-ssh hash:ip timeout 600 ");
# 1;
#
# To destroy the ipset in shorewall you must add to the file /etc/shorewall/stopped
# # One line of every ipset
# system("/usr/sbin/ipset -quiet destroy f2b-ssh ");
# 1; # This must go to the end of the file if not shorewall compilation fails
#
[Definition]
# Option: actionstart
# Notes.: command executed once at the start of Fail2Ban.
# Values: CMD
#
actionstart = if ! ipset -quiet -name list f2b-<name> >/dev/null;
then ipset -quiet -exist create f2b-<name> hash:ip timeout <bantime>;
fi
# Option: actionstop
# Notes.: command executed once at the end of Fail2Ban
# Values: CMD
#
actionstop = ipset flush f2b-<name>
# Option: actionban
# Notes.: command executed when banning an IP. Take care that the
# command is executed with Fail2Ban user rights.
# Tags: See jail.conf(5) man page
# Values: CMD
#
actionban = ipset add f2b-<name> <ip> timeout <bantime> -exist
# Option: actionunban
# Notes.: command executed when unbanning an IP. Take care that the
# command is executed with Fail2Ban user rights.
# Tags: See jail.conf(5) man page
# Values: CMD
#
actionunban = ipset del f2b-<name> <ip> -exist
[Init]
# Option: bantime
# Notes: specifies the bantime in seconds (handled internally rather than by fail2ban)
# Values: [ NUM ] Default: 600
#
bantime = 600
-1
View File
@@ -68,7 +68,6 @@ Matches for %(ip)s for jail %(jailname)s:
%(ipjailmatches)s
"""
class SMTPAction(ActionBase):
"""Fail2Ban action which sends emails to inform on jail starting,
stopping and bans.
@@ -3,9 +3,6 @@
# Author: Yaroslav Halchenko
#
[INCLUDES]
before = iptables-common.conf
[Definition]
@@ -25,21 +22,21 @@ actionstop =
# Notes.: command executed once before each actionban command
# Values: CMD
#
actioncheck = <iptables> -n -L <chain>
actioncheck = iptables -n -L <chain>
# Option: actionban
# Notes.: command executed when banning an IP.
# Values: CMD
#
actionban = echo 'all' >| /etc/symbiosis/firewall/blacklist.d/<ip>.auto
<iptables> -I <chain> 1 -s <ip> -j <blocktype>
iptables -I <chain> 1 -s <ip> -j <blocktype>
# Option: actionunban
# Notes.: command executed when unbanning an IP.
# Values: CMD
#
actionunban = rm -f /etc/symbiosis/firewall/blacklist.d/<ip>.auto
<iptables> -D <chain> -s <ip> -j <blocktype> || :
iptables -D <chain> -s <ip> -j <blocktype> || :
[Init]
+2 -4
View File
@@ -13,11 +13,9 @@ actionstop =
actioncheck =
actionban = [ -n "<application>" ] && app="app <application>"
ufw insert <insertpos> <blocktype> from <ip> to <destination> $app
actionban = [ -n "<application>" ] && app="app <application>" ; ufw insert <insertpos> <blocktype> from <ip> to <destination> $app
actionunban = [ -n "<application>" ] && app="app <application>"
ufw delete <blocktype> from <ip> to <destination> $app
actionunban = [ -n "<application>" ] && app="app <application>" ; ufw delete <blocktype> from <ip> to <destination> $app
[Init]
# Option: insertpos
+5 -5
View File
@@ -1,7 +1,7 @@
# Fail2Ban action for sending xarf Login-Attack messages to IP owner
#
# IMPORTANT:
#
# IMPORTANT:
#
# Emailing a IP owner of abuse is a serious complain. Make sure that it is
# serious. Fail2ban developers and network owners recommend you only use this
# action for:
@@ -46,7 +46,7 @@ actionban = oifs=${IFS}; IFS=.;SEP_IP=( <ip> ); set -- ${SEP_IP}; ADDRESSES=$(di
REPORTID=<time>@`uname -n`
TLP=<tlp>
PORT=<port>
DATE=`LC_ALL=C date --date=@<time> +"%%a, %%d %%h %%Y %%T %%z"`
DATE=`LC_TIME=C date -u --date=@<time> +"%%a, %%d %%h %%Y %%T +0000"`
if [ ! -z "$ADDRESSES" ]; then
(printf -- %%b "<header>\n<message>\n<report>\n";
date '+Note: Local timezone is %%z (%%Z)';
@@ -70,7 +70,7 @@ footer = \n\n--Abuse-bfbb0f920793ac03cb8634bde14d8a1e--
report = --Abuse-bfbb0f920793ac03cb8634bde14d8a1e\nMIME-Version: 1.0\nContent-Transfer-Encoding: 7bit\nContent-Type: text/plain; charset=utf-8; name=\"report.txt\";\n\n---\nReported-From: $FROM\nCategory: abuse\nReport-ID: $REPORTID\nReport-Type: login-attack\nService: $SERVICE\nVersion: 0.2\nUser-Agent: Fail2ban v0.9\nDate: $DATE\nSource-Type: ip-address\nSource: $IP\nPort: $PORT\nSchema-URL: http://www.x-arf.org/schema/abuse_login-attack_0.1.2.json\nAttachment: text/plain\nOccurances: $FAILURES\nTLP: $TLP\n\n\n--Abuse-bfbb0f920793ac03cb8634bde14d8a1e\nMIME-Version: 1.0\nContent-Transfer-Encoding: 7bit\nContent-Type: text/plain; charset=utf8; name=\"logfile.log\";
# Option: Message
# Notes: This can be modified by the users
# Notes: This can be modified by the users
message = Dear Sir/Madam,\n\nWe have detected abuse from the IP address $IP, which according to abusix.com is on your network. We would appreciate if you would investigate and take action as appropriate.\n\nLog lines are given below, but please ask if you require any further information.\n\n(If you are not the correct person to contact about this please accept our apologies - your e-mail address was extracted from the whois record by an automated process.)\n\n This mail was generated by Fail2Ban in a X-ARF format! You can find more information about x-arf at http://www.x-arf.org/specification.html.\n\nThe recipient address of this report was provided by the Abuse Contact DB by abusix.com. abusix.com does not maintain the content of the database. All information which we pass out, derives from the RIR databases and is processed for ease of use. If you want to change or report non working abuse contacts please contact the appropriate RIR. If you have any further question, contact abusix.com directly via email (info@abusix.com). Information about the Abuse Contact Database can be found here: https://abusix.com/global-reporting/abuse-contact-db\nabusix.com is neither responsible nor liable for the content or accuracy of this message.\n
# Option: loglines
@@ -97,7 +97,7 @@ mailargs = -f <sender>
# Option: tlp
# Notes.: Traffic light protocol defining the sharing of this information.
# http://www.trusted-introducer.org/ISTLPv11.pdf
# green is share to those involved in network security but it is not
# green is share to those involved in network security but it is not
# to be released to the public.
tlp = green
-6
View File
@@ -34,12 +34,6 @@ loglevel = INFO
#
logtarget = /var/log/fail2ban.log
# Option: syslogsocket
# Notes: Set the syslog socket file. Only used when logtarget is SYSLOG
# auto uses platform.system() to determine predefined paths
# Values: [ auto | FILE ] Default: auto
syslogsocket = auto
# Option: socket
# Notes.: Set the socket file. This is used to communicate with the daemon. Do
# not remove this file when Fail2ban runs. It will not be possible to
+1 -1
View File
@@ -10,7 +10,7 @@ before = apache-common.conf
[Definition]
failregex = ^%(_apache_error_client)s (AH(01797|01630): )?client denied by server configuration: (uri )?\S*(, referer: \S+)?\s*$
failregex = ^%(_apache_error_client)s (AH01797: )?client denied by server configuration: (uri )?\S*(, referer: \S+)?\s*$
^%(_apache_error_client)s (AH01617: )?user .*? authentication failure for "\S*": Password Mismatch(, referer: \S+)?$
^%(_apache_error_client)s (AH01618: )?user .*? not found(: )?\S*(, referer: \S+)?\s*$
^%(_apache_error_client)s (AH01614: )?client used wrong authentication scheme: \S*(, referer: \S+)?\s*$
+2 -2
View File
@@ -8,9 +8,9 @@
[Definition]
badbotscustom = EmailCollector|WebEMailExtrac|TrackBack/1\.02|sogou music spider
badbots = Atomic_Email_Hunter/4\.0|atSpider/1\.0|autoemailspider|bwh3_user_agent|China Local Browse 2\.6|ContactBot/0\.2|ContentSmartz|DataCha0s/2\.0|DBrowse 1\.4b|DBrowse 1\.4d|Demo Bot DOT 16b|Demo Bot Z 16b|DSurf15a 01|DSurf15a 71|DSurf15a 81|DSurf15a VA|EBrowse 1\.4b|Educate Search VxB|EmailSiphon|EmailSpider|EmailWolf 1\.00|ESurf15a 15|ExtractorPro|Franklin Locator 1\.8|FSurf15a 01|Full Web Bot 0416B|Full Web Bot 0516B|Full Web Bot 2816B|Guestbook Auto Submitter|Industry Program 1\.0\.x|ISC Systems iRc Search 2\.1|IUPUI Research Bot v 1\.9a|LARBIN-EXPERIMENTAL \(efp@gmx\.net\)|LetsCrawl\.com/1\.0 \+http\://letscrawl\.com/|Lincoln State Web Browser|LMQueueBot/0\.2|LWP\:\:Simple/5\.803|Mac Finder 1\.0\.xx|MFC Foundation Class Library 4\.0|Microsoft URL Control - 6\.00\.8xxx|Missauga Locate 1\.0\.0|Missigua Locator 1\.9|Missouri College Browse|Mizzu Labs 2\.2|Mo College 1\.9|MVAClient|Mozilla/2\.0 \(compatible; NEWT ActiveX; Win32\)|Mozilla/3\.0 \(compatible; Indy Library\)|Mozilla/3\.0 \(compatible; scan4mail \(advanced version\) http\://www\.peterspages\.net/?scan4mail\)|Mozilla/4\.0 \(compatible; Advanced Email Extractor v2\.xx\)|Mozilla/4\.0 \(compatible; Iplexx Spider/1\.0 http\://www\.iplexx\.at\)|Mozilla/4\.0 \(compatible; MSIE 5\.0; Windows NT; DigExt; DTS Agent|Mozilla/4\.0 efp@gmx\.net|Mozilla/5\.0 \(Version\: xxxx Type\:xx\)|NameOfAgent \(CMS Spider\)|NASA Search 1\.0|Nsauditor/1\.x|PBrowse 1\.4b|PEval 1\.4b|Poirot|Port Huron Labs|Production Bot 0116B|Production Bot 2016B|Production Bot DOT 3016B|Program Shareware 1\.0\.2|PSurf15a 11|PSurf15a 51|PSurf15a VA|psycheclone|RSurf15a 41|RSurf15a 51|RSurf15a 81|searchbot admin@google\.com|ShablastBot 1\.0|snap\.com beta crawler v0|Snapbot/1\.0|Snapbot/1\.0 \(Snap Shots&#44; \+http\://www\.snap\.com\)|sogou develop spider|Sogou Orion spider/3\.0\(\+http\://www\.sogou\.com/docs/help/webmasters\.htm#07\)|sogou spider|Sogou web spider/3\.0\(\+http\://www\.sogou\.com/docs/help/webmasters\.htm#07\)|sohu agent|SSurf15a 11 |TSurf15a 11|Under the Rainbow 2\.2|User-Agent\: Mozilla/4\.0 \(compatible; MSIE 6\.0; Windows NT 5\.1\)|VadixBot|WebVulnCrawl\.unknown/1\.0 libwww-perl/5\.803|Wells Search II|WEP Search 00
badbots = Atomic_Email_Hunter/4\.0|atSpider/1\.0|autoemailspider|bwh3_user_agent|China Local Browse 2\.6|ContactBot/0\.2|ContentSmartz|DataCha0s/2\.0|DBrowse 1\.4b|DBrowse 1\.4d|Demo Bot DOT 16b|Demo Bot Z 16b|DSurf15a 01|DSurf15a 71|DSurf15a 81|DSurf15a VA|EBrowse 1\.4b|Educate Search VxB|EmailSiphon|EmailSpider|EmailWolf 1\.00|ESurf15a 15|ExtractorPro|Franklin Locator 1\.8|FSurf15a 01|Full Web Bot 0416B|Full Web Bot 0516B|Full Web Bot 2816B|Guestbook Auto Submitter|Industry Program 1\.0\.x|ISC Systems iRc Search 2\.1|IUPUI Research Bot v 1\.9a|LARBIN-EXPERIMENTAL \(efp@gmx\.net\)|LetsCrawl\.com/1\.0 +http\://letscrawl\.com/|Lincoln State Web Browser|LMQueueBot/0\.2|LWP\:\:Simple/5\.803|Mac Finder 1\.0\.xx|MFC Foundation Class Library 4\.0|Microsoft URL Control - 6\.00\.8xxx|Missauga Locate 1\.0\.0|Missigua Locator 1\.9|Missouri College Browse|Mizzu Labs 2\.2|Mo College 1\.9|MVAClient|Mozilla/2\.0 \(compatible; NEWT ActiveX; Win32\)|Mozilla/3\.0 \(compatible; Indy Library\)|Mozilla/3\.0 \(compatible; scan4mail \(advanced version\) http\://www\.peterspages\.net/?scan4mail\)|Mozilla/4\.0 \(compatible; Advanced Email Extractor v2\.xx\)|Mozilla/4\.0 \(compatible; Iplexx Spider/1\.0 http\://www\.iplexx\.at\)|Mozilla/4\.0 \(compatible; MSIE 5\.0; Windows NT; DigExt; DTS Agent|Mozilla/4\.0 efp@gmx\.net|Mozilla/5\.0 \(Version\: xxxx Type\:xx\)|NameOfAgent \(CMS Spider\)|NASA Search 1\.0|Nsauditor/1\.x|PBrowse 1\.4b|PEval 1\.4b|Poirot|Port Huron Labs|Production Bot 0116B|Production Bot 2016B|Production Bot DOT 3016B|Program Shareware 1\.0\.2|PSurf15a 11|PSurf15a 51|PSurf15a VA|psycheclone|RSurf15a 41|RSurf15a 51|RSurf15a 81|searchbot admin@google\.com|ShablastBot 1\.0|snap\.com beta crawler v0|Snapbot/1\.0|Snapbot/1\.0 \(Snap Shots&#44; +http\://www\.snap\.com\)|sogou develop spider|Sogou Orion spider/3\.0\(+http\://www\.sogou\.com/docs/help/webmasters\.htm#07\)|sogou spider|Sogou web spider/3\.0\(+http\://www\.sogou\.com/docs/help/webmasters\.htm#07\)|sohu agent|SSurf15a 11 |TSurf15a 11|Under the Rainbow 2\.2|User-Agent\: Mozilla/4\.0 \(compatible; MSIE 6\.0; Windows NT 5\.1\)|VadixBot|WebVulnCrawl\.unknown/1\.0 libwww-perl/5\.803|Wells Search II|WEP Search 00
failregex = ^<HOST> -.*"(GET|POST|HEAD).*HTTP.*"(?:%(badbots)s|%(badbotscustom)s)"$
failregex = ^<HOST> -.*"(GET|POST).*HTTP.*"(?:%(badbots)s|%(badbotscustom)s)"$
ignoreregex =
+11 -3
View File
@@ -17,9 +17,7 @@
[INCLUDES]
# overwrite with apache-common.local if _apache_error_client is incorrect.
# Load regexes for filtering from botsearch-common.conf
before = apache-common.conf
botsearch-common.conf
[Definition]
@@ -33,8 +31,18 @@ ignoreregex =
# Webroot represents the webroot on which all other files are based
webroot = /var/www/
# Block is the actual non-found directories to block
block = (<webmail>|<phpmyadmin>|<wordpress>)[^,]*
# These are just convient definitions that assist the blocking of stuff that
# isn't installed
webmail = roundcube|(ext)?mail|horde|(v-?)?webmail
phpmyadmin = (typo3/|xampp/|admin/|)(pma|(php)?[Mm]y[Aa]dmin)
wordpress = wp-(login|signup)\.php
# DEV Notes:
#
# Author: Daniel Black
# Author: Daniel Black
-14
View File
@@ -1,14 +0,0 @@
# Fail2Ban filter for fake Googlebot User Agents
[Definition]
failregex = ^<HOST> .*Googlebot.*$
ignoreregex =
# DEV Notes:
#
# Author: Lee Clemens
# Thanks: Johannes B. Ullrich, Ph.D.
# Reference: https://isc.sans.edu/forums/diary/When+Google+isnt+Google/15968/
-20
View File
@@ -1,20 +0,0 @@
# Fail2Ban Apache pass filter
# This filter is for access.log, NOT for error.log
#
# The knocking request must have a referer.
[INCLUDES]
before = apache-common.conf
[Definition]
failregex = ^<HOST> - \w+ \[\] "GET <knocking_url> HTTP/1\.[01]" 200 \d+ ".*" "[^-].*"$
ignoreregex =
[Init]
knocking_url = /knocking/
# Author: Viktor Szépe
-26
View File
@@ -1,26 +0,0 @@
# Fail2Ban filter to block web requests containing custom headers attempting to exploit the shellshock bug
#
#
[INCLUDES]
# overwrite with apache-common.local if _apache_error_client is incorrect.
before = apache-common.conf
[Definition]
failregex = ^%(_apache_error_client)s (AH01215: )?/bin/(ba)?sh: warning: HTTP_.*?: ignoring function definition attempt(, referer: \S+)?\s*$
^%(_apache_error_client)s (AH01215: )?/bin/(ba)?sh: error importing function definition for `HTTP_.*?'(, referer: \S+)?\s*$
ignoreregex =
# DEV Notes:
#
# https://wiki.apache.org/httpd/ListOfErrors for apache error IDs
#
# example log lines:
# [Thu Sep 25 09:27:18.813902 2014] [cgi:error] [pid 16860] [client 89.207.132.76:59635] AH01215: /bin/bash: warning: HTTP_TEST: ignoring function definition attempt
# [Thu Sep 25 09:29:56.141832 2014] [cgi:error] [pid 16864] [client 162.247.73.206:41273] AH01215: /bin/bash: error importing function definition for `HTTP_TEST'
#
# Author: Eugene Hopkinson (riot@riot.so)
+3 -5
View File
@@ -13,19 +13,17 @@ _daemon = asterisk
__pid_re = (?:\[\d+\])
iso8601 = \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+[+-]\d{4}
# All Asterisk log messages begin like this:
log_prefix= (?:NOTICE|SECURITY)%(__pid_re)s:?(?:\[C-[\da-f]*\])? \S+:\d*( in \w+:)?
failregex = ^(%(__prefix_line)s|\[\]\s*)%(log_prefix)s Registration from '[^']*' failed for '<HOST>(:\d+)?' - (Wrong password|Username/auth name mismatch|No matching peer found|Not a local domain|Device does not match ACL|Peer is not supposed to register|ACL error \(permit/deny\)|Not a local domain)$
^(%(__prefix_line)s|\[\]\s*)%(log_prefix)s Call from '[^']*' \(<HOST>:\d+\) to extension '[^']*' rejected because extension not found in context
^(%(__prefix_line)s|\[\]\s*)%(log_prefix)s Call from '[^']*' \(<HOST>:\d+\) to extension '\d+' rejected because extension not found in context 'default'\.$
^(%(__prefix_line)s|\[\]\s*)%(log_prefix)s Host <HOST> failed to authenticate as '[^']*'$
^(%(__prefix_line)s|\[\]\s*)%(log_prefix)s No registration for peer '[^']*' \(from <HOST>\)$
^(%(__prefix_line)s|\[\]\s*)%(log_prefix)s Host <HOST> failed MD5 authentication for '[^']*' \([^)]+\)$
^(%(__prefix_line)s|\[\]\s*)%(log_prefix)s Failed to authenticate (user|device) [^@]+@<HOST>\S*$
^(%(__prefix_line)s|\[\]\s*)%(log_prefix)s hacking attempt detected '<HOST>'$
^(%(__prefix_line)s|\[\]\s*)%(log_prefix)s SecurityEvent="(FailedACL|InvalidAccountID|ChallengeResponseFailed|InvalidPassword)",EventTV="([\d-]+|%(iso8601)s)",Severity="[\w]+",Service="[\w]+",EventVersion="\d+",AccountID="(\d*|<unknown>)",SessionID=".+",LocalAddress="IPV[46]/(UDP|TCP|WS)/[\da-fA-F:.]+/\d+",RemoteAddress="IPV[46]/(UDP|TCP|WS)/<HOST>/\d+"(,Challenge="[\w/]+")?(,ReceivedChallenge="\w+")?(,Response="\w+",ExpectedResponse="\w*")?(,ReceivedHash="[\da-f]+")?(,ACLName="\w+")?$
^(%(__prefix_line)s|\[\]\s*)%(log_prefix)s (?:handle_request_subscribe: )?Sending fake auth rejection for (device|user) \d*<sip:[^@]+@<HOST>>;tag=\w+\S*$
^(%(__prefix_line)s|\[\]\s*)%(log_prefix)s SecurityEvent="(FailedACL|InvalidAccountID|ChallengeResponseFailed|InvalidPassword)",EventTV="[\d-]+",Severity="[\w]+",Service="[\w]+",EventVersion="\d+",AccountID="\d*",SessionID="0x[\da-f]+",LocalAddress="IPV[46]/(UD|TC)P/[\da-fA-F:.]+/\d+",RemoteAddress="IPV[46]/(UD|TC)P/<HOST>/\d+"(,Challenge="\w+",ReceivedChallenge="\w+")?(,ReceivedHash="[\da-f]+")?(,ACLName="\w+")?$
^(%(__prefix_line)s|\[\]\s*WARNING%(__pid_re)s:?(?:\[C-[\da-f]*\])? )Ext\. s: "Rejecting unknown SIP connection from <HOST>"$
ignoreregex =
-19
View File
@@ -1,19 +0,0 @@
# Generic configuration file for -botsearch filters
[Init]
# Block is the actual non-found directories to block
block = \/?(<webmail>|<phpmyadmin>|<wordpress>|cgi-bin|mysqladmin)[^,]*
# These are just convient definitions that assist the blocking of stuff that
# isn't installed
webmail = roundcube|(ext)?mail|horde|(v-?)?webmail
phpmyadmin = (typo3/|xampp/|admin/|)(pma|(php)?[Mm]y[Aa]dmin)
wordpress = wp-(login|signup|admin)\.php
# DEV Notes:
# Taken from apache-botsearch filter
#
# Author: Frantisek Sumsal
-4
View File
@@ -53,8 +53,4 @@ __bsd_syslog_verbose = (<[^.]+\.[^.]+>)
# This can be optional (for instance if we match named native log files)
__prefix_line = \s*%(__bsd_syslog_verbose)s?\s*(?:%(__hostname)s )?(?:%(__kernel_prefix)s )?(?:@vserver_\S+ )?%(__daemon_combs_re)s?\s%(__daemon_extra_re)s?\s*
# PAM authentication mechanism check for failures, e.g.: pam_unix, pam_sss,
# pam_ldap
__pam_auth = pam_unix
# Author: Yaroslav Halchenko
-1
View File
@@ -6,7 +6,6 @@
failregex = ^: Bad Rcon: "rcon \d+ "\S+" sv_contact ".*?"" from "<HOST>:\d+"$
ignoreregex =
[Init]
+2 -3
View File
@@ -9,10 +9,9 @@ before = common.conf
_daemon = (auth|dovecot(-auth)?|auth-worker)
failregex = ^%(__prefix_line)s(%(__pam_auth)s(\(dovecot:auth\))?:)?\s+authentication failure; logname=\S* uid=\S* euid=\S* tty=dovecot ruser=\S* rhost=<HOST>(\s+user=\S*)?\s*$
failregex = ^%(__prefix_line)s(pam_unix(\(dovecot:auth\))?:)?\s+authentication failure; logname=\S* uid=\S* euid=\S* tty=dovecot ruser=\S* rhost=<HOST>(\s+user=\S*)?\s*$
^%(__prefix_line)s(pop3|imap)-login: (Info: )?(Aborted login|Disconnected)(: Inactivity)? \(((auth failed, \d+ attempts)( in \d+ secs)?|tried to use (disabled|disallowed) \S+ auth)\):( user=<\S*>,)?( method=\S+,)? rip=<HOST>(, lip=(\d{1,3}\.){3}\d{1,3})?(, TLS( handshaking(: SSL_accept\(\) failed: error:[\dA-F]+:SSL routines:[TLS\d]+_GET_CLIENT_HELLO:unknown protocol)?)?(: Disconnected)?)?(, session=<\S+>)?\s*$
^%(__prefix_line)s(Info|dovecot: auth\(default\)|auth-worker\(\d+\)): pam\(\S+,<HOST>\): pam_authenticate\(\) failed: (User not known to the underlying authentication module: \d+ Time\(s\)|Authentication failure \(password mismatch\?\))\s*$
^%(__prefix_line)s(auth|auth-worker\(\d+\)): (pam|passwd-file)\(\S+,<HOST>\): unknown user\s*$
^%(__prefix_line)s(Info|dovecot: auth\(default\)): pam\(\S+,<HOST>\): pam_authenticate\(\) failed: (User not known to the underlying authentication module: \d+ Time\(s\)|Authentication failure \(password mismatch\?\))\s*$
ignoreregex =
-26
View File
@@ -1,26 +0,0 @@
# Fail2Ban filter to block repeated failed login attempts to Drupal site(s)
#
#
# Drupal must be setup to use Syslog, which defaults to the following format:
#
# !base_url|!timestamp|!type|!ip|!request_uri|!referer|!uid|!link|!message
#
#
[INCLUDES]
before = common.conf
[Definition]
failregex = ^%(__prefix_line)s(https?:\/\/)([\da-z\.-]+)\.([a-z\.]{2,6})(\/[\w\.-]+)*\|\d{10}\|user\|<HOST>\|.+\|.+\|\d\|.*\|Login attempt failed for .+\.$
ignoreregex =
# DEV Notes:
#
# https://www.drupal.org/documentation/modules/syslog
#
# Author: Lee Clemens
+2 -2
View File
@@ -14,10 +14,10 @@ before = exim-common.conf
[Definition]
failregex = ^%(pid)s %(host_info)ssender verify fail for <\S+>: (?:Unknown user|Unrouteable address|all relevant MX records point to non-existent hosts)\s*$
^%(pid)s \w+ authenticator failed for (\S+ )?\(\S+\) \[<HOST>\](:\d+)?( I=\[\S+\](:\d+)?)?: 535 Incorrect authentication data( \(set_id=.*\)|: \d+ Time\(s\))?\s*$
^%(pid)s \w+ authenticator failed for (\S+ )?\(\S+\) \[<HOST>\]: 535 Incorrect authentication data( \(set_id=.*\)|: \d+ Time\(s\))?\s*$
^%(pid)s %(host_info)sF=(<>|[^@]+@\S+) rejected RCPT [^@]+@\S+: (relay not permitted|Sender verify failed|Unknown user)\s*$
^%(pid)s SMTP protocol synchronization error \([^)]*\): rejected (connection from|"\S+") %(host_info)s(next )?input=".*"\s*$
^%(pid)s SMTP call from \S+ \[<HOST>\](:\d+)? (I=\[\S+\](:\d+)? )?dropped: too many nonmail commands \(last was "\S+"\)\s*$
^%(pid)s SMTP call from \S+ \[<HOST>\](:\d+)? (I=\[\S+\]:\d+ )?dropped: too many nonmail commands \(last was "\S+"\)\s*$
ignoreregex =
-37
View File
@@ -1,37 +0,0 @@
# Fail2Ban configuration file to block repeated failed login attempts to Frolor installation(s)
#
# Froxlor needs to log to Syslog User (e.g. /var/log/user.log) with one of the following messages
# <syslog prefix> Froxlor: [Login Action <HOST>] Unknown user '<USER>' tried to login.
# <syslog prefix> Froxlor: [Login Action <HOST>] User '<USER>' tried to login with wrong password.
#
# Author: Joern Muehlencord
#
[INCLUDES]
# Read common prefixes. If any customizations available -- read them from
# common.local
before = common.conf
[Definition]
_daemon = Froxlor
# Option: failregex
# Notes.: regex to match the password failures messages in the logfile. The
# host must be matched by a group named "host". The tag "<HOST>" can
# be used for standard IP/hostname matching and is only an alias for
# (?:::f{4,6}:)?(?P<host>[\w\-.^_]+)
# Values: TEXT
#
failregex = ^%(__prefix_line)s\[Login Action <HOST>\] Unknown user \S* tried to login.$
^%(__prefix_line)s\[Login Action <HOST>\] User \S* tried to login with wrong password.$
# Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored.
# Values: TEXT
#
ignoreregex =
+1 -1
View File
@@ -8,7 +8,7 @@
failregex = ^\[\]LOGIN FAILED for user: "\S+" from IP: <HOST>$
ignoreregex =
# Author: Daniel Black
-37
View File
@@ -1,37 +0,0 @@
# Fail2Ban filter configuration file to match failed login attempts to
# HAProxy HTTP Authentication protected servers.
#
# PLEASE NOTE - When a user first hits the HTTP Auth a 401 is returned by the server
# which prompts their browser to ask for login details.
# This initial 401 is logged by HAProxy.
# In other words, even successful logins will have at least 1 fail regex match.
# Please keep this in mind when setting findtime and maxretry for jails.
#
# Author: Jordan Moeser
#
[INCLUDES]
# Read common prefixes. If any customizations available -- read them from
# common.local
before = common.conf
[Definition]
_daemon = haproxy
# Option: failregex
# Notes.: regex to match the password failures messages in the logfile. The
# host must be matched by a group named "host". The tag "<HOST>" can
# be used for standard IP/hostname matching and is only an alias for
# (?:::f{4,6}:)?(?P<host>[\w\-.^_]+)
# Values: TEXT
#
failregex = ^%(__prefix_line)s<HOST>.*<NOSRV> -1/-1/-1/-1/\+*\d* 401
# Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored.
# Values: TEXT
#
ignoreregex =
@@ -1,35 +0,0 @@
#!/usr/bin/python
# Inspired by https://isc.sans.edu/forums/diary/When+Google+isnt+Google/15968/
#
# Written in Python to reuse built-in Python batteries and not depend on
# presence of host and cut commands
#
import sys
def process_args(argv):
if len(argv) != 2:
sys.stderr.write("Please provide a single IP as an argument. Got: %s\n"
% (argv[1:]))
sys.exit(2)
ip = argv[1]
from fail2ban.server.filter import DNSUtils
if not DNSUtils.isValidIP(ip):
sys.stderr.write("Argument must be a single valid IP. Got: %s\n"
% ip)
sys.exit(3)
return ip
def is_googlebot(ip):
import re
from fail2ban.server.filter import DNSUtils
host = DNSUtils.ipToName(ip)
if not host or not re.match('.*\.google(bot)?\.com$', host):
sys.exit(1)
host_ips = DNSUtils.dnsToIp(host)
sys.exit(0 if ip in host_ips else 1)
if __name__ == '__main__':
is_googlebot(process_args(sys.argv))
-3
View File
@@ -6,9 +6,6 @@ failregex = ^ SMTP Spam attack detected from <HOST>,
^ IP address <HOST> found in DNS blacklist \S+, mail from \S+ to \S+$
^ Relay attempt from IP address <HOST>
^ Attempt to deliver to unknown recipient \S+, from \S+, IP address <HOST>$
ignoreregex =
[Init]
datepattern = ^\[%%d/%%b/%%Y %%H:%%M:%%S\]
-1
View File
@@ -7,4 +7,3 @@
failregex = ^\[[A-Z]+\s+\]\s*error\s*:\s*Warning:\s+Client '<HOST>' supplied unknown user '\w+' accessing monit httpd$
^\[[A-Z]+\s+\]\s*error\s*:\s*Warning:\s+Client '<HOST>' supplied wrong password for user '\w+' accessing monit httpd$
ignoreregex =
-28
View File
@@ -1,28 +0,0 @@
# Fail2Ban filter for murmur/mumble-server
#
[INCLUDES]
before = common.conf
[Definition]
_daemon = murmurd
# N.B. If you allow users to have usernames that include the '>' character you
# should change this to match the regex assigned to the 'username'
# variable in your server config file (murmur.ini / mumble-server.ini).
_usernameregex = [^>]+
_prefix = <W>[\n\s]*(\.\d{3})?\s+\d+ => <\d+:%(_usernameregex)s\(-1\)> Rejected connection from <HOST>:\d+:
failregex = ^%(_prefix)s Invalid server password$
^%(_prefix)s Wrong certificate or password for existing user$
ignoreregex =
# DEV Notes:
#
# Author: Ross Brown
+1 -1
View File
@@ -17,7 +17,7 @@ before = common.conf
_daemon = mysqld
failregex = ^%(__prefix_line)s(?:\d+ |\d{6} \s?\d{1,2}:\d{2}:\d{2} )?\[\w+\] Access denied for user '[^']+'@'<HOST>' (to database '[^']*'|\(using password: (YES|NO)\))*\s*$
failregex = ^%(__prefix_line)s(\d{6} \s?\d{1,2}:\d{2}:\d{2} )?\[Warning\] Access denied for user '\w+'@'<HOST>' (to database '[^']*'|\(using password: (YES|NO)\))*\s*$
ignoreregex =
-2
View File
@@ -38,8 +38,6 @@ failregex = ^%(__line_prefix)s( error:)?\s*client <HOST>#\S+( \([\S.]+\))?: (vie
^%(__line_prefix)s( error:)?\s*client <HOST>#\S+( \([\S.]+\))?: zone transfer '\S+/AXFR/\w+' denied\s*$
^%(__line_prefix)s( error:)?\s*client <HOST>#\S+( \([\S.]+\))?: bad zone transfer request: '\S+/IN': non-authoritative zone \(NOTAUTH\)\s*$
ignoreregex =
# DEV Notes:
# Trying to generalize the
# structure which is general to capture general patterns in log
-20
View File
@@ -1,20 +0,0 @@
# Fail2Ban filter to match web requests for selected URLs that don't exist
#
[INCLUDES]
# Load regexes for filtering
before = botsearch-common.conf
[Definition]
failregex = ^<HOST> \- \S+ \[\] \"(GET|POST|HEAD) \/<block> \S+\" 404 .+$
^ \[error\] \d+#\d+: \*\d+ (\S+ )?\"\S+\" (failed|is not found) \(2\: No such file or directory\), client\: <HOST>\, server\: \S*\, request: \"(GET|POST|HEAD) \/<block> \S+\"\, .*?$
ignoreregex =
# DEV Notes:
# Based on apache-botsearch filter
#
# Author: Frantisek Sumsal
-45
View File
@@ -1,45 +0,0 @@
# Fail2ban filter configuration for nginx :: limit_req
# used to ban hosts, that were failed through nginx by limit request processing rate
#
# Author: Serg G. Brester (sebres)
#
# To use 'nginx-limit-req' filter you should have `ngx_http_limit_req_module`
# and define `limit_req` and `limit_req_zone` as described in nginx documentation
# http://nginx.org/en/docs/http/ngx_http_limit_req_module.html
#
# Example:
#
# http {
# ...
# limit_req_zone $binary_remote_addr zone=lr_zone:10m rate=1r/s;
# ...
# # http, server, or location:
# location ... {
# limit_req zone=lr_zone burst=1 nodelay;
# ...
# }
# ...
# }
# ...
#
[Definition]
# Specify following expression to define exact zones, if you want to ban IPs limited
# from specified zones only.
# Example:
#
# ngx_limit_req_zones = lr_zone|lr_zone2
#
ngx_limit_req_zones = [^"]+
# Use following full expression if you should range limit request to specified
# servers, requests, referrers etc. only :
#
# failregex = ^\s*\[error\] \d+#\d+: \*\d+ limiting requests, excess: [\d\.]+ by zone "(?:%(ngx_limit_req_zones)s)", client: <HOST>, server: \S*, request: "\S+ \S+ HTTP/\d+\.\d+", host: "\S+"(, referrer: "\S+")?\s*$
# Shortly, much faster and stable version of regexp:
failregex = ^\s*\[error\] \d+#\d+: \*\d+ limiting requests, excess: [\d\.]+ by zone "(?:%(ngx_limit_req_zones)s)", client: <HOST>
ignoreregex =
-2
View File
@@ -24,5 +24,3 @@ _daemon = nsd
failregex = ^\[\]%(__prefix_line)sinfo: ratelimit block .* query <HOST> TYPE255$
^\[\]%(__prefix_line)sinfo: .* <HOST> refused, no acl matches\.$
ignoreregex =
-16
View File
@@ -1,16 +0,0 @@
# Openhab brute force auth filter: /etc/fail2ban/filter.d/openhab.conf:
#
# Block IPs trying to auth openhab by web or rest api
#
# Matches e.g.
# 12.34.33.22 - - [26/sept./2015:18:04:43 +0200] "GET /openhab.app HTTP/1.1" 401 1382
# 175.18.15.10 - - [02/sept./2015:00:11:31 +0200] "GET /rest/bindings HTTP/1.1" 401 1384
[Definition]
failregex = ^<HOST>\s+-\s+-\s+\[\]\s+"[A-Z]+ .*" 401 \d+\s*$
[Init]
datepattern = %%d/%%b[^/]*/%%Y:%%H:%%M:%%S %%z
+1 -1
View File
@@ -13,7 +13,7 @@ before = common.conf
# Default: catch all failed logins
_ttys_re=\S*
__pam_re=\(?%(__pam_auth)s(?:\(\S+\))?\)?:?
__pam_re=\(?pam_unix(?:\(\S+\))?\)?:?
_daemon = \S+
failregex = ^%(__prefix_line)s%(__pam_re)s\s+authentication failure; logname=\S* uid=\S* euid=\S* tty=%(_ttys_re)s ruser=\S* rhost=<HOST>(?:\s+user=.*)?\s*$
-12
View File
@@ -1,12 +0,0 @@
# Fail2Ban filter for failure attempts in Counter Strike-1.6
#
#
[Definition]
failregex = \/<HOST> Port\: [0-9]+ (TCP|UDP) Blocked$
ignoreregex =
# Author: Pacop <pacoparu@gmail.com>
-19
View File
@@ -1,19 +0,0 @@
# Fail2Ban filter for Postfix's RBL based Blocked hosts
#
#
[INCLUDES]
# Read common prefixes. If any customizations available -- read them from
# common.local
before = common.conf
[Definition]
_daemon = postfix(-\w+)?/smtpd
failregex = ^%(__prefix_line)sNOQUEUE: reject: RCPT from \S+\[<HOST>\]: 454 4\.7\.1 Service unavailable; Client host \[\S+\] blocked using .* from=<\S*> to=<\S+> proto=ESMTP helo=<\S*>$
ignoreregex =
# Author: Lee Clemens
+2 -4
View File
@@ -7,11 +7,9 @@ before = common.conf
[Definition]
_daemon = postfix(-\w+)?/(submission/)?smtp(d|s)
_daemon = postfix/smtpd
failregex = ^%(__prefix_line)swarning: [-._\w]+\[<HOST>\]: SASL ((?i)LOGIN|PLAIN|(?:CRAM|DIGEST)-MD5) authentication failed(: [ A-Za-z0-9+/:]*={0,2})?\s*$
ignoreregex = authentication failed: Connection lost to authentication server$
failregex = ^%(__prefix_line)swarning: [-._\w]+\[<HOST>\]: SASL (?:LOGIN|PLAIN|(?:CRAM|DIGEST)-MD5) authentication failed(: [ A-Za-z0-9+/]*={0,2})?\s*$
[Init]
+1 -4
View File
@@ -10,14 +10,11 @@ before = common.conf
[Definition]
_daemon = postfix(-\w+)?/(submission/)?smtp(d|s)
_daemon = postfix/smtpd
failregex = ^%(__prefix_line)sNOQUEUE: reject: RCPT from \S+\[<HOST>\]: 554 5\.7\.1 .*$
^%(__prefix_line)sNOQUEUE: reject: RCPT from \S+\[<HOST>\]: 450 4\.7\.1 Client host rejected: cannot find your hostname, (\[\S*\]); from=<\S*> to=<\S+> proto=ESMTP helo=<\S*>$
^%(__prefix_line)sNOQUEUE: reject: RCPT from \S+\[<HOST>\]: 450 4\.7\.1 : Helo command rejected: Host not found; from=<> to=<> proto=ESMTP helo= *$
^%(__prefix_line)sNOQUEUE: reject: EHLO from \S+\[<HOST>\]: 504 5\.5\.2 <\S+>: Helo command rejected: need fully-qualified hostname;
^%(__prefix_line)sNOQUEUE: reject: VRFY from \S+\[<HOST>\]: 550 5\.1\.1 .*$
^%(__prefix_line)sNOQUEUE: reject: RCPT from \S+\[<HOST>\]: 450 4\.1\.8 <\S*>: Sender address rejected: Domain not found; from=<\S*> to=<\S+> proto=ESMTP helo=<\S*>$
^%(__prefix_line)simproper command pipelining after \S+ from [^[]*\[<HOST>\]:?$
ignoreregex =
-3
View File
@@ -2,9 +2,6 @@
#
# Set "UseReverseDNS off" in proftpd.conf to avoid the need for DNS.
# See: http://www.proftpd.org/docs/howto/DNS.html
# When the default locale for your system is not en_US.UTF-8
# on Debian-based systems be sure to add this to /etc/default/proftpd
# export LC_TIME="en_US.UTF-8"
[INCLUDES]
-2
View File
@@ -29,8 +29,6 @@ _jailname = recidive
failregex = ^(%(__prefix_line)s| %(_daemon)s%(__pid_re)s?:\s+)NOTICE\s+\[(?!%(_jailname)s\])(?:.*)\]\s+Ban\s+<HOST>\s*$
ignoreregex =
[Init]
journalmatch = _SYSTEMD_UNIT=fail2ban.service PRIORITY=5
+2 -7
View File
@@ -1,10 +1,6 @@
# Fail2Ban configuration file for roundcube web server
#
# By default failed logins are printed to 'errors'. The first regex matches those
# The second regex matches those printed to 'userlogins'
# The userlogins log file can be enabled by setting $config['log_logins'] = true; in config.inc.php
#
# The logpath in your jail can be updated to userlogins if you wish
#
[INCLUDES]
@@ -13,8 +9,7 @@ before = common.conf
[Definition]
failregex = ^\s*(\[\])?(%(__hostname)s\s*(roundcube:)?\s*(<[\w]+>)? IMAP Error)?: (FAILED login|Login failed) for .*? from <HOST>(\. .* in .*?/rcube_imap\.php on line \d+ \(\S+ \S+\))?$
^\[\]:\s*(<[\w]+>)? Failed login for [\w\-\.\+]+(@[\w\-\.\+]+\.[a-zA-Z]{2,6})? from <HOST> in session \w+( \(error: \d\))?$
failregex = ^\s*(\[\])?(%(__hostname)s roundcube: IMAP Error)?: (FAILED login|Login failed) for .*? from <HOST>(\. .* in .*?/rcube_imap\.php on line \d+ \(\S+ \S+\))?$
ignoreregex =
# DEV Notes:
@@ -31,4 +26,4 @@ ignoreregex =
# arbitrary user input and IMAP response doesn't inject the wrong IP for
# fail2ban
#
# Author: Teodor Micu & Yaroslav Halchenko & terence namusonge & Daniel Black & Lee Clemens
# Author: Teodor Micu & Yaroslav Halchenko & terence namusonge & Daniel Black
-31
View File
@@ -1,31 +0,0 @@
# Fail2Ban configuration file
#
# Author: Simon Brown
#
# Filter for Mac OS X Screen Sharing service
[INCLUDES]
# Read common prefixes. If any customizations available -- read them from
# common.local
before = common.conf
[Definition]
_daemon = screensharingd
# Option: failregex
# Notes.: regex to match the password failures messages in the logfile. The
# host must be matched by a group named "host". The tag "<HOST>" can
# be used for standard IP/hostname matching and is only an alias for
# (?:::f{4,6}:)?(?P<host>[\w\-.^_]+)
# Values: TEXT
#
failregex = ^%(__prefix_line)sAuthentication: FAILED :: User Name: .+ :: Viewer Address: <HOST> :: Type: DH$
# Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored.
# Values: TEXT
#
ignoreregex =
+1 -1
View File
@@ -7,7 +7,7 @@
failregex = ^\s+\d\s<HOST>\s+[A-Z_]+_DENIED/403 .*$
^\s+\d\s<HOST>\s+NONE/405 .*$
ignoreregex =
# Author: Daniel Black
-1
View File
@@ -3,7 +3,6 @@
failregex = ^ \[LOGIN_ERROR\].*from <HOST>: Unknown user or password incorrect\.$
ignoreregex =
[Init]

Some files were not shown because too many files have changed in this diff Show More