1
0
mirror of https://github.com/librenms/librenms-agent.git synced 2024-05-09 09:54:52 +00:00

add fail2ban snmpd extend script

This commit is contained in:
VVelox
2017-02-16 10:50:46 -06:00
committed by GitHub
parent 677bd4187e
commit 1ec8f204ee

15
snmp/fail2ban Normal file
View File

@ -0,0 +1,15 @@
#!/bin/sh
# Addthis to snmpd.conf as below.
# extend fail2ban /etc/snmp/fail2ban
#
# Also please verify your fail to ban instalation for proper table/chain names.
if [ `uname` = "FreeBSD" ]; then
/sbin/pfctl -t fail2ban -T show | /usr/bin/grep -c .
fi
if [ `uname` = "Linux" ]; then
iptables -L -n | grep -c f2b\-
fi
exit 0;