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
Sponsor

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

Zoeken
Categorieën
Read More
Art
Hip hop festival
This evening, I went to the 2nd annual Chattanooga Hip-hop appreciation festival at Miller Park....
By Bill Braski 2021-10-17 16:15:59 1 5K
Politics
If Kyle Doesn't Walk, All Bets For Rule Of Law Are Off
The major problem with the left/liberal view of things these days, is that they don't care about...
By Joe Fabio 2021-11-17 17:27:36 0 6K
Politically Incorrect
LEAKED!!! CANADA'S FRIGHTENING PLAN FOR LOCKDOWNS / RESET / INDEFINITE ISOLATION OF REFUSERS SET IN MOTION FOR 2021!!!
LEAKED!!! CANADA'S FRIGHTENING PLAN FOR LOCKDOWNS / RESET / INDEFINITE ISOLATION OF REFUSERS SET...
By Medic Ineman9 2020-10-14 16:02:10 0 7K
Music
Nerding out about Bitwig Studio and Music Production in General
I love Bitwig studio because it's one of those programs that can get so advanced and abstract in...
By Joe Fabio 2021-07-10 00:23:13 0 7K