Skip to content

Instantly share code, notes, and snippets.

@matsubo
Last active June 29, 2020 06:38
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save matsubo/d1af5f79f404a17c571e91c598255a81 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -eu
date=`date +%s`
drop=`iptables -nL |grep f2b-blacklist -A 10000 | grep \^DROP|wc -l`
reject=`iptables -nL|grep f2b-sshd -A 10000|grep REJECT|wc -l`
echo -e "fail2ban.ipv4.drop\t${drop}\t${date}"
echo -e "fail2ban.ipv4.reject\t${reject}\t${date}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment