cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3566
Views
4
Helpful
4
Replies

Create l3 firewall Rules?

nalbacas
Cisco Employee
Cisco Employee

Is there a way to create L3 firewall rules using API?

I am trying to migrate one Checkpoint FW to a Meraki MX, and I have a CSV file with the firewall rules.

The documentation only shows GET and Update firewall rules

image.png

Any idea?

1 Accepted Solution

Accepted Solutions

aleabrahao
Meraki Community All-Star
Meraki Community All-Star

The only way is to do a GET to a file, edit it by adding the new rule and then perform the PUT, that is, there is no other way.

I am not a Cisco employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.

View solution in original post

4 Replies 4

aleabrahao
Meraki Community All-Star
Meraki Community All-Star

The only way is to do a GET to a file, edit it by adding the new rule and then perform the PUT, that is, there is no other way.

I am not a Cisco employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.

ByronZ
Community Member

You will have to convert the existing firewall rule from your csv into json format and use the API's update PUT operation to apply the firewall rules. If you are not sure what fields are needed in the json file, you can find one by doing a GET to retrieve it from the MX.

frankvdveen
Level 4
Level 4

Hi as mentioned get the current rules, add your own and update:

In python that will be something like this:
l3Settings = dashboard.appliance.getNetworkApplianceFirewallL3FirewallRules(<network_id>)
# print (l3Settings['rules']) <-- add your rules

# Update:
response = dashboard.appliance.updateNetworkApplianceFirewallL3FirewallRules(<network_id>, rules=l3Settings['rules'])