Skip to content

Professional Cloud Network Engineer · Domain 6: Configuring, implementing and managing a cloud network security solution · 13% of the exam

Task 6.2: Configuring and managing NGFW policies and VPC Firewall rules.

The firewall strategy, effective rules under hierarchical policies, rules for GKE and load balancers, global, regional and hierarchical policies, layer 7 inspection, migrating VPC firewall rules, rule criteria and logging, micro-segmentation with secure tags and the Cloud NGFW tiers.

Study it

  • Cloud NGFW: VPC firewall rules, hierarchical, global and regional policies, secure tags, tiers and layer 7 inspection

    Partly covered by: VPC: Subnets, NAT & Firewalls

Sample questions

Try each one before opening the answer. Every option is explained, with the Google Cloud documentation page that proves it.

Question 1 · choose 1

A VM receives a TCP 443 packet from 198.51.100.7. The organization's hierarchical firewall policy has an ingress rule at priority 100 with goto_next for TCP 443 from 0.0.0.0/0. The folder's hierarchical policy has one ingress rule: allow TCP 443 from 203.0.113.0/24. The VPC network has a VPC firewall rule denying TCP 443 from 0.0.0.0/0 at priority 1000, and its global network firewall policy allows TCP 443 from 0.0.0.0/0 at priority 500. The network firewall policy enforcement order was never changed. What happens to the packet?

  1. AIt's denied by the VPC firewall rule, which is evaluated before the global network firewall policy
  2. BIt's allowed by the global network firewall policy's rule at priority 500, the better priority
  3. CIt's allowed by the folder policy's rule, because the organization rule passed TCP 443 down to the folder
  4. DIt's denied by the organization policy, because goto_next drops traffic that no lower level allows
Show the answer and why
  • AIt's denied by the VPC firewall rule, which is evaluated before the global network firewall policy

    Correct

    The organization rule hands off, the folder rule doesn't match, and with the default AFTER_CLASSIC_FIREWALL order the VPC rule decides next.

  • BIt's allowed by the global network firewall policy's rule at priority 500, the better priority

    Incorrect

    Priorities are compared within one policy or rule set; by default the VPC firewall rules are evaluated before the global network policy.

  • CIt's allowed by the folder policy's rule, because the organization rule passed TCP 443 down to the folder

    Incorrect

    The folder rule matches only 203.0.113.0/24; with no match there, evaluation continues to the next step.

  • DIt's denied by the organization policy, because goto_next drops traffic that no lower level allows

    Incorrect

    goto_next continues evaluation at the next level; it isn't a deny.

With the default AFTER_CLASSIC_FIREWALL enforcement order, Cloud NGFW evaluates hierarchical policies from the organization down through the folders, then VPC firewall rules, then the global network firewall policy. A goto_next action, or no matching rule in a hierarchical policy, continues to the next step, and the first matching allow or deny ends evaluation. With BEFORE_CLASSIC_FIREWALL, the network policy would be evaluated before the VPC rules.

Question 2 · choose 1

Two ingress VPC firewall rules apply to a VM, both at priority 1000: rule allow-https allows TCP 443 from 10.0.0.0/8, and rule deny-lab denies all TCP from 10.5.0.0/16. No hierarchical or network firewall policy applies. A client at 10.5.1.20 opens a connection to TCP 443 on the VM. What happens?

  1. AIt's allowed, because allow-https names the exact port while deny-lab covers all ports
  2. BIt's denied, because when an allow and a deny rule of the same priority both match, the deny rule is enforced
  3. CIt's allowed, because the first rule created is evaluated first when two rules have the same priority
  4. DIt's denied by the implied deny ingress rule, because two matching rules cancel each other out
Show the answer and why
  • AIt's allowed, because allow-https names the exact port while deny-lab covers all ports

    Incorrect

    VPC firewall rules aren't ranked by how specific their ports are; their priority and action decide.

  • BIt's denied, because when an allow and a deny rule of the same priority both match, the deny rule is enforced

    Correct

    Two matching VPC firewall rules must share a priority with different actions, and Cloud NGFW then enforces the deny rule.

  • CIt's allowed, because the first rule created is evaluated first when two rules have the same priority

    Incorrect

    Creation order plays no part; two matching rules at one priority resolve to the deny action.

  • DIt's denied by the implied deny ingress rule, because two matching rules cancel each other out

    Incorrect

    The matching rules don't cancel; the deny rule is enforced, and the implied rule applies only when nothing matches.

VPC firewall rules are evaluated from the highest priority (lowest number) to the lowest. When an allow rule and a deny rule with the same priority both match a packet, Cloud NGFW enforces the deny rule and ignores the allow rule. To let this client in, the allow rule needs a better priority or deny-lab a narrower scope.

Question 3 · choose 1

In one organization, VPC networks app-net and data-net are connected by VPC Network Peering. A network firewall policy on data-net must allow TCP 5432 to the database VMs only from app-net's order-service VMs, which are autoscaled with changing IP addresses and share their subnet with other workloads. Which source should the rule use?

  1. AA secure tag value from a GCE_FIREWALL tag key whose purpose-data is organization=auto, bound to the order-service VMs
  2. BA secure tag value from a GCE_FIREWALL tag key whose purpose-data names data-net, bound to the order-service VMs
  3. CA network tag order-service, added to the order-service VMs in app-net
  4. DThe primary IPv4 range of the app-net subnet where the order-service VMs run
Show the answer and why
  • AA secure tag value from a GCE_FIREWALL tag key whose purpose-data is organization=auto, bound to the order-service VMs

    Correct

    Secure tags can identify VM interfaces in peered networks, and an organization-wide tag key covers the VMs' interfaces in app-net.

  • BA secure tag value from a GCE_FIREWALL tag key whose purpose-data names data-net, bound to the order-service VMs

    Incorrect

    A tag key scoped to data-net only includes the VMs' network interfaces in data-net; the order-service VMs have theirs in app-net.

  • CA network tag order-service, added to the order-service VMs in app-net

    Incorrect

    A network tag of a VM in a peered network can't be referenced in a firewall rule of the other network.

  • DThe primary IPv4 range of the app-net subnet where the order-service VMs run

    Incorrect

    The subnet also hosts other workloads, so its range would admit more than the order-service VMs.

Secure tags are IAM-governed and map to VM network interfaces rather than to addresses, so they follow autoscaled VMs. A GCE_FIREWALL tag key's purpose-data decides which interfaces count: a single named network, or every network of the organization with organization=auto. Secure tags also work for interfaces in networks connected by VPC Network Peering, unlike network tags.

Question 4 · choose 1

A project has three VPC networks that must enforce the same set of network firewall rules, maintained in one place by the project's network team. Which firewall strategy fits?

  1. AOne global network firewall policy associated with all three networks
  2. BThree copies of the same VPC firewall rules, one set per network
  3. CTwo global network firewall policies on each network, one for allow rules and one for deny rules
  4. DA global network firewall policy in each network's own project, shared through VPC Network Peering
Show the answer and why
  • AOne global network firewall policy associated with all three networks

    Correct

    A global network firewall policy can be associated with several VPC networks in the same project.

  • BThree copies of the same VPC firewall rules, one set per network

    Incorrect

    Copies in each network must be kept in step by hand, not in one place.

  • CTwo global network firewall policies on each network, one for allow rules and one for deny rules

    Incorrect

    Each VPC network can be associated with only one global network firewall policy.

  • DA global network firewall policy in each network's own project, shared through VPC Network Peering

    Incorrect

    Policies aren't shared through peering; the networks here already sit in one project.

Firewall policies group rules into one resource. A global network firewall policy can be associated with multiple VPC networks, as long as the policy and the networks belong to the same project, and each network can have only one global network firewall policy associated with it.

Question 5 · choose 1

An ingress allow rule in a network firewall policy has logging enabled. A client opens one TCP connection through it and exchanges data, with replies, continuously for an hour. How many connection records does the rule produce for this connection?

  1. AOne record per packet in each direction
  2. BOne record every 10 minutes while the connection lasts
  3. CTwo records, one for the request and one for the replies
  4. DOne record, because replies are allowed statefully and not logged
Show the answer and why
  • AOne record per packet in each direction

    Incorrect

    Logging is connection-based, not per packet.

  • BOne record every 10 minutes while the connection lasts

    Incorrect

    The 10-minute figure is an idle timeout; a continuous stream produces no new entries.

  • CTwo records, one for the request and one for the replies

    Incorrect

    Replies are allowed statefully and aren't logged.

  • DOne record, because replies are allowed statefully and not logged

    Correct

    An allowed connection is logged once, and stateful reply traffic isn't logged.

Firewall policy rules logging creates connection records when a connection is established, not for every packet. An allowed connection is logged once even if it lasts, reply traffic is allowed statefully without being logged, and a connection stays active while packets flow at least every 10 minutes.

Question 6 · choose 1

A network firewall policy rule allows egress only to the domain api.partner.example by using an FQDN object. Which Cloud NGFW tier does this feature belong to?

  1. ACloud NGFW Essentials
  2. BCloud NGFW Enterprise
  3. CCloud NGFW Standard
  4. DA separate Cloud NGFW subscription for domain filtering
Show the answer and why
  • ACloud NGFW Essentials

    Incorrect

    Essentials covers foundational features such as secure tags, address groups and VPC firewall rules.

  • BCloud NGFW Enterprise

    Incorrect

    Enterprise adds intrusion prevention and other layer 7 features; FQDN objects belong to a lower tier.

  • CCloud NGFW Standard

    Correct

    FQDN objects are a Cloud NGFW Standard feature, charged only for north-south traffic that Standard features evaluate.

  • DA separate Cloud NGFW subscription for domain filtering

    Incorrect

    There is no subscription to choose; you're billed for the features you use.

Cloud NGFW features come in three tiers: Essentials, Standard and Enterprise. You don't subscribe to a tier; using a feature bills it. FQDN objects, like threat intelligence, are in the Standard tier, which is charged for north-south traffic evaluated by its features.

Practice domain 6 →Practice all domains →