1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

Breaking connections - with intent

Discussion in 'Asuswrt-Merlin' started by smasher, Oct 22, 2019.

  1. smasher

    smasher Regular Contributor

    Joined:
    Jun 21, 2019
    Messages:
    59
    I'm working on a script to limit my kid's computer time.

    For now, this is the part of the script that kicks him off when his time is up:
    Code:
        # disable his computers access to internet
        nvram set MULTIFILTER_ENABLE='2>2>0'
        # commit the change
        nvram commit
        # restart the firewall to block new connections
        service restart_firewall > /dev/null
        # restart wireless to close existing connections
        service restart_wireless > /dev/null
    This works, but... restarting the wireless is disruptive to other computers on the LAN.

    Is there a better way to kill open connections to/from the machines I want to block, without interrupting other machines on the LAN?

    This is on an AC68U.
     
    HairyA00 likes this.
  2. HairyA00

    HairyA00 Regular Contributor

    Joined:
    Jul 13, 2019
    Messages:
    140
    https://www.asus.com/support/FAQ/1008720/

    See the "Time Scheduling" section. Works like a charm.
     
    #TY and Vexira like this.
  3. st3v3n

    st3v3n Very Senior Member

    Joined:
    Feb 24, 2016
    Messages:
    507
    Location:
    Central US
    Smasher; When the kids earned their TV or internet time, they agreed to be self-limiting lest they lose the privilege. There was the obligatory infringement see if we were paying attention, after regaining privileges, there were no further issues. If there are open WiFi signals nearby, kids will will find a way, then scheduling on your router might be a moot point. Never hurts to try automating, let the router be the enforcer. Good luck:)
     
  4. smasher

    smasher Regular Contributor

    Joined:
    Jun 21, 2019
    Messages:
    59
    Not applicable here. His time is "controlled" by his desktop. When the desktop says he's not logged in, I want his phone and laptop cut off.

    This allows him some freedom to determine when he can access the net, while still limiting how much time he can spend online. It also encourages him to save a few minutes of net time, in case he needs it later in the day.
     
    HairyA00 likes this.
  5. HairyA00

    HairyA00 Regular Contributor

    Joined:
    Jul 13, 2019
    Messages:
    140
    Time access restrictions in DNSCrypt?

    Code:
    ##########################################
    #        Time access restrictions        #
    ##########################################
    
    ## One or more weekly schedules can be defined here.
    ## Patterns in the name-based blocklist can optionally be followed with @schedule_name
    ## to apply the pattern 'schedule_name' only when it matches a time range of that schedule.
    ##
    ## For example, the following rule in a blacklist file:
    ## *.youtube.* @time-to-sleep
    ## would block access to YouTube only during the days, and period of the days
    ## define by the 'time-to-sleep' schedule.
    ##
    ## {after='21:00', before= '7:00'} matches 0:00-7:00 and 21:00-0:00
    ## {after= '9:00', before='18:00'} matches 9:00-18:00
    
    [schedules]
    
      # [schedules.'time-to-sleep']
      # mon = [{after='21:00', before='7:00'}]
      # tue = [{after='21:00', before='7:00'}]
      # wed = [{after='21:00', before='7:00'}]
      # thu = [{after='21:00', before='7:00'}]
      # fri = [{after='23:00', before='7:00'}]
      # sat = [{after='23:00', before='7:00'}]
      # sun = [{after='21:00', before='7:00'}]
    
      # [schedules.'work']
      # mon = [{after='9:00', before='18:00'}]
      # tue = [{after='9:00', before='18:00'}]
      # wed = [{after='9:00', before='18:00'}]
      # thu = [{after='9:00', before='18:00'}]
      # fri = [{after='9:00', before='17:00'}]