Fail2abuseipdb
A simple application for converting fail2ban's jail output to an abuseipdb-compatible CSV
|
fail2abuseipdb is a server administration tool (currently WIP!) which allows server administrators to easily and automagically convert fail2ban's output (which a weird semi-JSON format) to a CSV-format which can directly be published to abuseipdb!
fail2abuseipdb provides a limited featureset, although it is enough for its task.
The following table describes the individual arguments and switches fail2abuseipdb understands. Arguments and switched marked as ((planned)) are not use available (or usable)!
Long | Short | Description | Status |
---|---|---|---|
–help | -h | Prints the help menu and exits. | working |
–stdin | -s | Reads input from stdin (pipe). | working |
–file= | -f[f] | Reads input from the passed file or fail2ban.json if no file passed. | working |
–version | -v | Prints the version information and exits. | ((planned)) |
–comment | -c | Overrides the default value for the comment. Must be in quotes (")! | working |
--jail-name= | -j[j] | Useful when importing single jails; sets the name for the jail. | working |
--f2b= | -e[f] | Sets the location of fail2ban directory | working |
--call-f2b | -% | No, that's not a typo. Call fail2ban directly | (kinda)working |
Variable | Function | Status |
---|---|---|
{0} | Prints the jail name in the comment. | working |
{1} | Prints the report time in the comment. | ((planned)) |
Code | Meaning |
---|---|
0 | Success |
1 | Failed to parse input from file |
2 | Failed to parse input from stdin |
3 | Failed to parse input from fail2ban directly |
4 | Insufficient execution rights |
5 | Could not find fail2ban-client |
Getting started with fail2abuseipdb is simple. Install the file to /usr/bin (or where ever in your PATH) and call it as follows.
If you don't trust the .deb packages uploaded in the releases, or your system doesn't use .deb packages, you can download, build and install the application yourself.
To do so is fairly simple:
v0.2.0b
New features:
New bugs:
fail2abuseipdb -% -e$(which fail2ban-client)
v0.1.0b
In no particular order, the to-dos are as follows. I just hope I update them 🫣
1) Add version information during build Working 2) Add install target Working 3) Add remove target Use deb instead 4) Build deb-package?! Working 5) Add pipe support Working 6) Add support for calling fail2ban directly Working, except for automagic search 7) Clean up code for first real release 8) Add debug messages (printed to stderr) 9) Unit tests? Don't really care for them 10) Add support for adding/overriding categories (both default and per jail)