- Eda Akturk (eakturk@cisco.com)
- Simon Fang (sifang@cisco.com)
- Python 3.8
- Flask
- Cisco Meraki
The solution creates a flask application that allows to view MX FW rules and download to a csv from a single dashboard.
- When initializing the flask application, we immediately make a GET request to the Meraki Dashboard API
- The Meraki Dashboard API responds with a list of networks part of the organization
- The flask application shows the a list of networks in the organization in a dropdown menu
- The user selects a network from the dropdown menu
- The flask application makes two GET requests to the Meraki Dashboard API to obtain the L3 firewall rules and policy objects that are part of the network
- The Meraki Dashboard API returns both responses
- The flask application combines the L3 firewall rules and the policy objects into one table
- The flask application shows the table with the firewall rules and the nested IP addresses
The front-end of the application looks as follows:
For details please view "Usage" below.
$ git clone (link)
Initialize a virtual environment
virtualenv venv
Activate the virtual env
Windows venv\Scripts\activate
Linux source venv/bin/activate
$ pip install -r requirements.txt
Cisco Meraki
Add the Meraki API Key and Organization Id to env_var.py. Generate your meraki api key in order to use the application. You can find instructions on how to generate an API key here:
https://documentation.meraki.com/General_Administration/Other_Topics/Cisco_Meraki_Dashboard_API
Make sure this API key has write access to both the source and target organization. You can add your account as Full Organization Admin to both organizations by following the instructions here:
The config
variable is a dictionary.
config = {}
config['api_key'] = ""
config['organization_id'] = ""
Run the flask application:
python main.py
Go to the following url:
https://localhost:8000/
Provided under Cisco Sample Code License, for details see LICENSE
Our code of conduct is available here
See our contributing guidelines here
Please note: This script is meant for demo purposes only. All tools/ scripts in this repo are released for use "AS IS" without any warranties of any kind, including, but not limited to their installation, use, or performance. Any use of these scripts and tools is at your own risk. There is no guarantee that they have been through thorough testing in a comparable environment and we are not responsible for any damage or data loss incurred with their use. You are responsible for reviewing and testing any scripts you run thoroughly before use in any non-testing environment.