When designing secure and flexible cloud architectures in Oracle Cloud Infrastructure (OCI), Network Security Groups (NSGs) are one of the most powerful tools you can use. If you've worked with Security Lists before, think of NSGs as the more flexible and precise version, giving you fine-grained control over traffic at the resource level.
🛡️ What is a Network Security Group (NSG)?
A Network Security Group (NSG) is like a private security team assigned to specific cloud resources in OCI—like virtual machines (VMs), databases, and load balancers. Instead of applying broad traffic rules across an entire subnet (like Security Lists), NSGs let you define custom security rules for individual resources or groups of resources.
🏠 Real-World Analogy
Imagine you live in a housing society:
-
The main gate rules (e.g., all guests must sign in) apply to everyone—this is like a Security List for the whole subnet.
-
But you also hire your own private guard just for your house with specific instructions—this is like an NSG. It follows your custom rules, no matter what the society rules are.
In other words:
-
Security List = Shared gate rules
-
NSG = Personalized security guard for selected homes (resources)
Now, let's see how to create a Network Security Group and attach it to a Compute Instance:
- To access the Oracle Cloud Infrastructure (OCI) Console, navigate to https://www.oracle.com/
- Upon successful login, you will be redirected to the Oracle Cloud Console homepage
- Navigate to Navigation Menu -> Networking -> Virtual cloud networks
- Choose the compartment and click on VCN Name in which you want to create Network Security Group:
- Navigate to Network Security Group section and click Create Network Security Group button:
- Enter the below details:
- Name
- Choose the compartment
- Add Ingress Rule for port 22
- Click on Create button once done
- Network Security Group will be created:
Comments
Post a Comment