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!

Time-of-Day limits on Guest access

Discussion in 'Asuswrt-Merlin' started by WallaWallah, Aug 24, 2014.

  1. WallaWallah

    WallaWallah New Around Here

    Joined:
    Aug 24, 2014
    Messages:
    2
    Is there some way to put time-of-day restrictions on guest access, such as permitting it only from 9am to 5pm?
     
  2. F5ing

    F5ing Regular Contributor

    Joined:
    Aug 20, 2013
    Messages:
    158
    The easiest way I know how to do this, which is not very flexible, is to setup Parental Controls for each device that'll use the guest network...
     
  3. lbradio

    lbradio Regular Contributor

    Joined:
    Feb 1, 2014
    Messages:
    86
    Location:
    The Netherlands
    Create two scripts:
    guest_wifi_start.sh
    Code:
    #!/bin/sh
    
    ####################################################################################
    #                                                                                  #
    # Start / Stop Guest WIFI                                                          #
    # L. de Bles, 2014                                                                 #
    #                                                                                  #
    # Called via init-start                                                            #
    #                                                                                  #
    # 2.4 Ghz Radio                                                                    #
    # wl0.1 ---> Guest Network 1                                                       #
    # wl0.2 ---> Guest Network 2                                                       #
    # wl0.3 ---> Guest Network 3                                                       #
    #                                                                                  #
    # 5 Ghz Radio                                                                      #
    # wl1.1 ---> Guest Network 1                                                       #
    # wl1.2 ---> Guest Network 2                                                       #
    # wl1.3 ---> Guest Network 3                                                       #
    #                                                                                  #
    ####################################################################################
    
    # start: enabled=1
    # stop: enabled=0
    
       nvram set wl0.1_bss_enabled=1
       service restart_wireless
    and

    guest_wifi_stop.sh
    Code:
    #!/bin/sh
    
    ####################################################################################
    #                                                                                  #
    # Start / Stop Guest WIFI                                                          #
    # L. de Bles, 2014                                                                 #
    #                                                                                  #
    # Called via init-start                                                            #
    #                                                                                  #
    # 2.4 Ghz Radio                                                                    #
    # wl0.1 ---> Guest Network 1                                                       #
    # wl0.2 ---> Guest Network 2                                                       #
    # wl0.3 ---> Guest Network 3                                                       #
    #                                                                                  #
    # 5 Ghz Radio                                                                      #
    # wl1.1 ---> Guest Network 1                                                       #
    # wl1.2 ---> Guest Network 2                                                       #
    # wl1.3 ---> Guest Network 3                                                       #
    #                                                                                  #
    ####################################################################################
    
    # start: enabled=1
    # stop: enabled=0
    
       nvram set wl0.1_bss_enabled=0
       service restart_wireless
    
    Example is for wl0.1 (Guest Network 1 2,4Ghz)

    Create cronjobs with help of init-start script

    init-start

    Code:
    #!/bin/sh
    
    
    # L. de Bles, 2014
    #
    # * * * * *  command to execute
    # - - - - -
    # | | | | |
    # | | | | |
    # | | | | +----- day of week (0 - 7) (0 to 6 are Sunday to Saturday, or use names; 7 is Sunday,
    # | | | +------- month (1 - 12)
    # | | +--------- day of month (1 - 31)
    # | +----------- hour (0 - 23)
    # +------------- min (0 - 59)
    #
    # --------------------------------------------------------------------------------------------------
    
    cru a Start-Guest-WIFI "00 09 * * * /jffs/scripts/guest_wifi_start.sh"
    cru a Stop-Guest-WIFI "00 17 * * * /jffs/scripts/guest_wifi_stop.sh"
    Place all (three) scripts in /jffs/scripts.
    Don't forget to chmod a+rx /jffs/scripts/*

    After rebooting the router guest wifi starts and stops.
     
    Last edited: Aug 25, 2014
  4. WallaWallah

    WallaWallah New Around Here

    Joined:
    Aug 24, 2014
    Messages:
    2
    Thanks!

    Thanks very much, I appreciate the help!
    -WallaWallah