Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Network Engineer practice bank has an additional 2,437 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
Your organization has a Platform folder (containing a Shared VPC host project with prod-shared-vpc) and a Workloads folder (containing a service project attached to prod-shared-vpc and a standalone project with dev-vpc). You must implement a firewall strategy that meets these requirements:
25 traffic across all projects and VPC networks in the organization by default.25 traffic only for service project VMs in prod-shared-vpc running with the mailer-sa service account, while blocking all other VMs in prod-shared-vpc.25 block in dev-vpc or any future VPCs.Which configuration should you implement?
Workloads folder with an egress goto_next rule at priority 100 targeting prod-shared-vpc for TCP port 25, and an egress deny rule at priority 200 for TCP port 25 to 0.0.0.0/0. 2. In prod-shared-vpc, create a VPC egress allow rule at priority 900 targeting mailer-sa for TCP port 25, and a VPC egress deny rule at priority 1000 for TCP port 25 to 0.0.0.0/0.
This configuration creates the hierarchical firewall policy with goto_next and deny rules and properly orders the VPC firewall rules (900 and 1000), but associates the hierarchical firewall policy only with the Workloads folder rather than the organization node.
prod-shared-vpc resides in the Platform folder, associating the policy with Workloads has no effect on prod-shared-vpc interfaces—even for VMs located in the Workloads service project.Workloads leaves Platform, any other existing folders, and any future projects created outside Workloads completely unprotected against egress TCP port 25 traffic.Platform -> organization), regardless of which folder the service projects reside in.Workloads can still use the implied allow egress rule on TCP port 25.This answer would be correct if the hierarchical firewall policy were associated with the organization node instead of the Workloads folder, ensuring uniform governance across Platform, Workloads, and all future folders.
A frequent exam misconception is assuming that firewall policies follow a VM's compute project folder in Shared VPC. Because Google Cloud enforces VPC firewalling at the virtual network interface attached to the VPC network, the host project's folder and organization policies always govern Shared VPC traffic.
goto_next rule at priority 100 targeting prod-shared-vpc for TCP port 25, and an egress deny rule at priority 200 for TCP port 25 to 0.0.0.0/0. 2. In prod-shared-vpc, create a VPC egress allow rule at priority 1000 targeting mailer-sa for TCP port 25, and a VPC egress deny rule at priority 1000 for TCP port 25 to 0.0.0.0/0.
This configuration correctly associates the hierarchical firewall policy at the organization node and uses goto_next at priority 100 to delegate prod-shared-vpc traffic down to VPC firewall rules. However, inside prod-shared-vpc, it assigns the same priority (1000) to both the selective allow rule and the broad deny rule.
deny override: In VPC firewall rule evaluation, when two matching rules share the exact same priority (1000), a deny action always overrides an allow action. As a result, traffic from VMs running with mailer-sa matches both rules at priority 1000 and is blocked.mailer-sa) over a broader target (all instances in the network) when their priority numbers are identical.1000.deny rule is enforced and the allow rule is ignored.25 outage: Neither authorized mailer-sa VMs nor unauthorized VMs in prod-shared-vpc can send outbound TCP port 25 traffic.This answer would be correct if the allow rule targeting mailer-sa were assigned a higher priority (a lower integer) than the broad deny rule—for example, priority 900 for the allow rule and priority 1000 for the deny rule.
Administrators accustomed to longest-prefix or most-specific-match routing often assume target specificity (mailer-sa vs. all instances) breaks ties in firewall evaluation. In Google Cloud VPC firewalls, numerical priority is evaluated strictly first, and equal-priority conflicts always resolve in favor of deny.
goto_next rule at priority 100 targeting prod-shared-vpc for TCP port 25, and an egress deny rule at priority 200 for TCP port 25 to 0.0.0.0/0. 2. In prod-shared-vpc, create a VPC egress allow rule at priority 900 targeting mailer-sa for TCP port 25, and a VPC egress deny rule at priority 1000 for TCP port 25 to 0.0.0.0/0.
This solution combines an organization-level hierarchical firewall policy with prioritized VPC firewall rules in the Shared VPC host network to enforce global security guardrails while delegating granular workload exceptions. Hierarchical firewall policies sit at the top of the Cloud NGFW evaluation order, ensuring rules attached to the organization node are evaluated before any folder policies, network firewall policies, or traditional VPC firewall rules.
dev-vpc and prod-shared-vpc—inherits the rules. Any traffic on TCP port 25 outside prod-shared-vpc skips priority 100 and matches the priority 200 deny rule, immediately terminating evaluation.prod-shared-vpc match the priority 100 goto_next rule targeting prod-shared-vpc. Rather than permitting traffic outright, goto_next delegates evaluation down to prod-shared-vpc's VPC firewall rules.prod-shared-vpc, the VPC egress allow rule at priority 900 targeting mailer-sa has higher precedence (lower numerical value) than the broad VPC egress deny rule at priority 1000. VMs with mailer-sa are permitted, whereas all other VMs fall through to priority 1000 and are blocked before reaching the implied allow egress rule.deny at priority 200 terminates evaluation, project administrators in dev-vpc or other projects cannot create VPC firewall rules to override it.--target-resources), enabling clean exceptions inside restrictive policies.goto_next action passes packet evaluation downward without prematurely authorizing traffic.900 vs. 1000) ensures the allow rule is not overridden by an equal-priority deny rule.Using goto_next at the organization level paired with strictly ordered VPC priorities (900 before 1000) avoids both overly permissive allow short-circuiting at the organization tier and equal-priority deny overrides at the VPC tier.
allow rule at priority 100 targeting prod-shared-vpc for TCP port 25, and an egress deny rule at priority 200 for TCP port 25 to 0.0.0.0/0. 2. In prod-shared-vpc, create a VPC egress allow rule at priority 900 targeting mailer-sa for TCP port 25, and a VPC egress deny rule at priority 1000 for TCP port 25 to 0.0.0.0/0.
This configuration attaches a hierarchical firewall policy to the organization node using an allow action at priority 100 for prod-shared-vpc, followed by a deny rule at priority 200 for all other networks, while also defining 900 and 1000 VPC firewall rules inside prod-shared-vpc.
allow action permits the matching traffic and immediately stops all further firewall rule evaluation. When a VM in prod-shared-vpc sends outbound TCP port 25 traffic, it matches priority 100 (allow) and never reaches the VPC firewall rules defined in prod-shared-vpc.mailer-sa VMs: Because the priority 1000 VPC deny rule in prod-shared-vpc is never evaluated, every VM in prod-shared-vpc—not just those using mailer-sa—is allowed to send outbound TCP port 25 traffic.allow and deny: Both allow and deny actions in hierarchical firewall policies are terminal actions; Cloud NGFW stops processing lower-level folder, network, or VPC rules once either matches.goto_next: Only goto_next (or an implicit non-match) passes packet evaluation down to lower levels in the evaluation hierarchy.900 and 1000 VPC rules in prod-shared-vpc become unreachable dead rules for TCP port 25 egress traffic.This answer would be correct if the priority 100 rule in the hierarchical firewall policy used the goto_next action instead of allow, or if every VM in prod-shared-vpc were intended to have unrestricted outbound access on TCP port 25.
A common misconception is that a hierarchical allow rule merely permits traffic to pass through the organization tier to be filtered again by VPC firewall rules. In Google Cloud, firewall evaluation is not cumulative across layers unless goto_next is explicitly used or no rule matches at the higher layer.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated