fixed, and renamed, firewall blacklist scripts

This commit is contained in:
Matthew Saunders Brown 2022-12-20 14:49:52 -08:00
parent e0e9b2ef03
commit 47b398a778
2 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ else
exit 1 exit 1
fi fi
if [[ firewall-cmd --ipset=blacklist --query-entry $IP >/dev/null ]]; then if [[ `firewall-cmd --ipset=blacklist --query-entry $IP` = "yes" ]]; then
echo "IP $IP already in blacklist. Doing nothing." echo "IP $IP already in blacklist. Doing nothing."

View File

@ -8,7 +8,7 @@ else
exit 1 exit 1
fi fi
if [[ firewall-cmd --ipset=blacklist --query-entry $IP >/dev/null ]]; then if [[ `firewall-cmd --ipset=blacklist --query-entry $IP` = "yes" ]]; then
firewall-cmd --ipset=blacklist --remove-entry=$IP firewall-cmd --ipset=blacklist --remove-entry=$IP
firewall-cmd --permanent --ipset=blacklist --remove-entry=$IP firewall-cmd --permanent --ipset=blacklist --remove-entry=$IP