How to Export Firewall Rules from your SDDC
search cancel

How to Export Firewall Rules from your SDDC

book

Article ID: 327808

calendar_today

Updated On:

Products

VMware

Issue/Introduction

This article lists out steps to export firewall rules from your VMC SDDC.


Resolution

Pre-Requisites:
  • ORG ID = Can be found from the support tab of the SDDC
  • SDDC ID = Can be found from the support tab of the SDDC
  • O Auth Token or API token = Login into Cloud Portal (https://console.cloud.vmware.com) . Navigate to My Account > API Tokens > Generate Token > Give a name, select All Roles > Generate. (Note down the API Token somewhere safe)
  • Make sure you have python installed on your desktop. Python version 3.0 and above is needed.
  • Packages that needs to be installed/present on desktop - requests, json, argparse (Command to install these packages. e.g. pip install requests)

Command Syntax:
python ExportVMCFWRules.py orgid sddcid refreshtoken > outFile.json
 
Output:
outFile.json = This file will have all Firewall rules which includes Management Gateway Rules, Compute Gateway Rules and Distributed Firewall rules.

Script:
Has been attached with this article. (Under Attachments)

Attachments

Export_NSX-T_FW_config_from_an_SDDC get_app