Last active
October 27, 2016 20:12
-
-
Save akrasic/1dd583fc71f10f7950708c21fbc760c7 to your computer and use it in GitHub Desktop.
Check CSF for IP blocks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ipfile=$1 | |
| for i in $(cat $ipfile); do | |
| if ! csf -g $i | grep -q "No matches"; then | |
| echo "IP $i blocked" | |
| grep $i /etc/csf/csf.deny | |
| echo "" | |
| fi | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment