Commit Graph

272 Commits (e584ab66ac06c4679261e518ea0e6a94cb45f979)

Author SHA1 Message Date
Steven Hiscocks f7d328195f NF: Add systemd journal backend 2013-05-10 00:15:07 +01:00
Yaroslav Halchenko f1b6806eb4 Merge branch 'master' into 0.9
* master: (51 commits)
  ENH: Use real (resolving) example.com instead of test.example.com
  DOC: Slight tune ups to ChangeLog -- we must release!
  Changelog entries for the latest merges
  BF: add bash-completion to MANIFEST
  DOC: ChangeLog for default action type change
  ENH: consolidate where blocktype is defined for iptables rules
  BF: default type to unreachable
  ENH: separate out regex and escape a .
  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
  DOC: Drop sudo from bash-completion
  DOC: Added bash-completion script
  ENH: add blocktype to all relevant actions. Also default the rejection to a ICMP reject rather than a drop
  ENH: Removed unused log line
  ENH: logrotate file
  BF: missed MANIFEST include
  BF: missed MANIFEST include
  BF: missed MANIFEST include
  ENH: some form of logrotate based on what distros are doing
  ...

Conflicts:
	ChangeLog
	MANIFEST
	client/actionreader.py
	config/jail.conf
	fail2ban/server/datedetector.py
	fail2ban/tests/datedetectortestcase.py
2013-05-08 13:53:38 -04:00
Yaroslav Halchenko 2b1e19933f Merge branch 'master' of git://github.com/fail2ban/fail2ban
* 'master' of git://github.com/fail2ban/fail2ban:
  BF: missed MANIFEST include
  DOC: credits for bsd-ipfw
  ENH: add ipfw rule for bsd using the tables.
2013-05-08 10:32:18 -04:00
Yaroslav Halchenko 976a65bb89 Merge branch 'bsd_logs' of https://github.com/grooverdan/fail2ban
* 'bsd_logs' of https://github.com/grooverdan/fail2ban:
  ENH: separate out regex and escape a .
  BF: missed MANIFEST include
  DOC: credits for bsd log
  DOC: bsd syslog files thanks to Nick Hilliard
  BF: change common.conf to handle formats of syslog -v and syslog -vv in BSD

Conflicts:
	config/filter.d/common.conf
2013-05-08 10:30:04 -04:00
Yaroslav Halchenko 5accc10a47 Merge pull request #206 from grooverdan/bsd_ipfw
NF: BSD ipfw
2013-05-08 07:24:56 -07:00
Yaroslav Halchenko 0ae49ab11e Merge branch 'bsd_pf' of https://github.com/grooverdan/fail2ban
* 'bsd_pf' of https://github.com/grooverdan/fail2ban:
  BF: missed MANIFEST include
  DOC: add jail.conf entry for pf
  DOC: credit for pf action. Origin: http://svnweb.freebsd.org/ports/head/security/py-fail2ban/files/patch-pf.conf?view=log
  ENH: pf action thanks to Nick Hilliard <nick@foobar.org>.

Conflicts:
	ChangeLog
2013-05-08 10:24:01 -04:00
Yaroslav Halchenko e85914cef8 Merge pull request #215 from grooverdan/reject_no_drop_by_default
ENH: add blocktype to all relevant actions and change default action to reject
2013-05-08 07:20:14 -07:00
Daniel Black 9c03ee6d9e ENH: consolidate where blocktype is defined for iptables rules 2013-05-08 07:52:08 +10:00
Daniel Black c7fd777966 BF: default type to unreachable 2013-05-08 07:31:31 +10:00
Daniel Black de56347619 ENH: separate out regex and escape a . 2013-05-08 06:32:27 +10:00
Yaroslav Halchenko e7cb0f8b8c ENH: filter.d/sshd.conf -- allow for trailing "via IP" in logs 2013-05-07 12:22:49 -04:00
Yaroslav Halchenko 2143cdff39 Merge: opensolaris docs/fixes, no 'sed -i' in hostsdeny, sshd regex tuneups
Origin: from https://github.com/jamesstout/fail2ban

* 'OpenSolaris' of https://github.com/jamesstout/fail2ban:
  ENH: Removed unused log line
  BF: fail2ban.local needs section headers
  ENH: Use .local config files for logtarget and jail
  ENH+TST: ssh failure messages for OpenSolaris and OS X
  ENH: fail message matching for OpenSolaris and OS X
  ENH: extra daemon info regex
  ENH: actionunban back to a sed command
  Readme for config on Solaris
  create socket/pid dir if needed
  Extra patterns for Solaris
  change sed to perl for Solaris

Conflicts:
	config/filter.d/sshd.conf
2013-05-06 11:11:12 -04:00
Yaroslav Halchenko 822a01018f Merge pull request #205 from grooverdan/bsd_ssh
BSD ssh improvements (casing, msg)
2013-05-06 07:54:58 -07:00
Daniel Black 3b4a7b7926 ENH: add blocktype to all relevant actions. Also default the rejection to a ICMP reject rather than a drop 2013-05-05 15:43:18 +10:00
Daniel Black aa52743f52 DOC: add jail.conf entry for pf 2013-05-03 16:42:10 +10:00
Daniel Black 0c5a9c53e1 ENH: pf action thanks to Nick Hilliard <nick@foobar.org>. 2013-05-03 16:34:54 +10:00
Daniel Black b6d0e8ad9c ENH: add ipfw rule for bsd using the tables. 2013-05-03 16:31:45 +10:00
Daniel Black 40c56b10a0 EHN: enhance sshd filter for bsd. 2013-05-03 16:17:35 +10:00
Daniel Black b3bd877d23 BF: change common.conf to handle formats of syslog -v and syslog -vv in BSD 2013-05-03 16:12:13 +10:00
Daniel Black 495f2dd877 DOC: purge of svn tags 2013-05-03 16:03:38 +10:00
Yaroslav Halchenko 89adcd7ff7 Merge branch PR #193 ASSP SMTP Proxy support (with some manual squashing)
Origin: https://github.com/lenrico/fail2ban

Squashing was done via rebase -i 1524b076d6
to eliminate massive assp sample log file originally added

  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
2013-05-03 00:57:49 -04:00
Enrico Labedzki 36b0d78ff8 tight control of the filter for ASSP 2013-05-03 00:56:53 -04:00
Enrico Labedzki 07aee8cd33 as daniel desires 2013-05-03 00:56:53 -04:00
Enrico Labedzki 24a8d07c20 added new date format support for ASSP SMTP Proxy 2013-05-03 00:56:46 -04:00
Yaroslav Halchenko b65205d4ad Merge branch 'master' into 0.9
* master:
  ENH: "is None" instead of "== None" + tune ups in headers
  BF: log error only if there were missed config files that couldn't be read
  DOC: missing cinfo tags are ok. Log error for self referencing definitions
  DOC: s/defination/definition/g learn to spell
  Changelog entry for the previous commit and some untabify
  BF: pyinotify backend should also handle IN_MOVED_TO events
  ENH: remove stats of config files and use results of SafeConfigParserWithIncludes.read to facilitate meaningful error messages
  DOC: credits for gh-70 fix
  BF: ensure dates in email are in the C locale. Thanks iGeorgeX
  DOC: ChangeLog for recursive tag substition
  ENH: allow recursive tag substitution in action files.
  DOC: document <br> tag
  DOC: ChangeLog for named-refused entry
  ENH: Account for views in named filter. By Romain Riviere in gentoo bug #259458
  DOC: release documentation and distributor contacts
  DOC: changelog entry for enhanced ssh filter
  BF: Rename mentioning of README to README.md (Fixes #187)
  updated README.md to hyperlink, add travis and coversall
  Moving README into a markup README.md for github's goodnesses

Conflicts:
	DEVELOP
	README.md
	fail2ban/client/configreader.py
	fail2ban/server/datedetector.py
2013-05-02 23:55:26 -04:00
Steven Hiscocks f196709be1 ENH: Update asterisk example jail.conf entry for multiaction 2013-04-29 23:40:18 +01:00
jamesstout 3367dbd987 ENH: fail message matching for OpenSolaris and OS X
- OpenSolaris keyboard message matched by new regex 3
- Removed Bye Bye regex per
https://github.com/fail2ban/fail2ban/issues/175#issuecomment-16538036
- PAM auth failure or error and first char case-insensitive, can also
have chars after the hostname. e.g.

Apr 29 16:53:38 Jamess-iMac.local sshd[47831]: error: PAM:
authentication error for james from 205.186.180.101 via 192.168.1.201
2013-04-30 04:23:13 +08:00
jamesstout d2a9537568 ENH: extra daemon info regex
for matching log lines like:
Mar 29 05:20:09 dusky sshd[19558]: [ID 800047 auth.info] Failed
keyboard-interactive for james from 205.186.180.30 port 54520 ssh2

this matches  [ID 800047 auth.info]
2013-04-30 04:14:36 +08:00
jamesstout b7795addd0 ENH: actionunban back to a sed command
per https://github.com/fail2ban/fail2ban/pull/182#discussion_r3999128
2013-04-30 04:10:32 +08:00
Daniel Black 945ad3d9e6 BF: ensure dates in email are in the C locale. Thanks iGeorgeX 2013-04-29 14:10:23 +10:00
Daniel Black 0ac8746d05 ENH: Account for views in named filter. By Romain Riviere in gentoo bug #259458 2013-04-28 11:03:44 +10:00
Yaroslav Halchenko 62602a9ed0 Revert "ENH: by default enable a single jail -- sshd"
This reverts commit 47a62b6072.

Enabling any jail by default should be a prerogative of particular
distributions (thanks Fabian Wenk for the discussion)

Conflicts:
	config/jail.conf
2013-04-23 13:58:58 -04:00
Yaroslav Halchenko 1d72a8265d Merge branch '0.9' into _tent/jail.conf
* 0.9:
  BF: usedns deals with forward (not reverse) DNS lookups (thanks Steven Hiscocks)

Conflicts:
	config/jail.conf
2013-04-23 13:57:52 -04:00
Yaroslav Halchenko 2a48b0ab54 Merge branch 'master' into 0.9
* master:
  BF: usedns deals with forward (not reverse) DNS lookups (thanks Steven Hiscocks)
2013-04-23 13:57:07 -04:00
Yaroslav Halchenko 22f04677b6 BF: usedns deals with forward (not reverse) DNS lookups (thanks Steven Hiscocks) 2013-04-23 13:56:51 -04:00
Yaroslav Halchenko 87bac37139 ENH: default port to all ports (0:65535) + remove where thus not needed + typos 2013-04-23 13:55:26 -04:00
Yaroslav Halchenko f4a74d8d8b RF: rename/unify naming of courier filters/jails 2013-04-22 22:42:09 -04:00
Yaroslav Halchenko 47a62b6072 ENH: by default enable a single jail -- sshd 2013-04-22 22:35:01 -04:00
Yaroslav Halchenko 3ba540eca3 ENH+BF: use %(__name__) by default for filter, defined enabled = false by DEFAULT
Now jail.conf is really neat.

BF: tests
2013-04-22 22:23:23 -04:00
Yaroslav Halchenko 24e4cfe1b7 Merge branch '0.9' into _tent/jail.conf
* 0.9: (45 commits)
  Beef up changelog for 0.9
  ENH: make fail2ban-regex aware of possible maxlines in the filter config file
  BF+TST: Correctly reset time in tearDownMyTime
  ENH: Reimplement warning suppression of setup.py test --quiet
  ENH: Renamed OptionConfigReader to DefinitionInitConfigReader
  ENH: Rename splitAction to extractOptions in jailreader
  ENH: Use os.path.join for filter/action config readers
  BF: Remove warnings handler which breaks setup.py python2<2.7 and python3<3.2
  ENH: For python3.2+ use ConfigPaser which replaces SafeConfigParser
  TST: Change depreciated unittest assertEquals method to assertEqual
  TST: Ensure files are closed in tests to remove ResourceWarnings
  BF: Change logging instance logSys `warn` method to `warning`
  ENH: use os.path.join for consistency -- add "Contributors" to authors
  RF: setup.py now imports version number again
  DOC: tune up formatting (spaces) and prelude for the changelog entry
  TST+RF: Add ability to execute test from setup.py with setuptools
  TST: Move test gathering to function is test utils
  TST: Move test TZ changes to setUp and tearDown methods
  ENH: Remove redundant `maxlines` option from jail reader
  TST: Add test for FilterReader [Init] `maxlines` override
  ...

Conflicts:
	config/jail.conf
2013-04-22 10:21:13 -04:00
Yaroslav Halchenko 698c74d9ed Merge commit '0.8.8-212-gf6f30f1' into 0.9
* commit '0.8.8-212-gf6f30f1': (24 commits)
  DOC: tune up formatting (spaces) and prelude for the changelog entry
  DOC: more ChangeLog entries all the way back to 0.8.8
  DOC: move new actions and filters to New Features in ChangeLog
  DOC: tomcat and Guacmole are next release
  DOC: credit man page edits
  DOC: developers please rebase and use a single commit
  DOC: post release ChangeLog entry
  DOC: ChangeLog - current HEAD back to ce3ab34
  DOC: begining of ChangeLog
  DOC: version/date of release
  DOC: ChangeLog versions and dates for Releasing
  DOC: guidance for pull requests
  BF:  filter.d/sshd "Did not receive identification string" relates to an exploit so document this in sshd-ddos.conf but leave it out of authentication based blocks in sshd.conf
  DOC: a plugin to thanks for the community support
  Add After, PIDFile, and change WantedBy to multi-user.target in fail2ban.server
  DOC: slight tune ups to README (we are no longer compatible with python 2.3 ;) )
  ENH: more openssh fail messages from openssh source code (CVS 20121205)
  Add systemd unit file and tmpfiles.d configuration files
  BF: do not rely on scripts being under /usr -- might differ eg on Fedora -- rely on import of common.version (Closes gh-112)
  RF: move exceptions used by both client and server into common/exceptions.py
  ...

Conflicts:
	ChangeLog
	README
2013-04-22 09:55:27 -04:00
jamesstout 10fcfb925d Extra patterns for Solaris 2013-04-21 07:30:21 +08:00
jamesstout de98e3dabd change sed to perl for Solaris 2013-04-21 07:29:48 +08:00
Steven Hiscocks 9672e44d39 ENH: Move jail `maxlines` to filter config 2013-04-18 22:11:41 +01:00
Daniel Black 41b9f7b6ac BF: filter.d/sshd "Did not receive identification string" relates to an exploit so document this in sshd-ddos.conf but leave it out of authentication based blocks in sshd.conf 2013-04-18 04:38:03 +10:00
Yaroslav Halchenko 4665ac6b27 RF: jail.conf with entries from Debian's copy and changing existing ones to conform the "template"
our unittests fail now -- will BF later
2013-04-17 01:05:04 -04:00
Yaroslav Halchenko 9a14cf8b7b Merge branch 'master' into 0.9
* master:
  DOC: initiated changelog (but not juice left to actually fill it up ;-))
  TST: test all valid loglevels in server testcases
  TST: Add tag replace and escape test for actions
  ENH: Minor change to action for consistency of execStart/Stop
  TST: Coverage for coveralls.io should only be run on success
  TST: no cover additions to server, primarily daemon creation
  DOC: thanks @kwirk for spotting the typos in exception message
  FD_CLOEXEC support
  Typo in default pidfile in fail2ban.conf

Conflicts:
	.travis.yml   -- after_success
	ChangeLog     -- added perspective changelog for 0.8.9
	fail2ban/server/asyncserver.py -- imports
	fail2ban/server/server.py -- no pragma (if I got it right ;-) )
2013-04-16 23:50:43 -04:00
Yaroslav Halchenko 4869186c8f Merge branch 'py3' of https://github.com/kwirk/fail2ban into 0.9
* 'py3' of https://github.com/kwirk/fail2ban: (38 commits)
  DOC: Add python3 to requirements
  ENH: Clarify use of bytes in csocket and asyncserver for python3
  DOC: Revert dnsToIp error change, seperate log message for socket.error
  TST: Tweak python3 open statement to resolve python2.5 SyntaxError
  TST: Revert changes for filter testcase open statement
  DOC: Revert setup.py messages to use print statement
  Add *.bak files generated by 2to3 to gitignore
  TST: Fix up fail2ban python3 scripts
  TST: Fix issues in tests which assumed dictionary's order
  ENH: setup.py now automatically runs 2to3 for python3.x
  TST: Remove Travis CI unsupported versions of python from Travis config
  add fail2ban-2to3 to MANIFEST file
  ENH: Add python3 versions to Travis CI config
  BF: Handle expected errors for python3.{0,1} when changing log target
  Minor tweaks to fail2ban-regex for encoding
  Added ability to set log file encoding with fail2ban-regex
  Add ability to set log encoding for jail
  Move handling of unicode decoding to FileContainer readline
  Fix incorrect exit code from fail2ban-2to3
  Remove redundant reassignment of variable
  ...

Conflicts:
	fail2ban/tests/servertestcase.py -- both branches added a new unittest at the same point
2013-04-16 23:24:49 -04:00
Yaroslav Halchenko f5572c8ade Merge pull request #173 from kwirk/maxlines
Maxlines jail setting tweaks
2013-04-16 19:50:00 -07:00
Steven Hiscocks 4d80fad874 ENH+DOC: Add Guacamole filter, example log and jail 2013-04-16 21:13:31 +01:00