block proxies and abusers

This commit is contained in:
bunkerity
2020-10-04 21:07:39 +02:00
parent 3a9afa47b6
commit f4c43a2148
6 changed files with 48 additions and 8 deletions

10
scripts/abusers.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/sh
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
done
if [ -f /run/nginx/nginx.pid ] ; then
/usr/sbin/nginx -s reload
fi

View File

@@ -1,11 +1,10 @@
#!/bin/sh
BLACKLIST=$(curl -s "https://iplists.firehol.org/files/tor_exits.ipset")
DATA=""
for ip in $BLACKLIST ; do
DATA="${DATA}deny ${ip};\n"
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
done
echo $DATA > /etc/nginx/block-tor-exit-node.conf
if [ -f /run/nginx/nginx.pid ] ; then
/usr/sbin/nginx -s reload
fi

10
scripts/proxies.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/sh
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
done
if [ -f /run/nginx/nginx.pid ] ; then
/usr/sbin/nginx -s reload
fi