71 lines
2.3 KiB
Bash
71 lines
2.3 KiB
Bash
#! /bin/bash
|
|
|
|
|
|
#### Variables
|
|
seedlist_dir=/var/lib/ipset
|
|
update=/usr/local/bin/ufw-blocklists.sh
|
|
blists=$(find "$seedlist_dir" -name "*-inet.save")
|
|
blists6=$(find "$seedlist_dir" -name "*-inet6.save")
|
|
|
|
#### Check for SeedList Dir ####
|
|
if [ ! -d "$seedlist_dir" ]; then
|
|
echo "ERROR: ipset data directory does not exist" >&2
|
|
exit 2
|
|
fi
|
|
#### Update Ipv4 Blocklist ####
|
|
for seeds in $blists
|
|
do
|
|
seedlists=$(basename -s ".save" "$seeds")
|
|
if [ "$seedlists" = bl-bdsatib-inet ]; then
|
|
$update -l "bdsatib https://www.binarydefense.com/banlist.txt"
|
|
fi
|
|
|
|
if [ "$seedlists" = bl-bfblocker-inet ]; then
|
|
$update -l "bfblocker https://danger.rulez.sk/projects/bruteforceblocker/blist.php"
|
|
fi
|
|
|
|
if [ "$seedlists" = bl-cinsarmy-inet ]; then
|
|
$update -l "cinsarmy http://cinsscore.com/list/ci-badguys.txt"
|
|
fi
|
|
|
|
if [ "$seedlists" = bl-drop-inet ]; then
|
|
$update -l "drop https://www.spamhaus.org/drop/drop.txt"
|
|
fi
|
|
|
|
if [ "$seedlists" = bl-dshield-inet ]; then
|
|
$update -l "dshield https://iplists.firehol.org/files/dshield.netset"
|
|
fi
|
|
|
|
if [ "$seedlists" = bl-edrop-inet ]; then
|
|
$update -l "edrop https://www.spamhaus.org/drop/edrop.txt"
|
|
fi
|
|
|
|
if [ "$seedlists" = bl-f2ball-inet ]; then
|
|
$update -l "f2ball https://lists.blocklist.de/lists/all.txt"
|
|
fi
|
|
|
|
if [ "$seedlists" = bl-firehol1-inet ]; then
|
|
$update -l "firehol1 https://iplists.firehol.org/files/firehol_level1.netset"
|
|
fi
|
|
|
|
if [ "$seedlists" = bl-greensnow-inet ]; then
|
|
$update -l "greensnow https://blocklist.greensnow.co/greensnow.txt"
|
|
fi
|
|
|
|
if [ "$seedlists" = bl-ipsuml2-inet ]; then
|
|
$update -l "ipsuml2 https://raw.githubusercontent.com/stamparm/ipsum/master/levels/2.txt"
|
|
fi
|
|
|
|
if [ "$seedlists" = bl-maxmind-inet ]; then
|
|
$update -l "maxmind https://www.maxmind.com/en/anonymous_proxies"
|
|
fi
|
|
done
|
|
|
|
#### Update Ipv6 Blocklist ####
|
|
for seeds in $blists6
|
|
do
|
|
seedlists=$(basename -s ".save" "$seeds")
|
|
if [ "$seedlists" = bl-dropv6-inet ]; then
|
|
$update -l "dropv6 https://www.spamhaus.org/drop/dropv6.txt"
|
|
fi
|
|
done |