LibreNMS - snmp extend fail2ban

From Wiki.IT-Arts.net
Revision as of 11:03, 1 May 2020 by imported>Z (Created page with "Category:Post-It = NginX LibreNMS script = Get the script: <nowiki> wget https://github.com/librenms/librenms-agent/raw/master/snmp/fail2ban -O /etc/snmp/fail2ban</no...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)



NginX LibreNMS script

Get the script:

wget https://github.com/librenms/librenms-agent/raw/master/snmp/fail2ban -O /etc/snmp/fail2ban

Unzip and copy it where you need. Make it executable.


sudo Configuration

Adapt your /etc/sudoers with:

Debian-snmp ALL=(ALL) NOPASSWD: /etc/snmp/fail2ban


SNMP Configuration

Adapt your /etc/snmp/snmpd.conf with:

extend nginx /usr/bin/sudo /etc/snmp/nginx

Restart the service.


Check Command

Adapt the user and path to your configuration:

sudo -u Debian-snmp /etc/snmp/fail2ban

In case of bug with the Perl @NIC, execute:

cpan JSON


Sources