Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

fail2ban

Rating
0 votes
Favoured:
0
Current Version
1.0
Last Release Date
2020-03-22
Compatible With
  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x
  • Nagios 4.x
  • Nagios XI
License
GPL
Hits
475
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
This plugin checks your Server for banned IPs by fail2ban.
### Installation
This plugin requires fail2ban and sudo installed. Also several commands must be runnable by nagios user with sudo, so add the following to visudo:

# Needed for check_fail2ban
nagios ALL=NOPASSWD: /usr/bin/fail2ban-client status
nagios ALL=NOPASSWD: /usr/bin/fail2ban-client status *
nagios ALL=NOPASSWD: /usr/bin/fail2ban-client get * banip
nagios ALL=NOPASSWD: /usr/bin/fail2ban-client get * banip --with-time
nagios ALL=NOPASSWD: /usr/bin/fail2ban-client get * bantime
### Usage
./check_fail2ban -h Display this message
-w defaults to 10
-c defaults to 20
-t Time: Display until when IPs will be banned
-j i.e. comma separated string of jails, i.e. ssh,postfix
Only check those jails
###Examples
./check_fail2ban -t -w 5 -c 10 -j ssh,postfix
./check_fail2ban -t