Bird
0
0

Which of the following is the correct syntax to allow inbound TCP traffic on port 22 from any IP in an AWS security group?

easy📝 Syntax Q3 of 15
AWS - Security Groups and Network ACLs
Which of the following is the correct syntax to allow inbound TCP traffic on port 22 from any IP in an AWS security group?
A{"Protocol": "tcp", "Port": 22, "Source": "0.0.0.0/0"}
B{"IpProtocol": "tcp", "FromPort": 22, "ToPort": 22, "CidrIp": "0.0.0.0/0"}
C{"IpProtocol": "udp", "FromPort": 22, "ToPort": 22, "CidrIp": "0.0.0.0/0"}
D{"IpProtocol": "tcp", "FromPort": 80, "ToPort": 80, "CidrIp": "0.0.0.0/0"}
Step-by-Step Solution
Solution:
  1. Step 1: Identify correct keys for security group rule

    The correct keys are IpProtocol, FromPort, ToPort, and CidrIp for inbound rules.
  2. Step 2: Match protocol and port for SSH

    SSH uses TCP on port 22, so protocol tcp and ports 22 to 22 are correct.
  3. Final Answer:

    Correct JSON with tcp protocol and port 22 -> Option B
  4. Quick Check:

    Correct keys and values = {"IpProtocol": "tcp", "FromPort": 22, "ToPort": 22, "CidrIp": "0.0.0.0/0"} [OK]
Quick Trick: Use IpProtocol, FromPort, ToPort, CidrIp keys for rules [OK]
Common Mistakes:
  • Using udp instead of tcp for SSH
  • Incorrect port numbers
  • Wrong key names like Protocol or Source

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes