DROP google cloud

This commit is contained in:
Jeff Moe 2024-09-09 10:38:21 -06:00
parent 2c975ba4a8
commit 6ae6714d4d

12
DROP-google-cloud Executable file
View file

@ -0,0 +1,12 @@
#!/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