I am building a basic captive portal script, with support for idle timeout. I managed to create iptables rules on authentication in the browser.
However, I'm not sure how to detect users that are active, and users that are idle for a certain amount of time. e.g When a user is not active for 30 minutes, he needs to be logged out.
What could be a good way to know if a user is idle?