Quick start
This assumes minsec is installed and not yet running.
1. See what would happen, first
Before enabling anything, you can test on an existing log file.
minsec test sshd /var/log/secure # EL
minsec test sshd /var/log/auth.log # Debian / Ubuntu
Each match prints the address, the pattern number, and the line it came
from. -q prints per-address totals instead. If you get no output, either the log
is clean or the filter does not match your log format; check
troubleshooting.
2. Enable the filters for services you run
minsec filters # what is available
sudo minsec enable sshd
sudo minsec enable postfix-sasl dovecot # if you run mail
enable writes /etc/minsec/conf.d/<name>.toml. Nothing is enabled by default.
3. Validate the configuration
sudo minsec check
This merges minsec.toml with the drop-ins and compiles every enabled filter,
offline. Do this after every configuration change — the daemon doesn't
live-reload, and a bad regex should fail here, not at restart.
4. Start it
sudo systemctl enable --now minsec
minsec status
status reports the version, backend, uptime, and per-filter counters. Bans show up
in the kernel, not in a userspace list:
minsec list # what the daemon sees
sudo nft list set inet minsec ban4
5. Confirm a ban and unban
sudo minsec ban 203.0.113.7 --ttl 10m
minsec list
sudo minsec unban 203.0.113.7
minsec events -n 20 # JSON Lines: starts, bans, unbans
Manual bans are not reported to the crowd, so this is safe to try even with multiplayer mode on.
Where to go next
- Configuration — ban times, escalation, per-filter overrides.
- Filters — writing one for your own application.
- Multiplayer mode — opt in to the crowd blocklist.
- Cockpit module — a web UI for the above.