[Solved] Using Api to toggle Firewall rules

Started by dasbrow, January 10, 2022, 05:17:55 PM

Previous topic - Next topic
January 10, 2022, 05:17:55 PM Last Edit: January 11, 2022, 03:50:35 PM by dan@providecom.com
I have a firewall rule under firewall->Rules->Lan to block Roblox while my kids are doing online schooling. Works great if I enable /disable it via the GUI. Unfortunately I can't see the rule via api calls, I want to automate blocking non school sites during class times.

Ie:
curl -k -u "YouKnowNothing":"JonSnow" https://192.168.254.249/api/firewall/searchRules
Returns:
{"rows":[],"rowCount":0,"total":0,"current":1}
or
curl -k -u "YouKnowNothing":"JonSnow" https://192.168.254.249/api/firewall/getRule/UUID
Returns:
[]

No idea what I am missing here. Please help my sanity and give me guidance.

Thanks in advance.

EDIT: I can't upgrade to 21.x until the weekend.


This solved everything. Greatly appreciated.