Introduction
Cloud computing often feels like a maze of technical jargon - VNets, Subnets, Firewalls, NSGs, VMs, Service Principals, IPs. For a non-technical reader, these terms can sound intimidating. For a technical professional, they are the building blocks of secure, scalable infrastructure.
This article breaks down each concept step by step, using real-world analogies and project scenarios. By the end, you’ll see how these pieces fit together to form a secure cloud environment.

Virtual Network (VNet)
A Virtual Network (VNet) is the foundation of cloud networking. It’s your private, isolated environment in the cloud.A Virtual Network (VNet) is basically your own private network inside the cloud.
If you have used computers in an office, you may have seen that all computers are connected to the same office network. Employees can communicate with each other, access internal servers, printers, databases, etc., while outsiders on the internet cannot directly access those internal systems.
A VNet does the same thing in the cloud.
Think of it as creating a private office network inside Microsoft Azure.
VNet is like creating your own private office network inside Azure. You decide which resources are connected, how they communicate, and which traffic is allowed or blocked.
Analogy: Think of a VNet as a gated community. Only residents and approved visitors can enter.
Project Scenario: A company hosting an e-commerce site creates a VNet to keep its servers and databases secure from the public internet.

Simple Real-Life Example of VNet
Imagine you are building a gated residential society.The society has:
🏠 Houses ,🏢 Apartments,🚗 Parking,🛡️ Security gate,🚪 Different internal roads,👮 Security guards,🌐 A controlled entrance from outside
Anyone from the public cannot simply walk into the society.
There is a main gate, and security decides: "Who is allowed to enter?"
A VNet works in a similar way.
Your Azure resources—such as: Virtual Machines,Databases,Web servers,Application servers,APIs can live inside your VNet.
You decide how these resources communicate with each other and what can communicate with the internet.
VNet in Azure
Suppose your company is building an e-commerce website.
For example: MyShop.com Your application may have:
Customer
↓
Internet
↓
Web Server
↓
Application Server
↓
DatabaseYou don't want your database sitting openly on the internet.
Instead, you can create:
INTERNET
│
▼
┌──────────────┐
│ VNet │
│ │
│ Web Server │
│ ↓ │
│ App Server │
│ ↓ │
│ Database │
└──────────────┘The VNet becomes the private network boundary around your cloud resources.
Subnet
A Subnet (Subnetwork) is a smaller section created inside a Virtual Network (VNet).If a VNet is your entire office building, then a Subnet is one particular floor or department inside that building.The main purpose of a subnet is to organize your resources and control how they communicate with each other.
A Subnet divides your VNet into smaller, manageable sections.
Analogy: In an office building, each floor is reserved for a department — HR, Finance, IT.
Project Scenario: One subnet hosts web servers, another hosts databases, and a third is reserved for testing.

Simple Real-Life Example
Imagine you have a large 5-floor office building.The building belongs to one company.But you don't put everybody on the same floor.You divide the building:
🏢 COMPANY OFFICE
FLOOR 1 ( HR)
FLOOR 2 ( FINANCE)
FLOOR 3 ( IT)
FLOOR 4 (SALES)
FLOOR 5 (TESTING)
The entire building is like your VNet.Each floor is like a Subnet.
Subnet in Azure
Suppose you create an Azure VNet:
MyCompany-VNetInside that VNet, you can create multiple subnets:
MyCompany VNet
│
┌──────────────┼──────────────┐
│ │ │
▼ ▼ ▼
Web Subnet App Subnet DB Subnet Why do we need Subnets?
You may ask:
"If I already have a VNet, why do I need Subnets?"
Because putting everything into one big network can become difficult to manage.
Imagine a company with:
100 employees
50 servers
20 databases
Testing systems
Development systems
Production systems
If everything is in one area, managing access becomes complicated.Instead, you can organize resources.
Firewalls
A Firewall is the security guard at the gate. It inspects traffic and decides whether to allow or block it.
A Firewall is a security system that checks network traffic coming into or going out of your network and decides whether that traffic should be allowed or blocked.
In very simple language:
A Firewall is like a security guard standing at the entrance of your company's network. It checks who is coming in, where they are coming from, where they want to go, and whether they are allowed to enter.
The main purpose of a firewall is to protect your applications, servers, databases, and other resources from unwanted or suspicious network traffic.
Analogy: A mall security guard checks bags before entry.
Project Scenario: Azure Firewall blocks suspicious traffic while allowing only trusted IPs to access sensitive systems.

Simple Real-Life Example - Mall Security
At the entrance, there is a security guard.
The guard may check:
👤 Who are you?
🎒 Do you have anything suspicious?
🚪 Where are you going?
⚠️ Are you allowed to enter?
🚫 Is there any reason to stop you?
The guard then makes a decision:
Visitor
│
▼
🛡️ Security Guard
│
┌──────┴──────┐
│ │
ALLOW BLOCK
│ │
▼ ▼
Enter Mall Stop HereA firewall works in a similar way for network traffic.Instead of people, it checks network requests and packets.
Why Do We Need a Firewall?
Imagine you have an online shopping company.
Your infrastructure contains:
Website
APIs
Application servers
Databases
Payment systems
Internal systems
You don't want every person on the internet to be able to access everything.
For example:
INTERNET
│
┌────────┴────────┐
│ │
Customer Hacker
│ │
▼ ▼
Legitimate Suspicious
Request Request
│ │
└────────┬────────┘
▼
🛡️ FIREWALL
│
Check Rules
/ \
/ \
ALLOW BLOCKThe firewall provides a security control point where traffic can be examined against your rules.
Firewall as a Traffic Controller
Another easy way to understand a firewall is to think of it as a traffic police officer.
Imagine a busy road.
Hundreds of vehicles are trying to enter a restricted area.
The traffic officer checks:
Vehicle
│
▼
🚦 Traffic Police
│
├── Allowed → Go
│
└── Not Allowed → StopSimilarly:
Network Traffic
│
▼
🛡️ Firewall
│
├── Allowed → Continue
│
└── Blocked → StopWhat Does a Firewall Check?
A firewall can make decisions based on different characteristics of network traffic.
For example:
1️⃣ Source IP Address
Who is sending the request?
Example:
Source IP:
203.0.113.50You might have a rule saying:
Allow traffic from this trusted source.
Or:
Block traffic from this source.
2️⃣ Destination
Where is the traffic trying to go?
For example:
Internet
↓
Web Serverversus:
Internet
↓
DatabaseYou may want the web server to be publicly reachable while preventing direct internet access to the database.
3️⃣ Port
A server can listen on different network ports.
For example:
80 → HTTP
443 → HTTPS
22 → SSHYou can create rules around which traffic should be allowed.
For example:
Allow HTTPS traffic.
Internet
│
│ HTTPS / 443
▼
🛡️ Firewall
│
▼
Web ServerBut direct access to an administrative service might be restricted.
4️⃣ Protocol
Network traffic can use different protocols.
For example:
TCP
UDP
ICMP
A firewall can use protocol information as part of its traffic-control rules.
Allow vs Block
The basic idea is very simple.
Suppose you create these rules:
Rule 1:
Allow HTTPS trafficThen:
Customer
│
│ HTTPS
▼
Firewall
│
│ ✅ Allowed
▼
WebsiteBut suppose:
Rule 2:
Block direct database access from InternetThen:
Internet
│
│ Database Request
▼
Firewall
│
│ ❌ Blocked
X
DatabaseThis is the basic principle of firewall protection.
Virtual Machines (VMs)
A Virtual Machine (VM) is a computer you rent in the cloud.A Virtual Machine (VM) is basically a computer created inside the cloud.
Instead of buying a physical computer/server, installing an operating system, adding RAM, CPU, storage, etc., you can rent a virtual computer from Azure.
You can install:
Windows or Linux
.NET / Java / PHP
IIS / Apache / Nginx
SQL Server or other software
Your application
Monitoring and security tools
You can then connect to the VM and use it almost like a normal physical computer.
Analogy: Instead of buying a laptop, you rent one online that you can access anytime.
Project Scenario: A payroll system runs on a VM. If demand spikes, the VM can be scaled up instantly.

Real-Life Analogy
Imagine you need a powerful computer for your business.
You have two choices:
Option 1 - Buy a physical server
You need to:
Buy the hardware
Purchase CPU/RAM/storage
Keep it in a server room
Maintain it
Handle electricity
Handle cooling
Replace damaged hardware
Upgrade hardware when requirements increase






Join the conversation! Your thoughts help the community grow.