Score:0

Possible to create policy limiting firewall rules in GCP?

za flag

Does anyone know if it's possible to create an organizational policy that would prevent the use of having a source set to 'any' for specific ports on firewall rules in GCP?

For example, I want to prevent users from creating firewall rules that use 'any' as a source for ports such as SSH, RDP, SQL, and so on.

Score:0
ng flag

Yes, it is possible to deny traffic from source "any" for specific protocols / ports. Refer to the below screenshot.

Refer to the screenshot

Hierarchical firewall policies are created at organization and folder nodes. Creating a policy does not automatically apply the rules to the node. Policies once created can be applied to any nodes in the organization. As said in the specifications of the Hierarchical firewall policies

Hierarchical firewall policies are containers for firewall rules. When you associate a policy with the organization or a folder, all rules are immediately applied. You can swap policies for a node, which automatically swaps all the firewall rules applied to virtual machine (VM) instances under that node. Each hierarchical firewall policy rule can include either IPv4 or IPv6 ranges, but not both.

Refer to the Create a Firewall Rule.

user3723206 avatar
za flag
TYVM for the info and links - greatly appreciated
John Hanley avatar
cn flag
@user3723206 - Although the information in this answer is good, it does not answer the question **How to create an organizational policy that would prevent the use of having a source set to 'any' for specific ports on firewall rules in GCP?**. To create such a policy requires using the CLI **gcloud** which this answer does not cover or even mention. I would like to see an answer with a real solution and not links to site documentation. Please uncheck the accept for this answer.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.