Page 1 of 1

Toggle external access for some devices

Posted: Sat Sep 18, 2021 7:55 am
by caramba
Hi.

I'd like to enable or disable external (WAN) access for some devices, while letting them access the LAN. Is there a plugin
or something like that with a "push-button" method from the web UI ?

Thanks.

Re: Toggle external access for some devices

Posted: Sat Sep 18, 2021 9:46 am
by Lantis
Firewall -> Restrictions

Re: Toggle external access for some devices

Posted: Sat Sep 18, 2021 1:26 pm
by caramba
shame
on
me

I've already set up several ones and I don't understand why I didn't figure that out :(

Re: Toggle external access for some devices

Posted: Sat Sep 18, 2021 8:31 pm
by Lantis
Easy to overlook what's right under your nose :)

Re: Toggle external access for some devices

Posted: Sun Sep 19, 2021 5:12 am
by caramba
Maybe I'm growing old but this kind of stuff happens more and more recently.

On the same line, is there a CLI command I could use to toggle these access ?

I need an easy way for my wife to allow/disallow internet access for my children devices. So I plan to have her click on a termux widget on her phone that does :

Code: Select all

ssh -t myrouter command-toggle-access <device>

Re: Toggle external access for some devices

Posted: Sun Sep 19, 2021 7:02 am
by Lantis
You'll need to find the rule number in /etc/config/firewall. They should start with "rule_".

There is an "enable" flag which is set to 0 or 1 which you can toggle using

Code: Select all

uci set firewall.rulesection.enable = 1
Once you've done that you need to issue an

Code: Select all

sh /usr/lib/gargoyle/restart_firewall.sh
This will cause a momentary loss in connectivity while everything fires up again.

Re: Toggle external access for some devices

Posted: Sun Sep 19, 2021 10:32 am
by caramba
Thanks a lot !