
In today's task:
Create a security group with name: datacenter-sg.
The description must be: Security group for the App Servers
To Do:
- Add the inbound rule of type HTTP, with port range of 80.
- Enter the source CIDR range of 0.0.0.0/0.
- Add another inbound rule of type SSH, with port range of 22.
- Enter the source CIDR range of 0.0.0.0/0.
----------------------------------------------------
Steps followed:
1. Search VPC from the AWS portal.
2. Create security group.
1. Search VPC from the AWS portal.
2. Create security group.
3. Fill in: Security group name, Description
Add Inbound Rules: Click Add rule twice and configure:
Rule 1
- Type:
HTTP - Protocol:
TCP - Port Range:
80 - Source:
Anywhere-IPv4(0.0.0.0/0)
Rule 2
Type:
SSHProtocol:
TCPPort Range:
22Source:
Anywhere-IPv4 (0.0.0.0/0)Click : Create security group.
---------------------------------------------------------
Why do we need Security Groups?
A Security Group (SG) in AWS acts like a virtual firewall for cloud resources such as:
EC2 instances (virtual machines), Load balancers, Databases (RDS), ECS containers, etc.
It controls:
Who can connect to your server
Which ports are open
What traffic is allowed in or out.
Without Security Groups:
- servers become publicly exposed
- hackers can scan open ports
- databases may leak data.
Why were HTTP and SSH added as inbound rules ?
Because the server needs to accept two types of incoming traffic.
HTTP Rule (Port 80)
Purpose:
- Allows users to open the website in browser.
Without port 80 open:
- website won't load
- browser connection fails
SSH Rule (Port 22)
Purpose:
- Allows DevOps/admins to log into server remotely.
Without SSH:
- you cannot manage the server remotely
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article