Missing "Last Activity" for portal users - Idle timeout not working
-
I'm using unauthenticated Captive Portal at a few different sites, mainly to restrict the bandwidth of each user on location to improve wifi accessibility. This works very well for my needs but as a precaution (an prefrance) im using the "Idle Timeout" to clear out the list of unauthenticated users if they haven't been on site for a while (like 7 or 30 days). However, i notice that sometimes a few devices/unauthenticated users never show a last activity. I saw this happening with 2.7.0, 2.7.1 and i think it was also doing this is 2.5.3
The problem i have with this is that since there's no last activity, the idle timeout doesnt seem to work and hundreds unauthenticated users start accumulating in the list that dont need to be there. I dont want to use the "Hard Timeout" option (which does work) because i dont want the users to be prompted with the portal if they're actively or regularly using the connection, its just an unnecessary inconvenience for the them.
Why does this happen? Is this a known bug?
-
@sceptre357 said in Missing "Last Activity" for portal users - Idle timeout not working:
Why does this happen? Is this a known bug?
Hummm.
Shouldn't happen.Long story short :
[23.09-RELEASE][root@pfSense.bhf.tld]/root: ps ax | grep prunecaptiveportal 3852 - Is 0:00.00 /usr/local/bin/minicron 60 /var/run/cp_prunedb_cpzone1.pid /etc/rc.prunecaptiveportal cpzone1 4060 - I 0:00.86 minicron: helper /etc/rc.prunecaptiveportal cpzone1 (minicron) 97982 0 S+ 0:00.00 grep prunecaptiveportal
This says : the portal is 'pruned' every 60 seconds.
This is the prune function : captiveportal_prune_old()
Your situation is handled here : in this function. If traffic is 'not known' (zero) the "Last activity" (a time stamp) can't be determined. In that case, the "Session start" time/date is taken, the timeout value (soft time out or hard time out) is added, and that's the 'prune' time. If this prune time is smaller as the actual time, the user is disconnected.
Btw : what is the DHCP lease time for your captive portal ?
How many potienta portal devices ?
How big is the DHCP pool size ?
If a devices looses the lease, as it went away for the day, and came back the next day, and the lease (IP) was already assigned to another device at that moment, the portal starts to loose track of who is what when etc.edit :
You don't see these "IDLE TIMEOUT" lines :
@sceptre357 said in Missing "Last Activity" for portal users - Idle timeout not working:
im using the "Idle Timeout" to clear
You've set the Idle timeout set to something like this :
What is the value you have set ?