mirror of
https://github.com/myvesta/vesta
synced 2025-07-05 12:36:23 -07:00
nginx deny rules conf
This commit is contained in:
parent
a2ed0dbf7a
commit
015b3c4571
2 changed files with 10 additions and 0 deletions
|
@ -72,6 +72,11 @@ $iptables -I fail2ban-$chain 1 -s $ip \
|
|||
# Changing permissions
|
||||
chmod 660 $conf
|
||||
|
||||
# nginx deny rules conf
|
||||
if [ "$chain" = "WEB" ] && [ -f "/etc/nginx/conf.d/block.conf" ]; then
|
||||
echo "deny $ip;" >> /etc/nginx/conf.d/block.conf
|
||||
systemctl reload nginx
|
||||
fi
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Vesta #
|
||||
|
|
|
@ -53,6 +53,11 @@ $iptables -D fail2ban-$chain $b 2>/dev/null
|
|||
# Changing permissions
|
||||
chmod 660 $conf
|
||||
|
||||
# nginx deny rules conf
|
||||
if [ "$chain" = "WEB" ] && [ -f "/etc/nginx/conf.d/block.conf" ]; then
|
||||
sed -i "/deny $ip;/d" /etc/nginx/conf.d/block.conf
|
||||
systemctl reload nginx
|
||||
fi
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Vesta #
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue