Remote restriction activation

General discussion about Gargoyle, OpenWrt or anything else even remotely related to the project

Moderator: Moderators

Post Reply
darrepac
Posts: 31
Joined: Thu Dec 22, 2016 6:00 am

Remote restriction activation

Post 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

Lantis
Moderator
Posts: 6753
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Remote restriction activation

Post 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)
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

darrepac
Posts: 31
Joined: Thu Dec 22, 2016 6:00 am

Re: Remote restriction activation

Post by darrepac »

Sounds good, will give a try, thanks

darrepac
Posts: 31
Joined: Thu Dec 22, 2016 6:00 am

Re: Remote restriction activation

Post 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

Code: Select all

/etc/init.d/firewall  restart 
but it doesn't apply the change.
I need to do

Code: Select all

/etc/init.d/network restart
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?

Lantis
Moderator
Posts: 6753
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Remote restriction activation

Post 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.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

Post Reply