Azure
The cipr azure command allows you to retrieve IP ranges for Azure Public cloud, sourced from the official ServiceTags JSON.
Usage
cipr azure [flags]
Data Format
You can find data format (and filter value guidelines) of the azure command output here: Azure command data format
Flags
| Flag | Description | Default | Required | Multiple values |
|---|---|---|---|---|
--ipv4 | Get only IPv4 ranges. | ❌ | ❌ | ❌ |
--ipv6 | Get only IPv6 ranges. | ❌ | ❌ | ❌ |
--filter | Filter results using a single string. Syntax: region,service. | ❌ | ❌ | ❌ |
--filter-region | Filter results by Azure region (e.g. westeurope). | ❌ | ❌ | ❌ |
--filter-service | Filter results by Azure system service (e.g. AzureStorage). | ❌ | ❌ | ❌ |
--list | List unique values for a dimension instead of IP ranges. Valid: regions, services. | ❌ | ❌ | ❌ |
--filter cannot be combined with --filter-region or --filter-service. When neither --ipv4 nor --ipv6 is set, both are fetched. --list composes with the --filter* flags but ignores --ipv4/--ipv6. Filter values are case-insensitive.
Source resolution
By default, cipr azure fetches the Microsoft download page (https://www.microsoft.com/en-us/download/details.aspx?id=56519) with a browser User-Agent, scrapes the latest ServiceTags_Public_<date>.json URL from the page, and downloads that JSON. You can also point --source (or azure_endpoint in cipr.toml) directly at:
- a
*.jsonServiceTags URL (no scrape step) - a local file path containing the ServiceTags JSON
- the original Microsoft page URL (default behavior)
If Microsoft serves an anti-bot stub or changes the page layout, cipr azure returns an error suggesting you download the JSON manually and pass --source <path>, or set azure_local_file in the config.
Examples
IP ranges in the 'Output' blocks might not be up to date!
Get all Azure IPv4 ranges
cipr azure --ipv4
...
13.66.143.220/30
20.42.0.0/15
20.50.32.0/19
...
Get Azure IPv6 ranges for the westeurope region with mini verbosity
cipr azure --ipv6 --filter-region westeurope --verbose-mode mini
...
2603:1020:206::/48,westeurope,AzureStorage
...
Get all Azure IP ranges for AzureStorage in westeurope with full verbosity
cipr azure --filter westeurope,AzureStorage --verbose
...
IP Prefix: 20.50.32.0/19, Region: westeurope, Service: AzureStorage
IP Prefix: 2603:1020:206::/48, Region: westeurope, Service: AzureStorage
...
List all Azure regions
cipr azure --list regions
...
eastus
westeurope
westus
...
List Azure services available in westeurope
cipr azure --filter-region westeurope --list services
...
AzureStorage
...