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
Commandité

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

Rechercher
Catégories
Lire la suite
Politically Incorrect
Political Patties
See topic story here... As someone who eats at Burger King about as often as I lay down in the...
Par Scathing Take 2020-07-21 04:23:29 0 5KB
Health
HÖCHSTE ZEIT, für die Kinder und die körperliche Unversehrtheit der Kinder AUFZUSTEHEN und dafür zu sorgen, dass die fahrlässige Körperverletzung - insbesondere durch FFP2 Masken - ENDLICH AUFHÖRT!!! 
Es ist HÖCHSTE ZEIT, für die Kinder und die körperliche Unversehrtheit der Kinder...
Par Medic Ineman9 2021-01-28 16:48:15 0 6KB
Autre
Protective Safeguards Condition Defeats Claim
Fraudulent Statements in Application Voids Coverage & Exclusion Applies Read the full article...
Par Barry Zalma 2020-12-21 13:28:28 0 4KB
Autre
Class Action Covid - 19 Case Fails for lack of Direct Physical Loss
No Matter How Many Times they Try Courts Find Direct Physical Loss is Required Read the full...
Par Barry Zalma 2021-04-16 12:46:16 0 4KB
Politics
Trump's approval at 53%
The Rasmussen Reports daily Presidential Tracking Poll for Wednesday shows that 53% of Likely U....
Par Meme King 2020-11-12 16:26:57 0 3KB