fixed, and renamed, firewall blacklist scripts
This commit is contained in:
parent
e0e9b2ef03
commit
47b398a778
|
@ -8,7 +8,7 @@ else
|
|||
exit 1
|
||||
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."
|
||||
|
|
@ -8,7 +8,7 @@ else
|
|||
exit 1
|
||||
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 --permanent --ipset=blacklist --remove-entry=$IP
|
Loading…
Reference in New Issue
Block a user