Is there a way to block incoming connections to Google Cloud from a specific set of IP addresses?
Our company website is hosted on GCE and I'd like to block few IP addresses that are currently scraping our site. I couldn't find any options in the "Firewall" section in the GCE console.
Thanks! Alex
The firewall in GCE is used to 'allow' incoming traffic and unfortunately cannot be used to create 'block' rules. In summary, almost everything is blocked by default and you need to create rules to allow incoming traffic.
Instead, you can use the firewall on the VM itself. For example, if you're running a Linux instance you can look into iptables
. Here's a Wikipedia article on it, but I highly recommend you go through the man pages for details. This way you can create a rule to block one particular IP address for example.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With