You can check if an IP address is challenge listed or block listed or even if the country of the IP address is blocked.
You can check if your server is trying to connect to a challenge listed IP address with this command:
watch -n.1 "netstat -lntpa | grep -v bit"
You can just search for the IP address on the Dashboard to see if the IP address is challenge listed, block listed or the country is blocked where the IP address is located.
- Enter the IP address that you would like to check in to the search field at the top of your Dashboard
- You can see a summary of the IP address’ reputation
- If you see a -CHALLENGE LIST/-BLOCK LIST button then the IP address is on your account level challenge list or block list You can delist the Ip address from your account by clicking on this button.
If you would like to check multiple IP addresses then you will need to do it via the CLI using a script.
- Create a file called iplist.txt and insert the Ip addresses you would like to check
nano iplist.txtand paste the IP addresses and then press ctrl+ x then y then enter
- Make a file called CheckIfBlocked.sh and paste the text below into it
#!/bin/bash touch ResultOfChecking.txt while read line; do echo $line > /dev/null; for set in $(ipset -L -n) do ipset test $set $line if [ $? = 0 ] then echo $line is blocked by $set >> ResultOfChecking.txt fi done &> /dev/null done < $1 echo "Done! Please open ResultOfChecking.txt"
- Issue the command
chmod +x CheckIfBlocked.shso it will be executable
- Run the command and pass the
iplist.txtfile as a parameter to it with
- Open the result file with
Now you can see whether the IP is being blocked by BitNinja or not.