Courseiva
Question 59 of 960
mediumMultiple ChoiceObjective-mapped

VPC Firewall Rule Priority Conflict

Exhibit

$ gcloud compute firewall-rules list --format="table(name, network, priority, allow, sourceRanges)"
NAME         NETWORK    PRIORITY  ALLOW              SOURCE_RANGES
allow-http   default    1000      tcp:80             0.0.0.0/0
allow-https  default    1000      tcp:443            0.0.0.0/0
deny-all     default    2000      tcp:0-65535        10.0.0.0/8
default-allow-internal default 65534 tcp:0-65535,udp:0-65535,icmp  10.128.0.0/9

Refer to the exhibit. A VM in the default network with internal IP 10.128.0.5 is unable to reach a VM at 10.0.0.4 over TCP port 22. What is the most likely cause?

Quick Answer

The answer is a VPC firewall rule priority conflict blocking SSH, specifically because the deny-all rule with priority 2000 takes precedence over the default-allow-internal rule with priority 65534. In Google Cloud VPC firewall rules, a lower priority number means higher precedence, so the deny-all rule, which blocks all TCP traffic from the 10.0.0.0/8 range, overrides the permissive default-allow-internal rule and prevents SSH (TCP port 22) from reaching the VM at 10.128.0.5. This scenario tests your understanding of firewall rule evaluation order and priority hierarchies, a common trap on the Google Professional Cloud Security Engineer exam where candidates mistakenly assume that a more specific allow rule always wins. The key insight is that explicit deny rules with higher priority (lower number) will always block traffic, even if a lower-priority allow rule exists. Memory tip: think of priority numbers like a race—lower numbers finish first and get the final say.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

The deny-all rule has higher priority than default-allow-internal.

The deny-all rule (priority 2000) has a higher priority (lower number) than the default-allow-internal rule (priority 65534). Since the deny-all rule blocks all TCP traffic from the 10.0.0.0/8 range, it overrides the default-allow-internal rule, blocking SSH traffic from 10.0.0.4 to 10.128.0.5. Option A is incorrect because the deny rule blocks traffic from 10.0.0.0/8, which includes 10.0.0.4, so it does block traffic, but the most likely cause is the priority ordering. Option C is incorrect because the default-allow-internal rule covers all TCP ports, including port 22. Option D is incorrect because there is a rule (default-allow-internal) that allows SSH traffic, but the deny-all rule takes precedence due to higher priority.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The deny-all rule blocks traffic from 10.0.0.4 to the VM.

    Why it's wrong here

    The deny-all rule denies traffic from 10.0.0.0/8, which includes 10.0.0.4, so it does block traffic from that IP, but the question asks for the cause; the priority override is the key.

  • The deny-all rule has higher priority than default-allow-internal.

    Why this is correct

    Deny-all (priority 2000) has higher priority (numerically lower) than default-allow-internal (priority 65534), so it overrides the allow rule.

  • The default-allow-internal rule does not cover port 22.

    Why it's wrong here

    Default-allow-internal allows all TCP ports, including 22.

  • There is no rule allowing SSH traffic from 10.0.0.4.

    Why it's wrong here

    Default-allow-internal allows all TCP, so SSH is allowed; but it is overridden by the deny rule.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

2 more ways this is tested on PCSE

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. Which THREE steps are most effective for troubleshooting a VPC firewall rule issue where desired traffic is being blocked?

hard
  • A.Check IAM permissions for the VM's service account
  • B.Check firewall rule logs in Cloud Logging
  • C.Verify that the network tags on instances match the target tags in the firewall rule
  • D.Review VPC flow logs to see if traffic is reaching the VM
  • E.Inspect the route tables for the subnet

Why B: Options B, C, and D are correct. Checking firewall rule logs in Cloud Logging (B) reveals whether traffic was denied by a firewall rule. Verifying that network tags on instances match the target tags in the firewall rule (C) ensures the rule applies to the correct VMs. Reviewing VPC flow logs (D) shows actual traffic flows to confirm whether traffic reaches the VM. Option A (check IAM permissions) is less relevant because firewall rules are network-level, not identity-based. Option E (inspect route tables) affects routing, not firewall blocking.

Variation 2. An engineer notices that traffic on port 80 is not reaching instances with the tag 'http-server'. The instances have external IPs and are in the default VPC. What could be the reason?

easy
  • A.The sourceRanges does not include the instance's public IP.
  • B.The targetTags are not applied to the instances.
  • C.A deny rule with a lower priority number (higher priority) exists and blocks the traffic.
  • D.The direction should be EGRESS.

Why C: A deny rule with a lower priority number (higher priority) will override the allow rule for port 80, blocking traffic. Option A is incorrect because sourceRanges refers to allowed source IPs, not the instance's public IP. Option B is incorrect because if the targetTags are not applied, the rule would not affect those instances, but the issue is specifically about traffic not reaching instances with the tag 'http-server', implying the allow rule exists but is overridden. Option D is incorrect because direction should be INGRESS for incoming traffic, not EGRESS.

Last reviewed: Jun 24, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This PCSE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCSE exam.