display fail2ban.log and logging bug fix

This commit is contained in:
bunkerity
2020-10-24 20:48:04 +02:00
parent 4c11a9125c
commit 022a653ebc
7 changed files with 18 additions and 48 deletions

View File

@@ -3,7 +3,10 @@
echo "" > /etc/nginx/block-abusers.conf
curl -s "https://iplists.firehol.org/files/firehol_abusers_30d.netset" | grep -v "^\#.*" |
while read entry ; do
echo "deny ${entry};" >> /etc/nginx/block-abusers.conf
check=$(echo $entry | grep -E "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/?[0-9]*$")
if [ "$check" != "" ] ; then
echo "deny ${entry};" >> /etc/nginx/block-abusers.conf
fi
done
if [ -f /tmp/nginx.pid ] ; then
/usr/sbin/nginx -s reload

View File

@@ -3,7 +3,10 @@
echo "" > /etc/nginx/block-tor-exit-node.conf
curl -s "https://iplists.firehol.org/files/tor_exits.ipset" | grep -v "^\#.*" |
while read entry ; do
echo "deny ${entry};" >> /etc/nginx/block-tor-exit-node.conf
check=$(echo $entry | grep -E "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/?[0-9]*$")
if [ "$check" != "" ] ; then
echo "deny ${entry};" >> /etc/nginx/block-tor-exit-node.conf
fi
done
if [ -f /tmp/nginx.pid ] ; then
/usr/sbin/nginx -s reload

View File

@@ -3,7 +3,10 @@
echo "" > /etc/nginx/block-proxies.conf
curl -s "https://iplists.firehol.org/files/firehol_proxies.netset" | grep -v "^\#.*" |
while read entry ; do
echo "deny ${entry};" >> /etc/nginx/block-proxies.conf
check=$(echo $entry | grep -E "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/?[0-9]*$")
if [ "$check" != "" ] ; then
echo "deny ${entry};" >> /etc/nginx/block-proxies.conf
fi
done
if [ -f /tmp/nginx.pid ] ; then
/usr/sbin/nginx -s reload