Spamhaus daily bad IP autoblocker script

2
6K

 

curl -s https://www.spamhaus.org/drop/drop.txt >drop.txt

 

cut -d' ' -f 1 drop.txt >drop2.txt

mv drop2.txt drop.txt

grep -v '^{;}' drop.txt >drop2.txt

 

echo "#!/bin/sh" >script

 

cat drop3.txt | while read line

do

# $line="$line{var ;*}"

echo iptables -A INPUT -s $line -j DROP >>script

echo iptables -A OUTPUT -s $line -j DROP >>script

 

done

 

curl -s https://www.spamhaus.org/drop/edrop.txt >drop.txt

 

cut -d' ' -f 1 drop.txt >drop2.txt

mv drop2.txt drop.txt

grep -v '^{;}' drop.txt >drop2.txt

 

echo "#!/bin/sh" >script

 

cat drop3.txt | while read line

do

# $line="$line{var ;*}"

echo iptables -A INPUT -s $line -j DROP >>script

echo iptables -A OUTPUT -s $line -j DROP >>script

 

done

 

chmod 777 script

sh script

Like
1
Patrocinados

We are 100% funded for October.

Thanks to everyone who helped out. 🥰

Xephula monthly operating expenses for 2024 - Server: $143/month - Backup Software: $6/month - Object Storage: $6/month - SMTP Service: $10/month - Stripe Processing Fees: ~$10/month - Total: $175/month

Xephula Funding Meter

Please Donate Here

Buscar
Categorías
Read More
Crime
Arson is not Evidence of Love
Read the full article at https://lnkd.in/gNAtuqaq and see the full video at...
By Barry Zalma 2022-11-18 13:43:39 0 5K
Religion
Psalms 119:98-100
As I glance over Psalm 119:98–100, I see three benefits gained by those who absorb the...
By Alamo NLP 2022-02-08 16:22:24 0 5K
Other
A Video Explaining the Discoverability of a Claims File
The Attorney Client Privilege and Work Product Protection and the Insurance Claims File Read the...
By Barry Zalma 2021-02-25 14:02:50 0 5K