Archive > 20.7 Legacy Series

[Solved] Using Api to toggle Firewall rules

(1/1)

dasbrow:
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.

Fright:
https://forum.opnsense.org/index.php?topic=16943.0 ?

dasbrow:
This solved everything. Greatly appreciated.

Navigation

[0] Message Index

Go to full version