DROP-big-tech/DROP-google-cloud
2024-09-09 10:38:21 -06:00

13 lines
347 B
Bash
Executable file

#!/bin/bash
wget -O /tmp/cloud.json https://www.gstatic.com/ipranges/cloud.json
grep "ipv4Prefix" /tmp/cloud.json | sort -V | \
cut -f 2 -d ":" | cut -f 2 -d '"' > /tmp/cloud-ipv4.txt
for i in `cat /tmp/cloud-ipv4.txt `
do echo "-A INPUT -p tcp -s $i -j DROP"
done > /tmp/google-cloud-ipv4-DROP.txt
cat /tmp/google-cloud-ipv4-DROP.txt