Skip to content

🔎 A Bash script to print out the Fail2Ban log in a organized way.

License

Notifications You must be signed in to change notification settings

NullDev/Fail2Ban-Log-Viewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fail2Ban Log Viewer

Build Status GitHub license

A script to print out the Fail2Ban log in a organized way.

To get it working:

  • Upload the script somewhere
  • Log in to your SSH terminal
  • make it executable with chmod +x fail2ban.sh
  • and finally launch it with ./fail2ban.sh

That's it.

Features:

  • 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!

Screenshots:


       Main       



       Help