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
Sponsored

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

Search
Categories
Read More
Other
Evaluation and Settlement of Liability Claims
A Video Explaining Evaluation & Settlement Read the full article at...
By Barry Zalma 2021-09-21 12:50:36 0 3K
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
Finance
Subrogating Insurer Has No More Rights than the Insured
Insured & Insurer Had no Right Against Tenant for Failure to Provide Notice Read the full...
By Barry Zalma 2022-04-08 13:08:06 0 3K
Politically Incorrect
What does extortion look like at the base level of human depravity?
And if you are lacking your laugh today, there is this poor wanker....  a pillock of the...
By Scarecrow III 2020-10-29 18:34:02 0 4K
Other
Zalma’s Insurance Fraud Letter – April 15, 2024
Zalma’s Insurance Fraud Letter – April 15, 2024 'Read the full article at...
By Barry Zalma 2024-04-15 13:27:49 0 1K