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
Patrocinado

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

Pesquisar
Categorias
Leia Mais
Outro
Federal Jurisdiction
Federal Jurisdiction Requires a Federal Issue Contract Interpretation is a Matter of State...
Por Barry Zalma 2024-10-25 12:36:54 0 695
Health
Never Lie on an Insurance Application
Material Misrepresentation on Application Sufficient to Rescind Disability Coverage Read the full...
Por Barry Zalma 2022-09-14 12:55:01 0 5K
Outro
Liability Insurance Only Protects Damage to Ohers
Third Party Insurance Only Protects Damage to Other than the Insured Read the full article at...
Por Barry Zalma 2023-02-03 13:52:15 0 3K
Outro
A Video of a True Crime Story of Insurance Fraud
The Flying Carpet Read the full article at https://youtu.be/lQ0gk1LahNM and see the full video at...
Por Barry Zalma 2021-04-12 12:59:44 0 5K