It seems that the last answer in the post is the most efficient way to add firewall rules with that many IP ranges, and using this gcloud command. Generally, here is a good document on using firewall rules that should help.
There are too many IP ranges for any given country to try to efficiently add them to a deny firewall rule. Maybe using Cloud Armor would be a good alternative as the security policy can be configured for a region. Though, you may need to verify the cost of the solution if it would be beneficial for your use-case.
It seems that the last answer in the post is the most efficient way to add firewall rules with that many IP ranges, and using this gcloud command. Generally, here is a good document on using firewall rules that should help.
There are too many IP ranges for any given country to try to efficiently add them to a deny firewall rule. Maybe using Cloud Armor would be a good alternative as the security policy can be configured for a region. Though, you may need to verify the cost of the solution if it would be beneficial for your use-case.
--
© 2018 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-dis...@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.
---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussio...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gce-discussion/593c4fbe-ff84-4406-b562-46852233973fn%40googlegroups.com.
Concerning the Private message about the syntax error “ bash No such file ..” when using the gcloud command, you would need to remove the characters < > in the project ID such as:
gcloud compute --project=projectID …
The SDK does not consider the operators as part of the project ID and throws the error. This is mainly because it expects the project ID to start with a letter. This is explained in this document. I hope this helps.