Simple replacement for fail2ban.
This application requires libsystemd to be installed on your system.
Install the development package for your distribution:
- Debian/Ubuntu:
sudo apt-get install libsystemd-dev - Fedora/RHEL:
sudo dnf install systemd-devel - Arch Linux:
sudo pacman -S systemd-libs - Alpine Linux:
sudo apk add systemd-dev
Installation via cargo:
rustup update stable
git clone https://github.com/potoo0/logban && cd logban
SQLX_OFFLINE=true cargo install --path . --locked- Download the latest release binary
- Set the
PATHenvironment variable
$ logban -h
Usage: logban [OPTIONS]
Options:
-c, --config <CONFIG> [default: config.yaml]
-n, --dry-run
-l, --log-level <LOG_LEVEL> Set the log level (overrides env var), eg: info,logban=trace
-h, --help Print help
-V, --version Print version
Example:
logban -c config.example.yaml -l debug,logban=trace,sqlx=infoBy default, the application looks for a config.yaml file in the current directory.
To use a different file, you can specify a custom path using the -c or --config option.
A comprehensive example with all available settings can be found in config.example.yaml, which is a great starting point for creating your own configuration.
This project is in early stages of development, and is not yet ready for production use. If you would like to contribute, please feel free to submit a pull request or open an issue.
# build with db
echo 'DATABASE_URL=sqlite://logban.db' >> .env
sqlx database create
sqlx migrate run
cargo sqlx prepare # saving query metadata for offline mode
# or build with offline mode
SQLX_OFFLINE=true cargo build