diff --git a/DROP-google-cloud b/DROP-google-cloud new file mode 100755 index 0000000..dced915 --- /dev/null +++ b/DROP-google-cloud @@ -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