SCS-C02 Infrastructure Security Practice Question
A security engineer is investigating a potential breach. The engineer notices that an EC2 instance's security group allows inbound SSH (port 22) from 0.0.0.0/0. The instance is in a public subnet and has a public IP address. However, the engineer finds that SSH access is only possible from a specific IP address. What is the most likely explanation?
⚠ Common exam trap
SCS-C02 often tests the misconception that security groups can deny traffic or that multiple security groups override each other, when in fact security groups are allow-only and additive — only NACLs can deny.
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 network ACL denies inbound SSH from all IPs except the specific IP
Security groups in AWS are stateful and allow-only — they cannot deny traffic. If a security group permits SSH from 0.0.0.0/0 but access is restricted to one IP, the restriction must come from a stateless network ACL, which supports both allow and deny rules and is evaluated before the security group. A network ACL that denies SSH from all sources except the specific IP would produce exactly this observed behavior. This is the only option that explains a restriction despite a permissive security group.
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 network ACL allows inbound SSH from 0.0.0.0/0
Why it's wrong here
A network ACL permitting SSH from 0.0.0.0/0 would widen access, not narrow it to one address, so it cannot explain the observed restriction. NACLs are the correct choice when you need stateless subnet-level allow/deny rules that apply across every instance in the subnet.
- ✗
The security group rule is being overridden by a more restrictive security group attached to the same instance
Why it's wrong here
Security group rules are additive; no rule overrides another, and the most permissive match applies, so a second group cannot restrict the 0.0.0.0/0 rule. It is tempting because layered groups feel restrictive, and it would be correct if the question described NACLs, whose rules are evaluated in order and can deny.
- ✗
The security group rule is being evaluated but the instance's operating system firewall is blocking SSH
Why it's wrong here
An OS firewall would restrict access by source address, but the stem already shows SSH reachable from one specific IP, which points to a security group rule scoped to that address, not host-based filtering. Host firewalls are the right control when you need per-instance filtering independent of AWS security group rules.
- ✓
The network ACL denies inbound SSH from all IPs except the specific IP
Why this is correct
Network ACLs are stateless and can explicitly deny traffic. If the NACL denies SSH from all IPs except the specific one, it would override the permissive security group rule, explaining why only that IP can connect.
Visual reference
Go deeper
Related to this question
About these practice questions
One of 1,205 original SCS-C02 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 →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Amazon Web Services exam blueprint
This SCS-C02 practice question is part of Courseiva's free Amazon Web Services 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 SCS-C02 exam.