- A
Add an inbound rule to deny TCP port 22
Why wrong: Incorrect. Security groups do not have deny rules; they only have allow rules. Traffic is denied by the absence of an allow rule.
- B
Remove any inbound rule that allows TCP port 22
Correct. Removing the inbound allow rule for TCP port 22 implicitly blocks SSH traffic because security groups have an implicit deny for any traffic not explicitly allowed.
- C
Add an inbound deny rule for TCP port 22 to the network ACL
Why wrong: Incorrect. This describes a network ACL rule, not a security group rule. Security groups are stateful and do not use deny rules.
- D
Add an outbound rule to deny TCP port 22
Why wrong: Incorrect. Outbound rules control outbound traffic, not inbound. Security groups are stateful, so blocking outbound SSH would not affect inbound SSH connections.
ANS-C01 Security Group Practice Question
This ANS-C01 practice question tests your understanding of network security, compliance and governance. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. A key principle to apply: security Group. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
A company wants to block inbound SSH traffic to all EC2 instances in a VPC while allowing all other traffic. Which security group rule should be configured?
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
Remove any inbound rule that allows TCP port 22
Security groups are stateful and act as a virtual firewall. By default, all inbound traffic is denied unless explicitly allowed. Therefore, to block SSH traffic, you simply remove any inbound rule that permits TCP port 22. This is option B. Option A is incorrect because security groups do not support 'deny' rules; they only support allow rules. Option C is incorrect because the question specifically asks about security group configuration, not network ACLs. Option D is incorrect because outbound rules do not affect inbound traffic, and security groups are stateful, so blocking outbound SSH would not block incoming SSH connections.
Key principle: 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.
- ✗
Add an inbound rule to deny TCP port 22
Why it's wrong here
Incorrect. Security groups do not have deny rules; they only have allow rules. Traffic is denied by the absence of an allow rule.
- ✓
Remove any inbound rule that allows TCP port 22
- ✗
Add an inbound deny rule for TCP port 22 to the network ACL
Why it's wrong here
Incorrect. This describes a network ACL rule, not a security group rule. Security groups are stateful and do not use deny rules.
- ✗
Add an outbound rule to deny TCP port 22
Why it's wrong here
Incorrect. Outbound rules control outbound traffic, not inbound. Security groups are stateful, so blocking outbound SSH would not affect inbound SSH connections.
Common exam traps
Common exam trap: answer the scenario, not the keyword
Many certification questions include familiar terms but test a specific constraint. Read the exact wording before choosing an answer that is generally true but wrong for this case.
Detailed technical explanation
How to think about this question
Treat this as a scenario question. Identify the problem, the constraint, and the best action. Then compare each option against those facts.
KKey Concepts to Remember
- Security Group
- Stateful vs Stateless
- Implicit Deny
TExam Day Tips
- Watch for words such as best, first, most likely and least administrative effort.
- Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Security Group
Real-world example
How this comes up in practice
A healthcare organisation deploys an application with a public-facing web tier and a private database tier. The database subnet has no public IP and only accepts connections from the web tier's security group. Questions like this test whether you can design cloud network isolation using VNets/VPCs, subnets, and security group rules.
Visual reference
Quick reference
Cloud Service Model Comparison
| Model | You Manage | Provider Manages | Examples |
|---|---|---|---|
| IaaS | OS, runtime, apps, data | Hardware, hypervisor, networking | EC2, Azure VMs, GCP Compute Engine |
| PaaS | Apps and data | OS, runtime, middleware, hardware | Elastic Beanstalk, Azure App Service |
| SaaS | Data and settings only | Everything else | Microsoft 365, Salesforce, Workday |
| FaaS / Serverless | Function code only | Infra, scaling, runtime | Lambda, Azure Functions, Cloud Run |
| CaaS | Containers and apps | Kubernetes, OS, hardware | EKS, AKS, GKE |
What to study next
Got this wrong? Here's your next step.
Review security Group, then practise related ANS-C01 questions on the same topic to reinforce the concept.
- →
Network Security, Compliance and Governance — study guide chapter
Learn the concepts, then practise the questions
- →
Network Security, Compliance and Governance practice questions
Targeted practice on this topic area only
- →
All ANS-C01 questions
1,705 questions across all exam domains
- →
AWS Certified Advanced Networking Specialty ANS-C01 study guide
Full concept coverage aligned to exam objectives
- →
ANS-C01 practice test guide
How to use practice tests most effectively before exam day
Related practice questions
Related ANS-C01 practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
Network Management and Operations practice questions
Practise ANS-C01 questions linked to Network Management and Operations.
Network Security, Compliance and Governance practice questions
Practise ANS-C01 questions linked to Network Security, Compliance and Governance.
Network Design practice questions
Practise ANS-C01 questions linked to Network Design.
Network Implementation practice questions
Practise ANS-C01 questions linked to Network Implementation.
ANS-C01 fundamentals practice questions
Practise ANS-C01 questions linked to ANS-C01 fundamentals.
ANS-C01 scenario practice questions
Practise ANS-C01 questions linked to ANS-C01 scenario.
ANS-C01 troubleshooting practice questions
Practise ANS-C01 questions linked to ANS-C01 troubleshooting.
Practice this exam
Start a free ANS-C01 practice session
Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.
FAQ
Questions learners often ask
What does this ANS-C01 question test?
Network Security, Compliance and Governance — This question tests Network Security, Compliance and Governance — Security Group.
What is the correct answer to this question?
The correct answer is: Remove any inbound rule that allows TCP port 22 — Security groups are stateful and act as a virtual firewall. By default, all inbound traffic is denied unless explicitly allowed. Therefore, to block SSH traffic, you simply remove any inbound rule that permits TCP port 22. This is option B. Option A is incorrect because security groups do not support 'deny' rules; they only support allow rules. Option C is incorrect because the question specifically asks about security group configuration, not network ACLs. Option D is incorrect because outbound rules do not affect inbound traffic, and security groups are stateful, so blocking outbound SSH would not block incoming SSH connections.
What should I do if I get this ANS-C01 question wrong?
Review security Group, then practise related ANS-C01 questions on the same topic to reinforce the concept.
What is the key concept behind this question?
Security Group
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 →
Keep practising
More ANS-C01 practice questions
- A financial services company has a VPC with a public subnet and a private subnet. EC2 instances in the private subnet ne…
- A company is designing a network security architecture for a multi-account environment using AWS Transit Gateway. The se…
- A company is using AWS Direct Connect to connect its on-premises network to AWS. The company wants to encrypt all traffi…
- A company uses AWS Transit Gateway to connect multiple VPCs and on-premises networks via AWS Site-to-Site VPN. The secur…
- A company runs a web application on EC2 instances behind an Application Load Balancer (ALB). The application must be acc…
- A global e-commerce company uses a hub-and-spoke network topology with a transit VPC in us-east-1. Each spoke VPC has an…
Last reviewed: Jun 20, 2026
This ANS-C01 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 ANS-C01 exam.
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.
Sign in to join the discussion.