azure-powershell icon indicating copy to clipboard operation
azure-powershell copied to clipboard

Setting ReverseFqdn in New-AzureRmPublicIpAddress

Open theMichaelB opened this issue 11 years ago • 5 comments

In order to set the ReverseFqdn for a new public IP the ReverseFqdn needs to be already registered to an Azure IP This means that the workflow for creating a new ReverseFqdn for a new service is very convoluted.

  1. call New-AzureRmPublicIpAddress without a ReverseFqdn
  2. register the IP address with the Fqdn you require
  3. call New-AzureRmPublicIpAddress with ReverseFqdn registered in 2
  4. register the IP address allocated in 3 to the Fqdn
  5. delete IP address registered in 2

There needs to be the ability to create a verified domain name that can then be authorised to create any ReverseFqdn. So that if awverify.example.com points to an subscription level azure resource, it will allow any other ReverseFqdn to be created. (I realise this is probably outside of the scope of Azure-Powershell specifically! - but I'm hoping for a workaround!)

theMichaelB avatar Dec 01 '15 01:12 theMichaelB

Can you explain how to register the IP address with the Fqdn in setup 2? Is there a command for that or is this at the registar for the domain?

ZoesDev avatar Jan 12 '16 04:01 ZoesDev

@crazyonerob I used the ReverseFqdn property on Microsoft.Network/publicIPAddresses in a resource template

  "properties": {
    "publicIPAllocationMethod": "Dynamic",
    "dnsSettings": {
      "domainNameLabel": "[variables('PublicDNS2')]",
       "ReverseFqdn": "[concat(parameters('vmName2'), '.', variables('domainname'))]"
    }

theMichaelB avatar Jan 12 '16 05:01 theMichaelB

Can You give please Azure Powershell commands for all 5 steps?

MartinsBonders avatar Jan 19 '16 12:01 MartinsBonders

I was having similar troubles setting the Reverse FQDN until I noticed in the powershell source code it requires a DomainNameLabel to also be specified

feedthedogs avatar Feb 26 '16 05:02 feedthedogs

@MartinsBonders @feedthedogs there is a solution on Stackoverflow - http://stackoverflow.com/questions/35092478/reverse-dns-with-static-ip-while-using-azure-resource-manager

theMichaelB avatar Feb 26 '16 23:02 theMichaelB