Closed lblabr closed 5 years ago
Yes - I'd recommend you take a look into functions rule_get
and then use a config_patch
to achieve this - once you get something going it would be nice to add this as an example, rule management requests are fairly common here - N
Perhaps also take a look at the Python example code here to give you some ideas:- https://github.com/ndejong/pfsense_fauxapi/tree/master/extras/examples
I believe this python script is what you are looking for https://github.com/EpaL/kindercontrol.
great, i may have a look
@lblabr would be good to hear back if you managed to address your requirement.
I'd suggest also taking a look at the new Python based interface which also happens to provide a command-line interface as well
Regardless, you'll want to use the FauxAPI rule_get
and config_patch
functions to achieve what you are looking for.
i'd like to enable/disable or toggle a firewall rule through your rest api, do you think thats possible ?