#!/bin/bash
# afrihost - script to reset all systems which could be possibly blocking an IP

# cpanel check
if ! [ -f "/usr/local/cpanel/cpanel" ]; then
       echo "No cpanel"
       exit
fi

iptables -F 
ipset flush 
ip route ls | grep prohibit | awk '{print $2}' | xargs -i ip route del prohibit {}
ps uawfx | grep SCREEN | grep ddos | grep -v grep  | awk  '{print $2}' | xargs -i kill -9 {} 
/usr/local/afribin/maintenance/firewall install
screen -dmS firehol /usr/local/afribin/ipsets/ipset_firehol_install
