A Bash script to print out the Fail2Ban log in a organized way.
MIT License
A script to print out the Fail2Ban log in a organized way.
chmod +x fail2ban.sh
./fail2ban.sh
That's it.
Display Hostname and IP
Display IP and Auth Method used (For example SSH or Nginx Auth)
Allows a user specified path inside the script
Fallback path if user specified path fails
Auto-Search feature if Fallback path and user path fail
Purge/Clear the Fail2Ban.log after displaying
Example: ./fail2ban.sh --clear
or ./fail2ban.sh -c
Use new path if file was found
Check if Fail2Ban is installed
Able to pass CLI Argument -p
or --path
to use a custom path for the log file at start.
Example: ./fail2ban.sh -p /your/log/path.log
or ./fail2ban.sh --path /your/log/path.log
Able to handle unknown CLI Arguments, aswell as --help
, -h
or -?
Example: ./fail2ban.sh --help
, ./fail2ban.sh -h
or ./fail2ban.sh -?
CLI Argument --force
or -f
which forces the start and doesn't prompt for input
More comming soon!