Setting Access Restrictions
A better way to define which devices can access the Internet when...
Steps to adding access restrictions:
- First, update your router firmware to a current version of DD-WRT, Turris, OpenWrt / LEDE, GNU/Linux, Asuswrt-Merlin, Tomato, etc.
Apparently some more recent builds of DD-WRT have broken the cron scheduling capabilities... AFAIK, DD-WRT build #41517 was the last one in which cron was working
- Install or upgrade your version of YAMon by re-running `/opt/install.sh` in a PuTTY (or equivalent terminal app) window on your router. Or by downloading the latest installer script (v4.0.7)
(NB - v4.0.4 or higher is required for Access Restrictions) - In the setup/install script, you must choose to enable the optional database integration feature
This is necessary so that your access control rules can be saved between this web interface and your router.
- Once you have YAMon installed and running, open the reports and go to the `Devices` tab and organize your devices into logical groups (e.g., by family member or by device function/location, etc.). You get to pick the groupings and names.
- In a PuTTY (or equivalent terminal app) window, run `/opt/YAMon4/check-network.sh`
This will sync your group names from the reports to your `users.js` file. It is probably wise at this time to review the contents of `users.js` to ensure that things were updated properly
- Reload the YAMon reports (by entering <ctrl>+F5 and go to the `Devices` tab to ensure once again that all of your devices are grouped properly.
Repeat these 3 steps until you are happy with the groupings. - Still in the reports, change to the `Access Restrictions` tab and click the `Set/update...` button
That link will bring you back to this page. You must open this page from the reports so that your defined groups and access control rules are loaded properly into the table below. If you open the link directly, the table will contain a default set of example restrictions.
- Create/update your rules using the interface below
- Once you have finished tweaking your rules, go back to your router and run `/opt/YAMon4/start.sh` to sync and enable the rules.
- Send questions and comments to questions@usage-monitoring
Please be patient and understanding as this is a radically new capability in YAMon... it is working well on my routers but might need some tweaking on yours
Current progress
I now need other users to figure out what I got wrong!
Currently, every time that you reload this page, the access restriction rules will reset to a known starting point because, I am still focussed on the UI to define and edit the entries.
Next, I will load existing rules from the database (and any save changes back into the database).
The page now loads and saves entries to the database (with the known issues identified below).
I am now focussing on the server & router side functionality to sync the rules in the database with the router (so you'll soon be able to test this new function).
Known issues in the current UI
- data is static; not loaded from db
- changes are not saved to the db
- if you add a new entry, the edit button does not work
- no error trapping for null values in new entries
- unknown is unchecked in a new entry
- add months in addition to days
- add `quick picks` for days and months (e.g. every day/month, just school nights, weekends, etc.)
- add option to disable a rule (rather than having to delete it)
- add a check for unsave changes if the close button is clicked (rudimentary warning at least)
- a new row is not automatically shown if you click the close button at the top of the table (but only if you save it first)
- deleted rows reappear in the table sometimes (but will disappear when the page is reloaded)
- add a clone feature to streamline the process of adding similar rules
- add an override capability to temporarily grant a device access (likely not in this interface though)
- others?!?
Please send comments and constructive feedback to questions@usage-monitoring.com
Thanks!!!