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
Politics
Migrant Hiding on Texas Farm near Border Run Over, Killed by Tractor
From WWW.BREITBART.COM Uvalde County Sheriff Ruben Nolasco reported the death of a...
By Wym Creator 2021-07-25 14:37:27 0 5K
Politics
About the only alternative to the Hegelian Totalitarian governance model promulgated by the alternatives to the current President.
I cannot provide a sufficient introduction to this letter to the President.  It is from a...
By Scarecrow III 2020-10-31 23:44:51 0 6K
Other
Never Take the Fifth if You Want to Sue an Insurer
Don’t Take “The Fifth” When Your Insurer Requires An Examination Under Oath...
By Barry Zalma 2021-01-20 14:19:11 0 3K
Politics
COVID Death Toll up More Than 25% During Biden’s First Month in Office
As a presidential candidate, Joe Biden took a swaggering tone when asked about COVID-19 and said...
By Wym Creator 2021-02-22 13:31:06 2 5K