Friday, September 18, 2026

AWS Security Group Practice Quiz

## 📝 AWS Security Group Practice Quiz## Question 1: Security Group Basics

What is the primary function of an AWS Security Group in a cloud network architecture?


* A) It acts as a distributed load balancer for incoming client traffic.

* B) It acts as a virtual firewall to control inbound and outbound traffic for instances.

* C) It serves as a managed database backup and restore service.

* D) It functions as a public DNS resolver for domain routing.


Correct Answer: B

Explanation: An AWS Security Group acts as a stateful, virtual firewall that operates at the instance level to control both inbound and outbound traffic.


------------------------------

## Question 2: Linux Remote Access

Which standard port and protocol combination must be opened in a security group to allow a secure shell (SSH) login to a Linux instance?


* A) Port 80 using HTTP

* B) Port 443 using HTTPS

* C) Port 22 using SSH

* D) Port 3389 using RDP


Correct Answer: C

Explanation: Port 22 is the standard administrative network port assigned for secure shell (SSH) communication, which is required to log into remote Linux environments.


------------------------------

## Question 3: Windows Remote Access

Which port and protocol assignment is designated for Remote Desktop Protocol (RDP) login to a Windows-based instance?


* A) Port 3389 using RDP

* B) Port 22 using SSH

* C) Port 80 using HTTP

* D) Port 443 using HTTPS


Correct Answer: A

Explanation: Port 3389 is the default port utilized by Microsoft's Remote Desktop Protocol (RDP) to enable a graphical user interface connection to a Windows server.


------------------------------

## Question 4: Web Protocols

What is the standard port configuration difference between unencrypted web traffic (HTTP) and secure, encrypted web traffic (HTTPS)?


* A) HTTP operates on port 443, while HTTPS operates on port 80.

* B) HTTP operates on port 80, while HTTPS operates on port 443.

* C) Both HTTP and HTTPS operate on port 443.

* D) Both HTTP and HTTPS operate on port 80.


Correct Answer: B

Explanation: Standard unencrypted web servers answer requests on port 80 (HTTP). When encryption (SSL/TLS) is introduced to protect data in transit, the traffic moves to port 443 (HTTPS).

------------------------------

## 📝 Comprehensive Practice Quiz## Question 1: Security Group Basics

Which of the following statements accurately describes the stateful behavior of an AWS Security Group?


* A) Inbound traffic rules automatically apply to outbound traffic, but outbound rules require separate explicit configuration.

* B) Security groups are stateless, requiring explicit rules for both inbound and outbound return traffic.

* C) Security groups are stateful, meaning any traffic allowed through an inbound rule is automatically permitted to return outbound, regardless of outbound rules.

* D) Outbound traffic rules are evaluated before inbound rules for every new connection attempt.


Correct Answer: C

Explanation: AWS Security Groups are stateful. This means if you create an inbound rule to allow traffic to your instance, the return traffic for that specific connection is automatically allowed to flow back out, even if your outbound rules wouldn't normally permit it.


------------------------------

## Question 2: Linux Administration Ports

In standard Linux server administration, which network port is traditionally assigned for File Transfer Protocol (FTP) control connections?


* A) Port 21

* B) Port 20

* C) Port 25

* D) Port 53


Correct Answer: A

Explanation: Port 21 is the standard port used by FTP to establish and manage the control connection (sending commands). Port 20 is typically used for actual data transfers.


------------------------------

## Question 3: Windows Administration Ports

Which standard TCP port does Microsoft Windows commonly use for modern Server Message Block (SMB) file and printer sharing over a network?


* A) Port 135

* B) Port 139

* C) Port 3389

* D) Port 445


Correct Answer: D

Explanation: While older versions used NetBIOS over port 139, modern Windows environments route SMB traffic directly over TCP using port 445 for file and printer sharing.


------------------------------

## Question 4: Web Protocols

Which HTTP status code explicitly indicates that a request has succeeded and has led to the creation of a new resource (such as when a new item is submitted via an API)?


* A) 200 OK

* B) 201 Created

* C) 204 No Content

* D) 400 Bad Request


Correct Answer: B

Explanation: While 200 OK is a generic success code, 201 Created is the specific HTTP status code returned when a resource has been successfully generated on the server as a result of the request.

------------------------------

Here is the complete Network ACL (NACL) quiz formatted on a single page, complete with multiple-choice options, correct answers, and concise technical explanations.

------------------------------

## 📝 AWS Network ACL (NACL) Practice Quiz## Question 1: Rule Evaluation Behavior

How do Network ACLs process inbound and outbound traffic rules?


* A) Rules are evaluated randomly, and the most restrictive rule takes precedence.

* B) Rules are evaluated concurrently, and any "Allow" rule will always override a "Deny" rule.

* C) Rules are evaluated in numerical order, starting with the lowest numbered rule, and processing stops as soon as a match is found.

* D) Rules are evaluated in reverse numerical order, starting from the highest numbered rule down to 1.


Correct Answer: C

Explanation: NACLs evaluate rules sequentially from the lowest number to the highest. The moment a packet matches a rule's criteria, that rule is applied immediately (whether to ALLOW or DENY), and no further rules are evaluated.


------------------------------

## Question 2: Firewall Statefulness

Which statement accurately describes the stateful or stateless nature of Network ACLs?


* A) Network ACLs are stateful, meaning return traffic is automatically allowed.

* B) Network ACLs are stateless, meaning you must explicitly write both inbound and outbound rules to allow return traffic.

* C) Network ACLs are stateful for inbound traffic but stateless for outbound traffic.

* D) Network ACLs automatically inherit the stateful tracking parameters of associated Security Groups.


Correct Answer: B

Explanation: Unlike Security Groups, NACLs are completely stateless. They do not remember connection tracking info. If you allow an inbound request on port 80, the return traffic will be blocked at the outbound boundary unless you explicitly open an outbound rule for it.


------------------------------

## Question 3: Infrastructure Boundary

At which layer of the AWS infrastructure topology do Network ACLs operate?


* A) At the individual EC2 Instance network interface (ENI) level.

* B) At the VPC Subnet boundary level.

* C) At the Internet Gateway (IGW) level.

* D) At the Route Table level.


Correct Answer: B

Explanation: Network ACLs act as a perimeter firewall at the subnet level. Any traffic entering or leaving a subnet must pass through the NACL, making it a broader layer of protection compared to Security Groups, which secure individual instances.


------------------------------

## Question 4: Default Settings

By default, what is the behavior of the automatically generated Default Network ACL that comes with a newly created VPC?


* A) It blocks all inbound traffic and allows all outbound traffic.

* B) It blocks all inbound and all outbound traffic until you add rules.

* C) It allows all inbound and all outbound traffic.

* D) It allows only HTTP (80) and HTTPS (443) traffic while blocking everything else.


Correct Answer: C

Explanation: To prevent initial connectivity blockages, the default NACL provided by AWS allows all traffic to enter and leave the subnet. However, if you create a custom NACL from scratch, it will default to blocking all traffic until you add your own rules.


------------------------------

Here is an interactive practice quiz focused on AWS VPC Peering and AWS VPN architectures.

------------------------------

## 📝 AWS VPC Peering & VPN Practice Quiz## Question 1: VPC Peering Routing Limitation

Company A has a VPC Peering connection established between VPC 1 and VPC 2. They later set up another peering connection between VPC 2 and VPC 3. Resources in VPC 1 need to communicate with resources in VPC 3. Why is this communication blocked by default?


* A) VPC Peering does not support cross-region connections.

* B) VPC Peering does not support transitive routing.

* C) You can only establish one peering connection per VPC.

* D) Security Groups automatically block multi-hop configurations.


Correct Answer: B

Explanation: AWS VPC Peering does not support transitive routing. Traffic cannot route through an intermediate VPC (VPC 2) to reach a third VPC (VPC 3). To connect VPC 1 and VPC 3, you must create a direct VPC Peering connection between them or use [AWS Transit Gateway](https://aws.amazon.com/transit-gateway/).


------------------------------

## Question 2: Connected CIDR Constraints

You are tasked with connecting two separate AWS VPCs belonging to different corporate subsidiaries via VPC Peering. Which architectural condition must be met for the peering connection to successfully route traffic?


* A) The two VPCs must be deployed within the exact same AWS Region and Account.

* B) The primary and secondary IPv4 CIDR blocks of the VPCs must not overlap.

* C) Both VPCs must share the same default Internet Gateway (IGW).

* D) The Subnets inside the peer VPCs must have identical route tables.


Correct Answer: B

Explanation: Inter-VPC routing fails if network spaces conflict. AWS strictly prevents a VPC Peering connection from active routing if the IPv4 CIDR blocks overlap.


------------------------------

## Question 3: AWS Site-to-Site VPN Redundancy

When you provision a managed AWS Site-to-Site VPN connection to hook up your on-premises data center to an AWS VPC, what does AWS automatically create to ensure high availability on their end?


* A) A single public endpoint that dynamically switches availability zones.

* B) A dedicated AWS Direct Connect fiber pathway.

* C) Two distinct VPN tunnels targeting separate public IP endpoints.

* D) A fallback public internet route table managed by Route 53.


Correct Answer: C

Explanation: An AWS Site-to-Site VPN connection automatically configures two separate VPN tunnels with unique public IP endpoints for built-in redundancy. If one tunnel experiences an outage or maintenance, traffic seamlessly fails over to the second active tunnel.


------------------------------

## Question 4: Hybrid Cloud Gateway Architecture

You want to establish an encrypted IPSec VPN connection between your corporate office firewall and an isolated Amazon VPC subnet. Which component must be attached to your VPC to act as the cloud-side anchor for the VPN tunnels?


* A) Customer Gateway (CGW)

* B) Virtual Private Gateway (VGW)

* C) Internet Gateway (IGW)

* D) NAT Gateway


Correct Answer: B

Explanation: The Virtual Private Gateway (VGW) is the VPN concentrator attached to the Amazon VPC side of a Site-to-Site VPN connection. The Customer Gateway (CGW) is the logical object created in AWS that represents your physical on-premises firewall device.

------------------------------

1. What happens if a Security Group allows no inbound rules? 

• Your Answer: Users cannot connect to the instance. 

• Verification: Correct. AWS Security Groups are stateful and deny all inbound traffic by default. If you do not explicitly add any inbound rules, all incoming traffic is blocked, meaning no external users or services can connect to the EC2 instance. 


2. Can an EC2 instance have multiple Security Groups? 

• Your Answer: Yes 

• Verification: Correct. You can assign multiple security groups to a single EC2 instance (both at launch time and after the instance is running). When multiple groups are assigned, AWS evaluates all the rules across those groups cumulatively to determine traffic permissions. 


3. Can one EBS volume be attached to multiple EC2 instances? 

• Your Answer: Generally No 

• Verification: Correct. Standard Amazon EBS volumes can only be attached to a single EC2 instance at a time within the same Availability Zone. However, the caveat "Generally No" is highly accurate because AWS does offer a feature called EBS Multi-Attach for specific volume types (like io1 and io2 SSDs), which allows them to be attached to multiple Nitro-based instances simultaneously. 


4. What protocol is used to connect Linux EC2? 

• Your Answer: SSH (Port 22) 

• Verification: Correct. The Secure Shell (SSH) protocol running over port 22 is the standard industry method used to securely log into and manage remote Linux-based operating systems. 


5. What protocol is used to connect Windows EC2? 

• Your Answer: RDP (Port 3389) 

• Verification: Correct. The Remote Desktop Protocol (RDP) operating over port 3389 is the standard graphical interface protocol used to connect to and manage Windows-based servers remotely. 

No comments: