This script generate group objects with the IP addresses of Microsoft Azure.
Download Microsoft's Azure Datacenter IP ranges from: https://www.microsoft.com/en-us/download/details.aspx?id=41653
Run the attached Python script (the script does not have to run on the management server).
Provide the script with: the management's server IP address, username, password, the path for the downloaded file from Microsoft.
The script will now generate:
- Over 3000 networks (for example: azure_network_184.108.40.206/19)
- about 30 Group objects, one for each Azure region (for example: azure_region_useast)
- and a group object called azure_region_all - a group object that contain all the group region objects.
When you get an updated file from Microsoft, you can run the tool again. When running for the second time the script will work much faster: instead of creating thousands of objects, it will only process the changes.
Download the attached zip and extract it on any machine with Python 2.7.x.
Code version 1.0.2
Tested on version
R80, API version 1.0
NOTICE: By using this sample code you agree to terms and conditions in this Terms and Conditions