Skip to content

This script overcomes the Azure limitation of exporting Network Security Group rules from all resource groups simultaneously. It automates the process of fetching NSG rules from every resource group within an Azure subscription and generates detailed JSON output for further analysis or auditing

License

Notifications You must be signed in to change notification settings

kuronetwork/Export-azure-all-nsg-rules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

README

English

This script is used to export Azure Network Security Group (NSG) rules to JSON files. The script lists all NSGs and stores each NSG's rules in a directory named nsg-rules-export. Each NSG's rules are saved in a separate JSON file with the filename format {NSGName}_rules.json.

Usage

Preparation

For security and environment considerations, it is recommended to use Azure Cloud Shell to run this script. Alternatively, ensure you have the Azure CLI tool installed and configured, and you are logged in to your Azure account.

Run the Script

After using chmod to elevate permissions, execute the script to export all NSG rules :

./export_nsg_rules.sh

About

This script overcomes the Azure limitation of exporting Network Security Group rules from all resource groups simultaneously. It automates the process of fetching NSG rules from every resource group within an Azure subscription and generates detailed JSON output for further analysis or auditing

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages