SSH Command to Enable/Disable Device Filtering
Is there a command line means of enabling or disabling filtering per device such as "block Internet on kid's laptop" or a way to enable social hour?
I'd like to setup ssh automation with home assistant to perform operations against firewalla based on home assistant events.
Lets say "Home assistant has an automation for Bedtime which sets lights and disables the kid's laptop Internet access".
-
This line https://github.com/firewalla/firewalla/blob/6b09b1d9cb0a87db96dce49f6ded1a99b1ec307f/api/app-local.js#L77 doesn't load the api's if not a beta of development version.
if i change the following line from return True to return False then the app-local will load all the routes and i can interact with the api.
enabling this appears to open it for unauthenticated access as it appears to be bound to all interfaces rather than localhost only. how can i access the api in an authenticated and secure manner?
i can use the following to get a list of all the policies
curl http://127.0.0.1:8834/v1/policy/listthen use the following to "pause" or "resume" the policy as identified in the app
curl -d -H http://127.0.0.1:8834/v1/policy/<int>/disable
curl -d -H http://127.0.0.1:8834/v1/policy/<int>/enablei can use the following to get the "disabled" state
curl http://127.0.0.1:8834/v1/policy/<int>i can use a pubkey to ssh and execute the curl statements and create an effective means to automate enabling and disabling policies.
Please sign in to leave a comment.
Comments
3 comments