Spamhaus daily bad IP autoblocker script

2
6KB

 

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
Gesponsert

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
Nach Verein filtern
Read More
Other
A Video Explaining Some Advertising Injury Claims
Advertising Injury/Wrongful Solicitation of Customers Read the full article at...
Von Barry Zalma 2020-12-23 14:12:26 0 4KB
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...
Von Scarecrow III 2020-10-31 23:44:51 0 6KB
Other
She Did It
She Did It! Read the full article at https://lnkd.in/gDqZ7zNb and see the full video at...
Von Barry Zalma 2023-03-06 13:57:27 1 3KB
Home
A STAR GAZER, THOUSANDS OF YEARS AGO TOLD ME THIS
The one who is not created cannot be grasped in the imagination. Indeed all things become clear...
Von Nibbie Chase 2020-06-17 12:44:37 0 6KB
Finance
Undisclosed Intent does not Create Coverage
Failure to Advise Insurer of New Car Fatal to Claim Read the full article at...
Von Barry Zalma 2022-07-26 13:07:02 0 3KB