What’s Coming up with AzurePublicIPAddresses
Just a brief post to discuss the future of the AzurePublicIPAddresses PowerShell module.
Just a brief post to discuss the future of the AzurePublicIPAddresses PowerShell module.
I still believe there is a community need for this module, and as such, am going to continue to support it. The module fills some gapes in the Azure space, allowing for IT professionals to easily determine which addresses belong to each region. I have spoken to a few people who have used the module to help in managing their on-premises firewall rules, etc., they have spoke of how this module has helped them. I want to continue to support them. What is clear, is that I will need to invest some time in making some considerable updates to the module. These are to ensure that the module continues to function.
Microsoft has now flagged that the XML based Microsoft Azure Datacenter IP range files are now deprecated. They will stop updating these files on 2020-06-30. The new mechanism for getting updates is the Azure IP Ranges and Service Tags files. These are JSON formatted and include a break down of IP ranges by region and service. This opens more functionality to the users of the AzurePublicIPAddresses module, allowing the choice of IP ranges based on region and service. Another benefit is support for the US Government Cloud Regions.
I don’t expect it to take me a year to update the module, however with the file format changes, and some of the structural changes in the file, it might take a little effort to ensure that everything works as expected. The plan is to have a beta version available later in the year. My goal is to release version 2, with this and other updates, by the end of the year.
In the meantime, I will continue to support the current module, releasing updates when new regions are made available.
[Updated Module] AzurePublicIPAddresses v1.0.14 has been released
A new version of the AzurePublicIPAddresses module has been released. This includes support for 8 new regions: UAE, South Adrican, Chile, and Brazil.
A new version of the AzurePublicIPAddresses module has been released. This includes support for 8 new regions: UAE, South African, Chile, and Brazil. For more information see the Change Log.
Getting the Module
If you have never used the module before, the easiest way to get AzurePublicIPAddresses is through the PowerShell Gallery:
PS> Install-Module -Name AzurePublicIPAddresses
If you already have the module installed, you can update the module from the PowerShell Gallery with:
PS> Update-Module -Name AzurePublicIPAddresses
You can also download the release from the module’s GitHub Releases page.
Found an issue? Then raise any bugs or feature requests via GitHub Issues.
AzurePublicIPAddresses v1.0 has been released
I'm pleased to announce Version 1.0 of AzurePublicIPAddresses. This version includes support 6 new Azure regions:
Australia Central
Australia Central 2
UK North
UK South 2
North Europe 2 (name TBC)
East Europe (name TBC)
This release also represents a major milestone since the modules creation back in March 2016. The module has proven to be very stable, and hence I'm now giving it the stable 1.0 moniker. I'm confident that the existing design should support any new regions or source XML files that Microsoft may release without the need for breaking changes.
I'm pleased to announce Version 1.0 of AzurePublicIPAddresses. This version includes support 6 new Azure regions:
- Australia Central
- Australia Central 2
- UK North
- UK South 2
- North Europe 2 (name TBC)
- East Europe (name TBC)
This release also represents a major milestone since the modules creation back in March 2016. The module has proven to be very stable, and hence I'm now giving it the stable 1.0 moniker. I'm confident that the existing design should support any new regions or source XML files that Microsoft may release without the need for breaking changes.
What's the future for this module? With the launch of Azure Service Tags, in some respects this module has become less useful, but, I'll maintain the module for the immediate future.
I'm also thinking how this module and the JSON based file for Azure Service Tags should fit together. My current through it to create a separate module that consumes that file and allows you to select addresses by region and service.
Getting the Module
If you have never used the module before, the easiest way to get AzurePublicIPAddresses is through the PowerShell Gallery:
PS> Install-Module -Name AzurePublicIPAddressesIf you already have the module installed, you can update the module from the PowerShell Gallery with:
PS> Update-Module -Name AzurePublicIPAddressesYou can also find the module on GitHub.
Found an issue? Then raise any bugs or feature requests via GitHub Issues.
AzurePublicIPAddresses module now supports the France and Germany Azure Regions
I'm pleased to announce that my PowerShell for working with Azure’s public IP address listings now supports the new Azure Regions in France and Germany. This release, 0.9, introduces some minor breaking changes, needed to support the Germany regions.
Map of Azure Regions as of February 2018
I'm pleased to announce that my PowerShell for working with Azure’s public IP address listings now supports the new Azure Regions in France and Germany. This release, 0.9, introduces some minor breaking changes, needed to support the Germany regions.
Each month of so, I check the Microsoft Azure Datacenter IP Ranges file for new regions. This month, I noticed that the France Central and France South are included.
The Azure Germany regions, Germany Northeast and Germany Central, are managed under a trustee model by T-Systems. This is like that of Azure in China. I hadn’t seen the German regions IP ranges before, but last week I found the file: Windows Azure Datacenter IP Ranges in Germany. My goal always was to support every available Azure Region, as such, I've now included these regions.
I must admit, I didn’t fully design this module to be future proof, I assumed all regions would be included in a single file. I first included Azure in China in version 0.8, with the -ChinaRegion parameter. While functional, this wasn’t future proof. To offer support for Azure Germany, version 0.8 includes some breaking changes in the Get-MicrosoftAzureDatacenterIPRangeFile CMDLet.
With version 0.9, I've removed the -ChinaRegion parameter and replaced it with -Region. This new parameter takes one of 3 values: Standard, China or Germany. This parameter now has this behaviour:
- Standard: the default value, downloads the Microsoft Azure Datacenter IP Ranges file.
- China: downloads the Windows Azure Datacenter IP Ranges in China file
- Germany: downloads the Windows Azure Datacenter IP Ranges in Germany file
If you were separately downloading the China region file, you'll need to ensure that you update your scripts logic.
I've also tweaked Get-MicrosoftazureDatacenterIPRange. The first change was to add support for the extra file to download, and the parameter change. I've also modified the logic around how the CMDLet stores the region information. I don’t expect these changes to cause any issues.
Getting the Module
If you have never used the module before, the easiest way to get AzurePublicIPAddresses is through the PowerShell Gallery:
PS> Install-Module -Name AzurePublicIPAddressesIf you already have the module installed, you can update the module from the PowerShell Gallery with:
PS> Update-Module -Name AzurePublicIPAddressesYou can also find the module on GitHub.
Found an issue? Then raise any bugs or feature requests via GitHub Issues.
New version of AzurePublicIPAddresses module (0.8.3)
I have just released a new version of the AzurePublicIPAddress module (0.8.) to the PowerShell Gallery.
There are no major changes, just the additional support for the new Korea Regions:
- Korea South
- Korea Central
You can get the module from:
Kieran Jacobsen
New version of AzurePublicIPAddresses module (0.8.2)
I have just released a new version of the AzurePublicIPAddress module to the PowerShell Gallery.
There are no major changes, just the additional support for two new US Regions:
- Central US EUAP
- East US 2 EUAP
I cannot see much documentation on what these new regions are, I suspect they are the US Government regions.
The only other major change is that all the Pester Tests are now enabled. Previously the UK regions did not have any values in the XML file, these are now being published correctly.
You can get the module from:
Kieran Jacobsen
Azure China Region support for AzurePublicIPAddresses
Photo courtesy of Microsoft. https://azure.microsoft.com/en-us/regions/
I am happy to announce version 0.8.1 of Azure Public IP Addresses PowerShell module.
With this release, the module now supports the China North and China East Azure regions.
Microsoft’s China Azure regions are operated by 21Vianet, Microsoft publishes the IP subnets for these regions in a separate file to the other regions, Windows Azure Datacenter IP Ranges in China.
To implement this functionality, some changes have been made to the module. Important Note: these changes do not break any existing functionality and should not impact existing code.
Get-MicrosoftAzureDatacenterIPRangeFile
The switch parameter, -ChinaRegion has been added to the Get-MicrosoftAzureDatacenterIPRangeFile CMDLet. When this parameter is specified, the then China region specific file will be downloaded; if it is absent, then it will download the general region file.
Additional validation has been added to the -Path parameter. Invalid paths should no longer be accepted.
Get-MicrosoftAzureDatacenterIPRange
This function has been to support the China North and China East Regions much like adding any other region.
Changes were required for the -path parameter. When this parameter is absent, both files are automatically downloaded. When -path is present, the CMDLet will now inspect the file spectified, and generate a warning that some Azure regions will be unavailable.
One additional change has been made to this CMDLet. The -AzureRegion parameter will now accept an array containing regions. I have also added additional validation to this parameter to ensure invalid data is not passed in (via [ValidateNotNullOrEmpty()]).
I have attempted to quite throughly test the changes to this CMDLet using Pester, and have expanded the number of included tests to ensure there are no changes.
Getting the module
The module is available via the PowerShell Gallery and GitHub.
Missing Regions
Unfortunately, there is still no support for the following regions:
- US Gov Texas
- US Gov Virginia
- US DoD Central
- US DoD East
- Germany Northeast
- Germany Central
These regions are not included in either of the region files, nor are they in their own region. If and when they are available, I will include support for them.
It should also be noted that currently the UK West region is missing from the Microsoft Azure Datacenter IP Ranges file. I have reached out to Azure support to resolve this.
How Big Is That Subnet?
I recently had a long list of IPv4 CIDR addresses and wanted to know how many hosts there were in total. Looking at the list, there was a mix of common sizes, /29, /24 and /16 but there were a few I just don’t know off the top of my head. The list was long, and it would have be tedious work manually calculating each.
Get-SubnetSize
So, I did what any IT professional in my shoes would do, I wrote some code. The Get-SubnetSize CMDLet will return the total number of usable (often referred to as the number of host) addresses for a specified subnet.
By default, it doesn't count the subnet ID or the broadcast addresses, however, there is a switch -IncludeSubnetIDAndBroadcastAddress, to include those if need them included.
Working with Get-SubnetSize
To work out the size of the subnet 172.16.0.0/24, we simply call: Get-SubnetSize -CIDR 172.16.0.0/24 which will return 254.
Get-SubnetSize -CIDR ’172.16.0.0/24’
What about if we had a subnet mask? Well we can work that out as well! How big is 255.0.0.0? Get-SubnetSize -Subnetmask 255.0.0.0 returns 16777214.
Get-SubnetSize -Subnetmask '255.0.0.0'
How many public IP addresses does Azure use?
Previously I have written about my AzurePublicIPAddresses module in my post, Working with Azure’s public IP addresses. This module allows you to obtain the public IP addresses available in each Azure Region. The module is updated for each new Azure Region that Microsoft introduces.
Combining Get-MicrosoftAzureDatacenterIPRange, Get-SubnetSize and Measure-Object together, we can create a one-liner that will give us the total number of subnets and IP addresses.
Get-MicrosoftAzureDatacenterIPRange | Select-Object -ExpandProperty Subnet | Get-SubnetSize | Measure-Object -Sum
Get-MicrosoftAzureDatacenterIPRange | Select-Object -ExpandProperty Subnet | Get-SubnetSize | Measure-Object -Sum
And we can see that there are 2621 Subnets and a whopping 7,613,174 IP addresses!!
Getting the module
Posh-SubnetTools is available from the PowerShell Gallery or from the project’s GitHub page.
This module should work with all versions of PowerShell, including PowerShell Core. I have tested the module on PowerShell 5.1 (Windows 10 Insiders).
I appreciate any issues, pull requests or comments that you may have. Have an idea for a new CMDLet, make a pull request and I will include it!