Manage a public IP address with an Azure Application Gateway
Azure Application Gateway is a web traffic load balancer that manages traffic to your web applications. Application Gateway makes routing decisions based on attributes of an HTTP request. Examples of attributes such as URI path or host headers. The frontend of an Application Gateway is the connection point for the applications in its backend pool.
An Application Gateway frontend can be a private IP address, public IP address, or both. The V1 SKU of Application Gateway supports basic dynamic public IPs. The V2 SKU supports standard SKU public IPs that are static only. Application Gateway V2 SKU doesn't support an internal IP address as it's only frontend. For more information, see Application Gateway frontend IP address configuration.
In this article, you learn how to create an Application Gateway using an existing public IP in your subscription.
Prerequisites
- An Azure account with an active subscription. Create one for free.
- Two standard SKU public IP addresses in your subscription. The IP addresses can't be associated with any resources. For more information on creating a standard SKU public IP address, see Create a public IP - Azure portal.
- For the purposes of the examples in this article, name the new public IP addresses myStandardPublicIP-1 and myStandardPublicIP-2.
Create Application Gateway existing public IP
In this section, you create an Application Gateway resource. You select the IP address you created in the prerequisites as the public IP for the Application Gateway.
Sign in to the Azure portal.
In the search box at the top of the portal, enter Application gateway.
In the search results, select Application gateways.
Select + Create.
In Create application gateway, enter or select the following information.
Setting Value Project details Subscription Select your subscription. Resource group Select Create new.
Enter myResourceGroupAppGW.
Select OK.Instance details Application gateway name Enter myAppGateway. Region Select (US) West US 2. Tier Leave the default of Standard V2. Enable autoscaling Leave the default of Yes. Minimum instance count Leave the default of 0. Maximum instance count Leave the default of 10. Availability zone Leave the default of Zones 1,2,3. IP address type Select IPv4 only. HTTP2 Leave the default of Enabled. Configure virtual network Virtual network Select Create new.
In Create virtual network, enter myVNet for name.
Leave the default address space in ADDRESS SPACE.
In SUBNETS, change default to myAGSubnet.
Select OK.Select Next: Frontends.
Select myStandardPublicIP-1 for Public IP address in the Frontends tab, or your public IP address.
Select Next: Backends.
Select Add a backend pool.
Enter myBackendPool for name in Add a backend pool and select Add.
Select Next: Configuration.
Select + Add a routing rule. Enter or select the following information.
Setting Value Rule name Enter myRoutingRule. Priority Enter 1. Listener tab Listener name Enter myListener. Frontend IP Select Public IPv4. Protocol Leave the default of HTTP. Port Leave the default of 80. Listener type Leave the default of Basic. Custom errors pages Bad Gateway - 502 Leave empty. Forbidden - 403 Leave empty. Backend targets tab Target type Leave the default of Backend pool. Backend target Select myBackendPool. HTTP settings Select Add new.
Enter myHTTPsetting in Name.
Leave the other settings at the defaults.
Select Add.Select Add.
Select Next: Tags, then Next: Review + create.
Select Create.
Note
This is a simple deployment of an Application Gateway. For advanced configuration and setup, see Quickstart: Direct web traffic with Azure Application Gateway - Azure portal
For more information on Azure Application Gateway, see What is Azure Application Gateway?
Change or remove public IP address
Application gateway doesn't support changing the public IP address after creation.
Note
If a dynamic Basic IP is associated with an Application Gateway frontend, it only changes when the gateway is stopped or started. The DNS name associated with an Application Gateway frontend doesn't change.
Next steps
In this article, you learned how to create an Application Gateway and use an existing public IP.
- For more information about Azure Virtual Network NAT, see What is Azure Virtual Network NAT?.
- To learn more about public IP addresses in Azure, see Public IP addresses.