github.com/troglobit / logrun

An event-based, regexp-triggered, job runner ...

Commit log
59876ae ⎇ masterAdd basic .gitignore Joachim Nilsson 9 years ago
89cfedd COPYING: Add GNU GPL v2 license file Joachim Nilsson 9 years ago
32902ea Update URL to a live version of authfail Joachim Nilsson 9 years ago
7494c8f Update man page to proper (readable) mdoc format Joachim Nilsson 9 years ago
86c8e55 Updates and conversion to Markdown Joachim Nilsson 9 years ago
483f61c Rename to convert to Markdown Joachim Nilsson 9 years ago
f7668f4 Merge auth-control branch back to trunk Joachim Nilsson 9 years ago
2021bdf Fix shorewall example Joachim Nilsson 19 years ago
ab14445 Add neat header to conf file. Joachim Nilsson 19 years ago
b703fac Simple db location fix and add shorewall example. Joachim Nilsson 19 years ago

Introduction

Logrun is a small script that watches your logs and does stuff when a regexp match occurs.

Description

In its basic form logrun looks for various authentication failures and adds firewall rules to drop packets from the originating IP adresses. However, anyone familiar with (Perl) regexps easily modifies the code to do whatever is desirable.

Failed authentication adds the originating IP to a database, keeping track of the number of failed attempts. After too many attempts, the originating address is dropped, thus terminating any communication between the server and the client. A passed authentication clears any entries from the database.

Still TODO is to add timeout to the failed address so that it can be unlocked automatically after some time in quarantine.

Install

To install, simply run:

$ sudo perl setup.pl

Configure /etc/logrun.conf to suit your needs, and feel free to make additional rules in the code.

The Perl script detects Debian GNU/Linux systems, some other Linux systems and OpenBSD. Support for more systems is most welcome! :)

Origin & References

Logrun is based on the excellent authfail script by Bartosz M. Krajnik.

Logrun started out as a fork of authfail in 2005, then in Subversion and later converted to Bzr. Today Logrun is maintained at GitHub.

Authors: