31 Commits

Author SHA1 Message Date
Auke Kok 03f4d64ff6 Convert to pandoc.
Because pandoc is relatively small, we now create man page output on the
fly on building, which makes pandoc a required build time dependency.
2020-04-01 13:00:21 -07:00
Auke Kok 865ec916aa v21 2020-02-13 11:01:45 -08:00
Auke Kok 6746c4a4db v20 2020-02-13 10:42:53 -08:00
Auke Kok 5dfb9821e3 v19 2019-11-04 14:18:38 -08:00
Auke Kok 83201e8b32 v18 2019-10-28 14:27:31 -07:00
Auke Kok 79f89d8b79 v17 2019-10-22 13:39:34 -07:00
Auke Kok 0a0a912c70 Move src files to /src/. 2019-01-23 15:56:17 -08:00
Auke Kok fdaa8ed34c v16 2019-01-23 15:19:50 -08:00
Auke Kok 9174590b04 Convert patterns to JSON input files.
Tallow will now read JSON files from /usr/share/tallow/ and /etc/tallow
and parse them to retrieve filters and patterns. The sshd patterns
are converted to JSON and used to test this change.

If a file exists in /etc/tallow with the same name as a file in
/usr/share/tallow, only the file in /etc/tallow will be parsed.

This change allows much more dynamic insertion of rules and people
to create custom patterns and filters and monitor the logs of other
daemons besides sshd that may be subject to brutefoce login attempts.

Potential use cases:
- IMAP/POP services
- SMTP
- HTTP services permitted they log to syslog
- DNS servers logging malformed requests
- etc.
2019-01-23 13:55:06 -08:00
Auke Kok 14152b1dad Re-create docs. 2018-10-04 11:35:59 -07:00
Auke Kok e2f92ff75b Add 10. and 192.168. as default whitelist entries to tallow.
These entries can be removed from the whitelist by adding any
whitelist entry to the config file. If you add any entry, you
must repeat these in order to have them included, otherwise those
entries are not added to the custom list.
2018-10-04 11:34:47 -07:00
Auke Kok 4ff1206974 Tune down badness for attempts a small bit.
We're still blocking really agressively. Tune it down a notch
and make timeouts a bit less for human-error like conditions
(forgotten key, ^C etc).
2018-10-04 11:34:47 -07:00
Auke Kok 5503ff0b20 Possibly handle journald restarts better.
I've encountered two runaway tallow daemons now that seem to
coincide with journald restarts that send it spinning tight
on the `continue` statement and hitting the same _get_data()
error (ENOENT).

I'm unsure if the `break` will fix it, but the `continue`
is definitely broken here. Hopefully the `sd_journal_wait()`
will properly reassess the journal state and notify us of
rotations or other issues.
2018-06-25 12:13:30 -07:00
Auke Kok 8655223248 Remove HUP/TERM/INT sighandler, shield USR1 sighandler.
We remove, by default, all signal handlers. The USR1 handler
remains, but is shielded behind `#ifdef DEBUG`.
2018-03-28 09:44:06 -07:00
Auke Kok 76a59df0f1 Fine-tune blocking rules one notch down.
Before, most rules would block on the 3rd rule hit, with this,
it's 4, which means 1 extra failure before a 1hr block is started
and this is a bit more sympathetic towards `typo` failures.
2018-03-23 16:17:34 -07:00
Auke Kok 36946deeee v8 2018-02-05 11:11:17 -08:00
Auke Kok e15bfe4dc0 Document USR1, update man page output.
Some minor adjustments to Makefile.am to make this passable.
2018-01-19 10:25:20 -08:00
Auke Kok a2a6d8e9ac v7. 2018-01-10 10:29:53 -08:00
Auke Kok ff2a47756f v6 2017-12-14 14:52:35 -08:00
Auke Kok 8a05303802 v5 2017-05-17 17:18:01 -07:00
Auke Kok e296f501c7 Use pcre to match logs, and find IP addresses.
This is a much more reliable method to extract the IP address
from the log entries, and allows us to consolidate 2 matches into
a single operation.

Once matched, we extract the IP substring and pass it to `find()`
as usual. We can add more regexes later if that is useful.
2017-05-16 15:55:18 -07:00
Auke Kok 9042a01eab v4 2017-05-11 08:56:56 -07:00
Auke Kok ea958fd2b5 v3 2017-05-08 08:49:15 -07:00
Auke Kok 4547892d56 Attempt to build against old systemd versions as well.
In case libsystemd isn't found, try libsystemd-journal as well.
2017-05-07 21:09:58 -07:00
Auke Kok d590c8f67f v2: ipset release. 2017-05-07 00:17:48 -07:00
Auke Kok cd65e1c48a v1 2017-05-06 21:46:27 -07:00
Auke Kok 47d7bf1d1f Link against libsystemd instead.
With more recent versions, these symbols are now
moved.
2017-03-25 13:00:03 -07:00
Auke Kok 94bd6f5049 Adding limits.h to the checklist. 2012-10-29 16:38:00 -07:00
Auke Kok 5b1748b4c3 Add TODO, debug output, systemd service file installation. 2012-10-29 12:35:33 -07:00
Auke Kok 16379ff5cd Adding remaining build files. This compiles now, and runs. 2012-10-25 15:52:58 -07:00
Auke Kok 21c622d970 tallow: a quick demo / lard replacement. 2012-10-25 15:41:58 -07:00