Update v-add-firewall-ban: nginx deny rules conf

This commit is contained in:
myvesta 2024-11-19 21:59:09 +01:00 committed by GitHub
parent 015b3c4571
commit 6a35d14f0c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -74,9 +74,11 @@ chmod 660 $conf
# nginx deny rules conf
if [ "$chain" = "WEB" ] && [ -f "/etc/nginx/conf.d/block.conf" ]; then
if ! grep -q "deny $ip;" /etc/nginx/conf.d/block.conf; then
echo "deny $ip;" >> /etc/nginx/conf.d/block.conf
systemctl reload nginx
fi
fi
#----------------------------------------------------------#
# Vesta #