ndejong / pfsense_fauxapi

REST based API interface for pfSense 2.3.x and 2.4.x to facilitate devops
Apache License 2.0
354 stars 61 forks source link

make firewall rule with python fauxapi #73

Closed kevin-fontys closed 3 years ago

kevin-fontys commented 3 years ago

hey,

I'm trying to add a firewall rule with the help of the fauxapi API via python but i can't seem to find an example of how to do it. i read in another issue that you needed to export the entire config, edit it and then upload the entire config back to pfsense. however i have no idea what to edit or where to put the new rule. is it possible to you to make an example of how to add a rule via this methode? -Kevin

CloudAc commented 3 years ago

Just create an example firewall rule and request the config data with config_get. Then you can inspect how this rule has been setup.

ndejong commented 3 years ago

Agreed - this would make a good Python client example to add to the collection here -

Closing this ticket and adding the idea-for-example to the pfsense_fauxapi_client_python repo