Azure
The cipr azure command retrieves IP ranges for Azure Public cloud.
Usage
cipr azure [flags]
Data Format
See the Azure command data format for output fields and filter-value guidance.
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. | ❌ | ❌ | ❌ |
The individual filter flags accept comma-separated values. Values within one flag use OR matching, while separate filter flags use AND matching. For example, --filter-region westeurope,eastus --filter-service AzureStorage,AzureKeyVault selects either service in either region.
--filter keeps its region,service syntax and 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 and caching
The configured source key is azure, with these default settings:
azure_endpoint = "https://www.microsoft.com/en-us/download/details.aspx?id=56519"
azure_local_file = ""
azure_cache_ttl = "24h"
Use cipr configure azure to inspect the effective values.
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.
Microsoft publishes updated Service Tags files regularly. Use --no-cache when a run must fetch the current publication instead of a valid cached response.
Examples
IP ranges in the output examples are snapshots and might not be current.
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 Azure Storage or Key Vault ranges in westeurope or eastus
cipr azure --filter-region westeurope,eastus --filter-service AzureStorage,AzureKeyVault
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
...