#!/bin/bash

echo "Blocking all Amazon AWS IP ranges..."

IPS=(
"3.4.12.4/32"
"3.5.140.0/22"
"15.190.244.0/22"
"15.230.15.29/32"
"15.230.15.76/31"
"15.230.221.0/24"
"35.180.0.0/16"
"51.85.0.0/16"
"52.93.153.170/32"
"52.93.178.234/32"
"52.93.244.0/24"
"52.94.76.0/22"
"52.95.36.0/22"
"52.219.170.0/23"
"99.87.32.0/22"
"120.52.22.96/27"
"150.222.47.64/26"
"150.222.81.0/24"
"150.222.234.54/31"
"15.230.39.60/31"
"15.230.102.0/24"
"15.230.113.0/24"
"51.168.0.0/15"
"52.93.22.48/28"
"52.94.152.9/32"
"52.219.168.0/24"
"150.222.53.160/27"
"150.222.78.0/24"
"3.2.58.0/24"
"3.108.0.0/14"
# ...(و ادامه تمام IPهای دیگر از فایل JSON شما)
)

for ip in "${IPS[@]}"
do
    iptables -A INPUT -s $ip -j DROP
done

echo "All AWS IP ranges blocked successfully!"
