Bird
0
0

To limit SSH access to your EC2 instance exclusively to your office IP 203.0.113.5, which security group ingress rule is correct?

hard📝 Application Q8 of 15
AWS - Security Groups and Network ACLs
To limit SSH access to your EC2 instance exclusively to your office IP 203.0.113.5, which security group ingress rule is correct?
AProtocol: TCP, Port Range: 80, Source: 203.0.113.5/32
BProtocol: TCP, Port Range: 22, Source: 203.0.113.0/24
CProtocol: UDP, Port Range: 22, Source: 203.0.113.5/32
DProtocol: TCP, Port Range: 22, Source: 203.0.113.5/32
Step-by-Step Solution
Solution:
  1. Step 1: Identify SSH Protocol and Port

    SSH uses TCP protocol on port 22.
  2. Step 2: Restrict Source IP

    To restrict to a single IP, use /32 subnet mask.
  3. Step 3: Evaluate Options

    Protocol: TCP, Port Range: 22, Source: 203.0.113.5/32 correctly specifies TCP port 22 and source 203.0.113.5/32. Protocol: TCP, Port Range: 22, Source: 203.0.113.0/24 allows entire subnet. Protocol: UDP, Port Range: 22, Source: 203.0.113.5/32 uses wrong protocol. Protocol: TCP, Port Range: 80, Source: 203.0.113.5/32 uses wrong port.
  4. Final Answer:

    Protocol: TCP, Port Range: 22, Source: 203.0.113.5/32 -> Option D
  5. Quick Check:

    Use /32 to specify a single IP address [OK]
Quick Trick: Use /32 CIDR to allow single IP for SSH [OK]
Common Mistakes:
  • Using broader subnet instead of single IP
  • Using UDP instead of TCP for SSH
  • Setting wrong port number

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes