From 60ba7ad89ca11e6d1d322c507d87a074c546d57b Mon Sep 17 00:00:00 2001 From: Enrico Lumetti Date: Fri, 17 Sep 2021 23:54:02 +0200 Subject: [PATCH] Add README --- README.md | 17 +++++++++++++++++ main.py => fail2ban-analyze.py | 0 2 files changed, 17 insertions(+) create mode 100644 README.md rename main.py => fail2ban-analyze.py (100%) diff --git a/README.md b/README.md new file mode 100644 index 0000000..d3086b0 --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# Fail2ban Analyze + +Analyze fail2ban logs to find most common ip's and plot histogram of access rates. + +## Example usage +Plot the histogram of the access hits +``` +zcat /var/log/fail2ban.log* | ./fail2ban-analyze.py histogram +``` +Rank IPs by bans, first 20 results +``` +zcat /var/log/fail2ban.log* | ./fail2ban-analyze.py rank 4 --only-bans --count 20 +``` +Rank all IPs by bans, clobber by first 2 subnets +``` +zcat /var/log/fail2ban.log* | ./fail2ban-analyze.py rank 2 --only-bans --count 20 +``` diff --git a/main.py b/fail2ban-analyze.py similarity index 100% rename from main.py rename to fail2ban-analyze.py