Question 783 of 1,705
Network Security, Compliance and GovernancemediumMultiple SelectObjective-mapped

Quick Answer

The answer is to restrict inbound SSH access to a specific IP range using a security group. This is correct because a bastion host serves as a single, hardened entry point to a private network, so it must expose only the minimal necessary port—typically TCP 22 for SSH—while using a security group to enforce network-layer least privilege. By limiting source IPs to a trusted range, you prevent brute-force attacks and unauthorized lateral movement from the internet. On the AWS Certified Advanced Networking Specialty ANS-C01 exam, this concept tests your understanding of bastion host security best practices within a layered defense strategy; a common trap is assuming a network ACL alone suffices, but security groups are stateful and easier to manage for host-level restrictions. Remember the mnemonic “Bastion = Block All, Trust Only SSH” to recall that the security group should deny all inbound traffic except SSH from a specific IP range.

ANS-C01 Network Security, Compliance and Governance Practice Question

This ANS-C01 practice question tests your understanding of network security, compliance and governance. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. 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.

Which TWO actions should be taken to secure an EC2 instance that is used as a bastion host? (Choose 2)

Question 1mediummulti select
Full question →

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

Use a security group that only allows necessary inbound ports

Option A is correct because a bastion host should only expose necessary inbound ports (typically TCP 22 for SSH) to minimize the attack surface. By using a security group that restricts inbound traffic to only required ports, you enforce the principle of least privilege at the network layer, preventing unauthorized access to other services that might be running on the instance.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

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

  • Use a security group that only allows necessary inbound ports

    Why this is correct

    Minimize attack surface.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Use HTTPS instead of SSH for administration

    Why it's wrong here

    HTTPS not for shell access.

  • Place the bastion host in a private subnet

    Why it's wrong here

    Bastion host needs public access.

  • Restrict inbound SSH access to a specific IP range using security group

    Why this is correct

    Limits exposure.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Allow all inbound traffic on port 22 in the network ACL

    Why it's wrong here

    NACL is less secure than SG.

Common exam traps

Common exam trap: answer the scenario, not the keyword

AWS often tests the misconception that a bastion host should be placed in a private subnet for security, but the correct design requires it to be in a public subnet to serve as an entry point, with security group restrictions providing the necessary protection.

Detailed technical explanation

How to think about this question

Security groups act as a stateful virtual firewall at the instance level, automatically allowing return traffic for permitted inbound rules, whereas NACLs are stateless and require explicit inbound and outbound rules. In practice, a bastion host is often placed in a public subnet with an Elastic IP, and its security group is configured to allow SSH only from trusted administrative IP ranges (e.g., your corporate VPN CIDR). This setup ensures that even if the instance has other services running, they remain inaccessible from the internet.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

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

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A company's IT admin needs to give a contractor read-only access to production logs without sharing account credentials. Using role-based access control (RBAC) and temporary scoped permissions — not a permanent shared password — is the correct pattern. Questions like this test whether you can apply least-privilege access across cloud identity services.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

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.

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 — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Use a security group that only allows necessary inbound ports — Option A is correct because a bastion host should only expose necessary inbound ports (typically TCP 22 for SSH) to minimize the attack surface. By using a security group that restricts inbound traffic to only required ports, you enforce the principle of least privilege at the network layer, preventing unauthorized access to other services that might be running on the instance.

What should I do if I get this ANS-C01 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

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

Last reviewed: Jun 30, 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 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.