GVE_DevNet_Meraki_MX_Firewall_Provisioner
prototype code to provision L3 and L7 firewall rules to selected Meraki networks
Contacts
Solution Components
Installation/Configuration
This is as a template, project owner to update
- First step will be to include your personal api key inside the config.py file for the script to use
- Next will be to edit the l3 and l7 json files that will help provision the firewall rules.
Make sure to visit https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-firewall-l-3-firewall-rules and https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-firewall-l-7-firewall-rules for reference
[
{
"comment": "test",
"policy": "allow",
"protocol": "tcp",
"destPort": "443",
"destCidr": "192.168.1.0/24",
"srcPort": "Any",
"srcCidr": "Any",
"syslogEnabled": "false"
}
]
- create virtual environment and name it env, then activate it
foo@bar:~$ virtualenv env
foo@bar:~$ source env/bin/activate
- install the dependencies required for the python script
foo@bar(env):~$ pip install -r requirements.txt
- run python script
foo@bar(env):~$ python main.py
Notes
- If a firewall rule depends on specific LAN configurations, the script will error out. Make sure within these firewall rules, that given subnets have already been declared.
Screenshots
MX configuration before launching the script
Firewall L3 and L7 rules declared in the json files
1st step
2nd step
MX configuration after launching the script
LICENSE
Provided under Cisco Sample Code License, for details see LICENSE
CODE_OF_CONDUCT
Our code of conduct is available here
CONTRIBUTING
See our contributing guidelines here
DISCLAIMER:
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.