Page 1 of 1
Remote restriction activation
Posted: Thu Jun 15, 2017 2:58 pm
by darrepac
Hi
I would like to activate some firewall resteiction rules I set through my home automation system (running on a raspberry pi and capable to run any script).
Is there a way to activate / deactivate a restriction rule from outside the router (through a script on the network for example)?
Thx
Re: Remote restriction activation
Posted: Fri Jun 16, 2017 8:30 am
by Lantis
Identify the quota/restriction you want to enable/disable in the /etc/config/firewall config file
Set it's "enabled" option to 0 or 1
Restart the firewall (/usr/lib/gargoyle/firewall_restart.sh)
Re: Remote restriction activation
Posted: Fri Jun 16, 2017 12:41 pm
by darrepac
Sounds good, will give a try, thanks
Re: Remote restriction activation
Posted: Thu Jun 22, 2017 5:27 pm
by darrepac
So I dit it through UCI command but I have an issue to make it happen.
I mean, I change the rule enabled option, then I commit (and I see it in the gargoyle web interface) and then I do
but it doesn't apply the change.
I need to do
to make it working. Sounds to me strange and seems to me like using a sledgehammer to kill a fly...
Is it normal that firewall restart is not enough?
Re: Remote restriction activation
Posted: Thu Jun 22, 2017 6:16 pm
by Lantis
Please re read my first response.
There is a gargoyle specific firewall restart script which restarts all of the gargoyle dependencies.
Using the default restart scripts is not recommended.