Does anyone know of a way (perhaps using iptables) to put time limits on websites?
More precisely, my boss would like to allow workers access to specific whitelisted websites and would like to assign each whitelisted website a cumulative number of connection minutes per day. For example, the workers are free to access website A anytime they wish, they just have a cumulative total of X minutes to do so; after the allotted X minutes is used up, access to that particular website should be blocked. Similar for all other whitelisted websites. As long as a user is connected to a website (say has the website open on a browser tab), that time is counted against the X minutes for that website, so the user must close the website to avoid having those minutes counted, if they want to preserve minutes to re-access the website later. There are some whitelisted websites required to do our job and their X minutes per day allowed is the full day. A few websites are for personal use (email websites for example) and those websites (which are much easier to navigate with a keyboard/mouse/large screen than on a phone) have a limited X minutes.
If there is a way to do this at the iptables level, that would be great. If this can't be done at the iptables level, is there some way to do it? We use Ubuntu 16.04 LTS. (No brower plug-ins, which are easily modified. Squid cannot set timelimits.)