What's new

ASUS parental controls + script to enforce rules

  • 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!


New Around Here
Hi all,

I've come up with a solution to my troubles of the parental controls feature not enforcing the disabling of devices on my ASUS router.
I got the idea from a few other scripts I have seen floating around, but i wanted more flexibility, as I change the time scheduling for my kids on weekends, school holidays or as reward/punishment for certain behaviours.

As such, I didn't want to create new cron jobs every time I made a change, so I decided to write a script that reads the settings in my parental controls, and drops/reinstates connections based on that - no matter how often I modify it.

The scripts are attached (rename them and remove the ".txt" extension) for you to use.

Additionally, you will need to setup a cron job to run the script every minute, by placing the following in /jffs/scripts/servies-start

# setup the cron job to enforce blocked devices
cron_exists=`cru l | grep enforceTimeScheduling | wc -c`
if [ $cron_exists -gt 0 ]; then
    cru d enforceTimeScheduling

# schedule the device blocking Script
cru a enforceTimeScheduling "*/1 * * * * /jffs/scripts/enforceTimeScheduling.sh"

The script is fully documented in the event you want to know how it works, and additionally, you can run it manually with the folowing parameters:

-v: Verbose - tells you everything it found and is doing
-t: Test mode - do not do anything, just print the commands to screen

I hope others find it useful, and if you find any bugs, please post them here so myself and others can fix them.


  • hex2bin.awk.txt
    295 bytes · Views: 68
  • enforceTimeScheduling.sh.txt
    12.4 KB · Views: 83
Welcome to the forums @z-man.

Thank you for sharing!

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

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