Lab 3_ Azure Networking _ Security Basic
Lab 3_ Azure Networking _ Security Basic
Objective
Understand and configure Azure virtual networks, and ensure secure communication between
resources.
td
task:
Create a VNet, configure subnets, set up Network Security Groups (NSGs), and implement
tl
Azure Firewall
Pv
Step 1: Create an Azure Virtual Network (VNet)
ng
- Go to [Azure Portal](https://portal.azure.com) and sign in with your account.
5. Create Subnets:
- **Subnet Name**: Name your subnet (e.g., `webSubnet` for web tier and `dbSubnet` for
AL
database tier).
- **Subnet Address Range**: Enter address ranges for each subnet, ensuring they fall within
the VNet address space (e.g., `10.0.1.0/24` for `webSubnet` and `10.0.2.0/24` for `dbSubnet`).
---
Step 2: Configure Subnets for Different Tiers
To improve security, each application tier can be isolated in its own subnet.
td
Step 3: **Set Up Network Security Groups (NSGs)
tl
**NSGs** control inbound and outbound traffic at the subnet or NIC level by creating security
rules.
Pv
1. Create an NSG
- In the search bar, type **Network Security Group** and select the service.
- Click **Create** and fill in the following:
ng
- **Name**: `webNSG` (for the web tier) and `dbNSG` (for the database tier).
- **Resource Group**: Use the same resource group (`MyResourceGroup`).
ni
- **Location**: Select the same region as your VNet.
ar
2. Create NSG Rules
- Once your NSGs are created, navigate to **Inbound Security Rules** in the NSG for
Le
`webNSG`.
- Click Add a rule to allow HTTP (port 80) and SSH (port 22) traffic.
- Destination Port Ranges: `80, 22`
- Priority: 100 (lower numbers have higher priority).
IE
- For **dbNSG**, configure rules to allow traffic only from the `webSubnet`:
AF
- Click **Associate**, select the VNet (`MyVNet`), and associate `webNSG` with `webSubnet`,
and `dbNSG` with `dbSubnet`.
An **Azure Firewall** provides network security by monitoring and controlling inbound and
outbound traffic for Azure VNet.
td
- Once your firewall is deployed, configure **Network Rules** and **Application Rules** to
control traffic.
tl
Network Rules (for controlling layer 3/4 traffic):
Pv
- Allow HTTP and HTTPS traffic to the web tier (`webSubnet`).
- Restrict traffic between the web and database tiers.
ng
- Create rules for specific domain filtering, allowing or denying access to certain websites from
your VMs.
---
N
1. Deploy Virtual Machines in your subnets (you can use the ARM template in the previous
steps or create them manually through the portal).
- Deploy one VM in `webSubnet` and one in `dbSubnet`.
- Use NSGs and firewall rules to ensure that the web VM can access the database VM on the
allowed ports (e.g., SQL on port 1433).
2. Test Connectivity
- SSH into the web VM and try accessing resources within the network and on the internet.
- Verify that the database VM is only accessible from the web VM by testing connections on
the allowed port (e.g., SQL traffic).
---
td
Summary
By following these steps, you’ve set up a **VNet** with **subnets** and **Network Security
tl
Groups** for tiered security and deployed an **Azure Firewall** for advanced traffic filtering. This
configuration ensures secure communication between your resources while controlling inbound
Pv
and outbound traffic as part of a secure Azure infrastructure.
ng
ni
ar
Le
IE
AF
N
AL