mediumMultiple ChoiceObjective-mapped
Configuring Firewall Rules to Allow Only HTTPS to a Web Server
A network administrator is configuring a firewall rule set. The requirement is to allow inbound HTTPS traffic from the internet to a web server at 10.1.1.10, and to allow the web server to respond. All other inbound traffic should be blocked. Which rule set accomplishes this?
Quick Answer
The correct rule set is to allow inbound TCP 443 to 10.1.1.10, allow outbound TCP from 10.1.1.10, and deny all inbound. This works because HTTPS exclusively uses TCP port 443 for encrypted web traffic, and the outbound rule permits the server’s stateful responses—either explicitly or via a stateful firewall—while the final deny-all ensures no other inbound protocols or ports reach the server. On the CompTIA SecurityX CAS-004 exam, this scenario tests your understanding of least-privilege access control and the distinction between stateless and stateful rule placement; a common trap is forgetting to allow the return traffic or accidentally blocking it with a broad deny rule. Remember that a firewall rule to allow inbound HTTPS only must specify the destination IP and port, permit the corresponding outbound traffic, and then drop everything else—think of it as “443 in, any out, deny the rest.” A useful mnemonic is “HTTPS: 443 in, server out, block the doubt.”
⚠ Common exam trap
The trap here is that candidates often overlook rule order and choose Option C, thinking a 'deny all' at the top is safe, but it actually blocks the intended traffic before the allow rule is processed.
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
✓
Allow inbound TCP 443 to 10.1.1.10; allow outbound TCP from 10.1.1.10; deny all inbound
HTTPS uses TCP port 443, and the rule set correctly allows inbound TCP 443 to the web server at 10.1.1.10, permits the server's outbound responses (stateful or explicit), and then denies all other inbound traffic. This matches the requirement to allow only HTTPS traffic from the internet while blocking everything else.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Allow inbound TCP 80 to 10.1.1.10; allow outbound TCP from 10.1.1.10; deny all inbound
Why it's wrong here
Allows HTTP, not HTTPS.
- ✓
Allow inbound TCP 443 to 10.1.1.10; allow outbound TCP from 10.1.1.10; deny all inbound
Why this is correct
Correctly permits HTTPS and related responses.
- ✗
Deny all inbound; allow inbound TCP 443 to 10.1.1.10; allow outbound TCP from 10.1.1.10
Why it's wrong here
The deny rule before the allow rule blocks all inbound traffic.
- ✗
Allow inbound TCP 22 to 10.1.1.10; allow outbound TCP from 10.1.1.10; deny all inbound
Why it's wrong here
Allows SSH, not HTTPS.
Go deeper
Related to this question
About these practice questions
This CAS-005 question is part of Courseiva's 968-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way this is tested on CAS-005
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. A network administrator is configuring a firewall to allow only necessary traffic to a web server. The server should be accessible from the internet on port 443 and from a management subnet on port 22. Which firewall rule ensures least privilege?
easy- A.Allow traffic from management subnet to port 443 and any to port 22
- B.Allow traffic from any source to ports 443 and 22
- C.Allow all traffic to the server, then block specific ports
- ✓ D.Allow traffic from any to port 443, and from management subnet to port 22; deny all else
Why D: It explicitly allows only the required traffic (HTTPS on port 443 from any source, SSH on port 22 from the management subnet) and then denies all other traffic by default. This follows the principle of least privilege by ensuring no unintended services or sources are permitted, which is the core goal of firewall rule design.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CAS-005 practice question is part of Courseiva's free CompTIA 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 CAS-005 exam.