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
Sponsorizzato

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

Cerca
Categorie
Leggi tutto
Politics
2-year-old punched in the face by panhandler on Manhattan subway: cops
A 2-year-old boy was slugged in the face by a violent panhandler on a Manhattan subway train...
By Wym Creator 2021-02-22 19:02:54 1 7K
Politics
Does it help to recognise that the organised mayhem is not just in the US but is all part of the Oligarchy's plan for chaos?
Aside from the inability of the emotionally disturbed to understand jokes, there is the over 100...
By Scarecrow III 2020-10-30 15:26:54 0 5K
Politics
‘Maybe You Shouldn’t Even Want To Have Sex With Me’: Tlaib Rants About Sex At DC Abortion Rally
Democratic Michigan Rep. Rashida Tlaib ranted about abortion access and who should not have sex...
By Wym Creator 2020-03-06 17:07:19 7 10K
Health
Coronavirus: US in emergency rate cut as coronavirus spreads
The US central bank has slashed interest rates in response to mounting concerns about the...
By Wym Creator 2020-03-03 16:43:37 0 5K
Politically Incorrect
WHO Needs’m? [Re-Uploaded]
https://archive.ph/qCWMD Let me ask you something – if you were to say…hire a lawn...
By Scathing Take 2020-05-04 23:24:30 0 4K