What's new

script to turn off/on access by single device

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

darkfinger

Occasional Visitor
Hi,

I want to cutoff and allow access to certain devices (cough: kids iPhone) every now and again. I'd like to do this outside of parental controls, ideally with a script.

Can anyone help point me in the right direction?

Thanks,
D
 
With Parental Control enabled and devices and Active schedules set you'll see these "static" rules reflected in the file /tmp/filter_rules
A rule looks like this:
Code:
-A FORWARD -i br0 -m time --timestart 4:0 --timestop 5:0 --days Sun -m mac --mac-source 64:Uh:0h:no:lu:ck -j PControls
You could write some code in a script to change these rules.
To randomly trigger the script use cron.
 
With Parental Control enabled and devices and Active schedules set you'll see these "static" rules reflected in the file /tmp/filter_rules
A rule looks like this:
Code:
-A FORWARD -i br0 -m time --timestart 4:0 --timestop 5:0 --days Sun -m mac --mac-source 64:Uh:0h:no:lu:ck -j PControls
You could write some code in a script to change these rules.
To randomly trigger the script use cron.

I think this is a pretty cool idea.
Is it possible to get a bit more advanced implementation?
In my case, I really don't want to cut off internet access completely, so kids can do research, access school website, wikipedia etc. I just need to limit access for some hours, and then restore back on a schedule.

Currently I do that by switching between OpenDNS and Norton Safe services in Parental Control -> DNS filtering -> Global Filter Mode, and parents' devices are in exemption list. But it sucks to switch DNS manually each time from the GUI... how to do the same from the shell, so it can be scheduled?

Another option would be a white list access for a particular MAC or internal IP.
For what it matters, I use Merlin 3.0.0.4.374.39.
Can someone provide a kick in a right direction? DNS filter swap or white list for a device?

Thanks,
-Serge.
 
Last edited:

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top