Courseiva
Implementing VPC InstancesmediumMultiple SelectObjective-mapped

PCNE Firewall rule priority Practice Question

You need to allow instances with network tag 'db' in subnet-a to only accept connections on TCP port 3306 from instances with network tag 'app' in subnet-b. Which TWO firewall rules should you create? (Choose 2)

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

Ingress rule: target tag 'db', source tag 'app', allow tcp:3306, priority 1000.

To allow only instances with tag 'app' in subnet-b to connect to instances with tag 'db' in subnet-a on TCP port 3306, you need two ingress firewall rules on the db instances: one to allow traffic from the app source tag, and one to deny traffic from all other sources. The allow rule must have a higher priority (lower number) than the deny rule to take effect. Thus, option A (allow from app, priority 1000) and option C (deny from all, priority 2000) together achieve the goal.

Answer analysis

Option-by-option breakdown

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

  • Ingress rule: target tag 'db', source tag 'app', allow tcp:3306, priority 1000.

    Why this is correct

    Correct. This ingress rule allows TCP 3306 from source tag 'app' to target tag 'db', permitting the desired connections.

  • Egress rule: target tag 'app', destination tag 'db', allow tcp:3306, priority 1000.

    Why it's wrong here

    Incorrect. An egress rule on 'app' instances would not limit inbound connections to 'db' instances; it controls outbound traffic from 'app'.

  • Ingress rule: target tag 'db', source 0.0.0.0/0, deny tcp:3306, priority 2000.

    Why this is correct

    Correct. This ingress rule denies TCP 3306 from all sources (except the allowed app tag) with a lower priority than the allow rule, effectively blocking unauthorized traffic.

  • Ingress rule: target tag 'db', source tag 'app', deny tcp:3306, priority 1000.

    Why it's wrong here

    Incorrect. This rule would deny TCP 3306 from app tag, which contradicts the requirement.

  • Ingress rule: target tag 'db', source 0.0.0.0/0, deny all ports, priority 500.

    Why it's wrong here

    Incorrect. Denying all ports from all sources with too high a priority (lower number) would block all traffic, including the allowed connections.

Visual reference

192.168.1.0 /24 256 addresses (254 usable) 192.168.1.0 /25 Subnet A 128 addr (126 usable) 192.168.1.128 /25 Subnet B 128 addr (126 usable) Borrowing 1 bit from host portion creates 2 subnets (/25)

About these practice questions

One of 961 original PCNE practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PCNE 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 PCNE exam.