Raw New Markdown
Generating updated version of doc...
Rendered New Markdown
Generating updated version of doc...
---
title: "Quickstart: Create a public load balancer - Azure portal"
titleSuffix: Azure Load Balancer
description: Learn how to create a public load balancer using the Azure portal.
author: mbender-ms
ms.service: azure-load-balancer
ms.topic: quickstart
ms.date: 07/07/2026
ai-usage: ai-assisted
ms.author: mbender
ms.custom:
- mvc
- mode-ui
- template-quickstart
- engagement-fy23
- sfi-image-nochange
#Customer intent: I want to create a load balancer so that I can load balance internet traffic to VMs.
# Customer intent: As a cloud engineer, I want to create a public load balancer to distribute internet traffic across multiple virtual machines, so that I can ensure high availability and efficient resource utilization for my applications.
---
# Quickstart: Create a public load balancer to load balance VMs by using the Azure portal
Get started with Azure Load Balancer by using the Azure portal to create a public load balancer for a backend pool with two virtual machines. Other resources include Azure Bastion, NAT Gateway, a virtual network, and the required subnets.
After you create the resources and install IIS on the backend virtual machines, [test the load balancer](#test-the-load-balancer) by browsing to its public IP address.
:::image type="content" source="media/quickstart-load-balancer-standard-public-portal/public-load-balancer-overview.png" alt-text="Diagram of resources deployed for a standard load balancer implement." lightbox="media/quickstart-load-balancer-standard-public-portal/public-load-balancer-overview.png":::
## Prerequisites
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn).
## Sign in to Azure
Sign in to the [Azure portal](https://portal.azure.com).
[!INCLUDE [load-balancer-create-bastion](../../includes/load-balancer-create-bastion.md)]
## Create load balancer
In this section, you create a zone redundant load balancer that load balances virtual machines. With zone redundancy, one or more availability zones can fail and the data path survives as long as one zone in the region remains healthy.
During the creation of the load balancer, you configure:
* Frontend IP address
* Backend pool
* Inbound load-balancing rules
* Health probe
### Configure basic settings
1. In the search box at the top of the portal, enter **Load balancer**. Select **Load balancers** in the search results.
1. In the **Load balancing and content delivery** page, select **+ Create** > **Standard Load Balancer** from the dropdown menu.
1. In the **Basics** tab of the **Create load balancer** page, enter or select the following information:
| Setting | Value |
| --- | --- |
| **Project details** | |
| Subscription | Select your subscription |
| Resource group | Select **load-balancer-rg** |
| **Instance details** | |
| Name | Enter **load-balancer** |
| Region | Select **East US** |
| SKU | Leave the default **Standard** |
| Type | Select **Public** |
| Tier | Leave the default **Regional** |
:::image type="content" source="./media/quickstart-load-balancer-standard-public-portal/create-standard-load-balancer.png" alt-text="Screenshot of create standard load balancer basics tab." border="true":::
1. Select **Next: Frontend IP configuration** at the bottom of the page.
### Create the frontend IP configuration
This quickstart uses an IPv4 frontend. Select the same IP version later when you create the load-balancing rule.
1. In **Frontend IP configuration**, select **+ Add a frontend IP configuration**.
1. Enter **lb-frontend** in **Name**.
1. Select **IPv4** for the **IP version**.
1. Select **IP address** for the **IP type**.
> [!NOTE]
> For more information on IP prefixes, see [Azure Public IP address prefix](../virtual-network/ip-services/public-ip-address-prefix.md).
1. Select **Create new** in **Public IP address**.
1. In **Add a public IP address**, enter **lb-frontend-ip** for **Name**.
1. Select **Zone-redundant** in **Availability zone**.
> [!NOTE]
> In regions with [Availability Zones](/azure/reliability/availability-zones-overview?toc=%2fazure%2fvirtual-network%2ftoc.json), you can select zone-redundant (default option) or a specific zone. The choice depends on your specific domain failure requirements. In regions without Availability Zones, this field doesn't appear.</br> For more information on availability zones, see [Availability zones overview](/azure/reliability/availability-zones-overview).
1. Leave the default of **Microsoft Network** for **Routing preference**.
1. Select **Save**.
1. Select **Save**.
1. Select **Next: Backend pools** at the bottom of the page.
### Create the backend pool
1. In the **Backend pools** tab, select **+ Add a backend pool**.
1. Enter **lb-backend-pool** for **Name** in **Add backend pool**.
1. Select **lb-vnet** in **Virtual network**.
1. Select **IP Address** for **Backend Pool Configuration**.
1. Select **Save**.
1. Select **Next: Inbound rules** at the bottom of the page.
### Create the inbound load-balancing rule
This quickstart uses a NAT gateway for outbound internet access, so you don't configure outbound rules. Leave the outbound SNAT setting at its default value in the following rule.
1. Under **Load balancing rule** in the **Inbound rules** tab, select **+ Add a load balancing rule**.
1. In **Add load balancing rule**, enter or select the following information:
| Setting | Value |
| ------- | ----- |
| Name | Enter **lb-HTTP-rule** |
| IP Version | Select **IPv4** to match the **lb-frontend** configuration you created |
| Frontend IP address | Select **lb-frontend (To be created)** |
| Backend pool | Select **lb-backend-pool** |
| Protocol | Select **TCP** |
| Port | Enter **80** |
| Backend port | Enter **80** |
| Health probe | Select **Create new**.</br> In **Name**, enter **lb-health-probe**.</br> Select **HTTP** in **Protocol**.</br> Leave the rest of the defaults, and select **Save**. |
| Session persistence | Select **None**. |
| Idle timeout (minutes) | Enter or select **15** |
| Enable TCP reset | Select checkbox |
| Enable Floating IP | Leave unchecked |
| Outbound source network address translation (SNAT) | Leave the default of **(Recommended) Use outbound rules to provide backend pool members access to the internet.** |
1. Select **Save**.
1. Select the blue **Review + create** button at the bottom of the page.
1. Select **Create**.
> [!NOTE]
> In this example, you create a NAT gateway to provide outbound Internet access. The outbound rules tab in the configuration is bypassed as it's optional and isn't needed with the NAT gateway. For more information on Azure NAT gateway, see [What is Azure Virtual Network NAT?](../nat-gateway/nat-overview.md)
> For more information about outbound connections in Azure, see [Source Network Address Translation (SNAT) for outbound connections](../load-balancer/load-balancer-outbound-connections.md)
[!INCLUDE [load-balancer-create-2-virtual-machines](../../includes/load-balancer-create-2-virtual-machines.md)]
[!INCLUDE [ephemeral-ip-note.md](~/reusable-content/ce-skilling/azure/includes/ephemeral-ip-note.md)]
## Install IIS
1. In the search box at the top of the portal, enter **Virtual machine**. Select **Virtual machines** in the search results.
1. Select **lb-VM1**.
1. On the **Overview** page, select **Connect**, and then select **Bastion**.
1. Enter the username and password that you provided during VM creation.
1. Select **Connect**.
1. On the server desktop, go to **Start** > **Windows PowerShell** > **Windows PowerShell**.
1. In the PowerShell window, run the following commands to:
* Install the IIS server.
* Remove the default iisstart.htm file.
* Add a new iisstart.htm file that displays the name of the VM.
```powershell
# Install IIS server role
Install-WindowsFeature -name Web-Server -IncludeManagementTools
# Remove default htm file
Remove-Item C:\inetpub\wwwroot\iisstart.htm
# Add a new htm file that displays server name
Add-Content -Path "C:\inetpub\wwwroot\iisstart.htm" -Value $("Hello World from " + $env:computername)
```
1. Close the Bastion session with **lb-VM1**.
1. Repeat steps 1 to 8 to install IIS and the updated iisstart.htm file on **lb-VM2**.
## Test the load balancer
1. In the search box at the top of the page, enter **Public IP**. Select **Public IP addresses** in the search results.
1. In **Public IP addresses**, select **lb-frontend-ip**.
1. Copy the item in **IP address**. Paste the public IP into the address bar of your browser. The custom VM page of the IIS Web server is displayed in the browser.
:::image type="content" source="./media/quickstart-load-balancer-standard-public-portal/load-balancer-test.png" alt-text="Screenshot of load balancer test":::
## Clean up resources
When you no longer need the resources, delete the resource group, load balancer, and all related resources. To do so, select the resource group **load-balancer-rg** that contains the resources and then select **Delete**.
## Next steps
In this quickstart, you:
* Created an Azure Load Balancer
* Attached two VMs to the load balancer
* Tested the load balancer
To learn more about Azure Load Balancer, continue to:
> [!div class="nextstepaction"]
> [What is Azure Load Balancer?](load-balancer-overview.md)