External / public facing URLs on Azure

Afzal, Haroon 21 Reputation points
2022-10-26T01:10:45.74+00:00

What is the best way to list down all of my internal facing URLs? Some Apps are behind Front-door, some are behind Load Balancer + Frontdoor and some apps are directly connected behind App GW. What is the best approach to list down all the existing internet facing Apps?

Azure Front Door
Azure Front Door
An Azure service that provides a cloud content delivery network with threat protection.
573 questions
Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
953 questions
Azure Web Application Firewall
0 comments No comments
{count} votes

Accepted answer
  1. KapilAnanth-MSFT 34,606 Reputation points Microsoft Employee
    2022-10-26T10:34:13.803+00:00

    Hi @Afzal, Haroon ,

    Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.
    I understand that you would like to list your "internal facing URLs".

    I am afraid I did not quite understand what you refer by internal facing URLs.

    Do you mean all the custom domains that are associated with your AppGateway, FrontDoor and Load balancer.

    • If you look at App gateway and Load Balancers, they are not created with a domain name in the platform
    • Instead, they only have public IPs associated with them, and later, the user creates some DNS mapping to them (not necessarily always done from Azure)
    • Also, they do not have any property for custom domains which we can list
    • However, you should be able to list the IPs belonging to LoadBalancers and App Gateways
    • Just navigate to the App gateway / Load Balancer section from the Portal, and edit the column view to display the public IP address
    • List item
    • List item
    • The below Powershell script can help you get the IP Addresses if you are looking to automate.

    For AppGateway,

    $AppGws = Get-AzApplicationGateway
    foreach($AppGw in $AppGws){
    $FrontEndIPs= Get-AzApplicationGatewayFrontendIPConfig -ApplicationGateway $AppGw
    foreach($obj in $FrontEndIPs){
    Write-Host "Name of AppGateway:" $AppGw.Name
    Write-Host "ResourceGroup of AppGateway:" $AppGw.ResourceGroupName
    if($obj.PrivateIPAddress){
    Write-Host "PrivateIPAddress: " $obj.PrivateIPAddress
    }else{
    $resource = Get-AzResource -ResourceId $obj.PublicIPAddress.Id
    $publicIp = Get-AzPublicIpAddress -ResourceGroupName $resource.ResourceGroupName -Name $resource.Name
    Write-Host "PublicIPAddress: " $publicIp.IpAddress
    Write-Host " "
    }
    }
    }

    For LoadBalancers

    $LBs = Get-AzLoadBalancer
    foreach($LB in $LBs){
    $FrontEndIPs= Get-AzLoadBalancerFrontendIpConfig -LoadBalancer $LB
    foreach($obj in $FrontEndIPs){
    Write-Host "Name of Load Balancer:" $LB.Name
    Write-Host "ResourceGroup of Load Balancer:" $LB.ResourceGroupName
    if($obj.PrivateIPAddress){
    Write-Host "PrivateIPAddress: " $obj.PrivateIPAddress
    Write-Host " "
    }else{
    $resource = Get-AzResource -ResourceId $obj.PublicIPAddress.Id
    $publicIp = Get-AzPublicIpAddress -ResourceGroupName $resource.ResourceGroupName -Name $resource.Name
    Write-Host "PublicIPAddress: " $publicIp.IpAddress
    Write-Host " "
    }
    }
    }

    You can further modify the above scripts to suit your requirements.
    I hope this helps.

    Thanks,
    Kapil

    ----------------------------------------------------------------------------------------------------------------

    Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.


0 additional answers

Sort by: Most helpful