Load Balance Secure Internal Traffic
In this lab, you will configure an Internal Load Balancer, Service Endpoints and NSGs to distribute traffic across multiple back-end VMs, secure connectivity, and enable secure Azure SQL Database access. You will validate connectivity from a front-end VM using SSH and curl via public IPs.
Pre-Provisioned Resources
The following resources are already deployed for you:
- Virtual Networks:
FrontEndVNet(10.0.0.0/16) withFrontEndSubnet(10.0.1.0/24)BackEndVNet(10.1.0.0/16) withBackEndSubnet(10.1.1.0/24)
- Virtual Machines:
FrontEndVMinFrontEndSubnet(Ubuntu withcurlinstalled)BackEndVM1andBackEndVM2inBackEndSubnet(Ubuntu with Apache or Nginx installed)
- NSGs: Attached to subnets with default rules.
- Public IPs: Assigned to front-end VM for SSH access.
- Azure SQL Database: Pre-created in the same region (students will secure it with Service Endpoints).
Please sign in to launch lab.
Connection Details
- Use SSH to connect to VMs:
ssh labuser@<public-ip>- Credentials will be provided by your instructor.
Your Tasks
Task 1: Configure Internal Load Balancer
- Create an Internal Load Balancer in
BackEndSubnet. - Assign a static private IP (e.g.,
10.1.1.100). - Create a backend pool with
BackEndVM1andBackEndVM2. - Add a health probe (TCP 80).
- Create a load balancing rule for HTTP (port 80).
Task 2: Update NSGs
- On
BackEndSubnetNSG:- Add an Allow inbound rule for traffic from
FrontEndSubneton port 80. - Ensure no other inbound traffic is allowed.
- Add an Allow inbound rule for traffic from
- On
FrontEndSubnetNSG:- Allow outbound traffic to
BackEndSubneton port 80.
- Allow outbound traffic to
Task 3: Enable Service Endpoints
- On
BackEndSubnet, enable Service Endpoint for Microsoft.Sql. - In Azure SQL Database firewall settings:
- Allow access from the BackEndSubnet.
Task 4: Validate
- SSH into
FrontEndVMusing its public IP. - Run:
curl http://10.1.1.100- Refresh multiple times to confirm traffic alternates between
BackEndVM1andBackEndVM2.
- Test SQL connectivity (optional):
sqlcmd -S <sql-server-name>.database.windows.net -U <username> -P <password>Success Criteria
- Internal Load Balancer distributes traffic between back-end VMs.
- NSG rules enforce tier isolation.
- Service Endpoint secures SQL access from BackEndSubnet only.
Optional Challenge
- Add a second load balancing rule for HTTPS.
- Configure session persistence on the ILB.