Toggle external access for some devices

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

Moderator: Moderators

Post Reply
caramba
Posts: 4
Joined: Sat Sep 18, 2021 5:30 am

Toggle external access for some devices

Post 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.

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

Re: Toggle external access for some devices

Post by Lantis »

Firewall -> Restrictions
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.

caramba
Posts: 4
Joined: Sat Sep 18, 2021 5:30 am

Re: Toggle external access for some devices

Post by caramba »

shame
on
me

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

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

Re: Toggle external access for some devices

Post by Lantis »

Easy to overlook what's right under your nose :)
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.

caramba
Posts: 4
Joined: Sat Sep 18, 2021 5:30 am

Re: Toggle external access for some devices

Post 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>

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

Re: Toggle external access for some devices

Post 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.
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.

caramba
Posts: 4
Joined: Sat Sep 18, 2021 5:30 am

Re: Toggle external access for some devices

Post by caramba »

Thanks a lot !

Post Reply