What's new
  • 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!

Parental control scripting?

kjetilhp

New Around Here
Is it possible to create parental control rules using scripts on Merlin?

The web gui first of all are limited to whole hours, which at least should be half hours. Also you should be able have groups (say you could have the MAC address of the ipad, iphone and computer for the youngest kid in one group, then a another group for the oldest kids stuff). At least in my house the rules have to be changed on a regular basis e.g during holidays or when something special happens (e.g gaming party :o)) and then back to normal hours. This was extremely easy with cheap TP-Link routers to one third of the price of an Asus flagship :(
 
Parental Controls command line

Yes, I believe it is scriptable to the whole hour but you will need to create a script or series of scripts depending on your [linux] sh knowledge. The parameters for both the ASUS_WRT and I am guessing Merlin are:

Code:
MULTIFILTER_MACFILTER_DAYTIME=NoTitle<ddhhHH<NoTitle<ddhhHH<...
where that sequence repeats for each day that the filter is set and then the number of mac's you have parental controls on (so in my case, for 8 MAC's and 7 Days of rules = 56 entries).

Not sure what NoTitle means, but it seems to be expected.
dd=the day of week, where the sequence is 00,11,...66
hh=local TZ military time for the end of blocking, so 08 means the internet goes back on at 08:00 (8am)
HH= local TZ military time for the start of blocking, so 22 means the internet goes off at 22:00 (10pm)

So you can capture the current setting to a file by:
Code:
nvram get MULTIFILTER_MACFILTER_DAYTIME > std_kids_sched.sh

edit the std_kids_sched.sh to:
Code:
nvram set MULTIFILTER_MACFILTER_DAYTIME='[current settings]'
nvram commit

Then you can monkey with the GUI settings, telnet back in and run
Code:
sh ./std_kids_sched.sh

That will reset you to what you have set in the GUI today. Then you can copy that sh to as many versions you need, editing with your favorite text editor or processing via sed to write a new schedule. Or you can create a sh script with a simple text menu for the versions.

To turn everything off I have found this to work well:
Code:
nvram set MULTIFILTER_MACFILTER_DAYTIME='<><><><><><><><>'
nvram commit

where the number of <> is equal to the total number of MAC addresses you are blocking.

Hope that helps! If I get around to making a more comprehensive script, I'll post it.
 

Similar threads

Latest 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!
Back
Top