21 Commits

Author SHA1 Message Date
Auke Kok 78dfe59099 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:28:58 -07:00
Auke Kok dccbfce478 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:23:09 -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