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
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
Theater
MoveOnOrgy investing millions to foil Trump's Plans!
Dear MoveOn member Stupid Sheep, CNN FakeNewsNetwork has released a series of shocking text...
Por TKDRL Mogwai 2022-04-24 23:20:32 0 5KB
Outro
FAKE APPLICATIONS COSTS AGENT HIS LICENSE
FAKE APPLICATIONS COSTS AGENT HIS LICENSE Read the full article at https://lnkd.in/gWaRhXMa and...
Por Barry Zalma 2024-01-26 14:00:12 0 3KB
Outro
Canada's Permanent Mission to the UN
https://ifthetruthbetold.blog/2019/01/22/nwo-un-elites/comment-page-1/#comment-191
Por Louis Gacsi 2020-12-08 15:52:02 0 5KB
Outro
Rejection of UM Remains Through Multiple Renewals
Change in Statute Has no Effect on Rejection of UM Coverage Read the full article at...
Por Barry Zalma 2021-02-10 13:33:12 0 4KB
Outro
A Video Explaining Controls on the Assessment of Punitive Damages
Control on Punitive Damages Read the full article at...
Por Barry Zalma 2020-12-04 13:59:55 0 5KB