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

18 lines
399 B
Plaintext
Raw Normal View History

2017-02-16 10:50:46 -06:00
#!/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
2017-02-17 10:33:02 -06:00
f2b1=`iptables -L -n | grep -c f2b\`
f2b2=`iptables -L -n | grep -c fail2ban\`
2017-02-17 10:32:27 -06:00
expr $f2b1 + $f2b2
2017-02-16 10:50:46 -06:00
fi
exit 0;