@nourgaser said in FreeRadius Idle-Timeout not honored by pfSense radius client:
Hope the clears up my issue a bit.
A lot.
I'll get back to you soon.
Here : a tool I use to inspect the captive portal 'internal, SQLITE3 "database :
#!/usr/local/bin/php -q <?php require_once("/etc/inc/util.inc"); require_once("/etc/inc/functions.inc"); require_once("/etc/inc/captiveportal.inc"); /* Read in captive portal db */ /* Determine number of logged in users for all zones */ $count_cpusers = 0; /* Is portal activated ? */ if (is_array($config['captiveportal'])) /* For every zone, do */ foreach ($config['captiveportal'] as $cpkey => $cp) /* Sanity check */ if (is_array($config['captiveportal'][$cpkey])) /* Is zone enabled ? */ if (array_key_exists('enable', $config['captiveportal'][$cpkey])) { $cpzone = $cpkey; /* Zone selected -> count users and add */ $cpdb = captiveportal_read_db(); foreach ($cpdb as $cpent) { print_r($cpent); echo date("m/d/Y H:i:s\n", $cpent[0]); echo "---------------\n"; } } ?>If an "Idle_Timeout" comes back from the radius server, like this (your example) :
... Idle-Timeout = {idle_timeout_from_my_db_in_seconds} ....it's stored in the record of the connected portal user :
[8] => [idle_timeout] =>I saw it when I was testing - see above.
The portal prune process (every 60 seconds) will use this value to throw of the client when [idle_timeout] is exceeded.
That is : it should work like that. I saw an IDLE DISCONNECT in the portal log when testing this morning.
edit :
If you called the file /root/cap.php :
Use the 'tool' like this :
SSH (or console), option 8.
When I log into the captive portal with my 'test user account', where I've set
f9931ea1-b854-49e8-a47d-52f364fa6c45-image.png
I see this :
.... Array ( [0] => 1701419243 [allow_time] => 1701419243 [1] => 2014 [pipeno] => 2014 [2] => 192.168.2.6 [ip] => 192.168.2.6 [3] => e0:92:5c:d9:6c:fe [mac] => e0:92:5c:d9:6c:fe [4] => x [username] => x [5] => b70ed7483d25b0c9 [sessionid] => b70ed7483d25b0c9 [6] => eA== [bpassword] => eA== [7] => [session_timeout] => [8] => 5 [idle_timeout] => 5 [9] => [session_terminate_time] => [10] => 600 [interim_interval] => 600 [11] => [traffic_quota] => [12] => 1000 [bw_up] => 1000 [13] => 2000 [bw_down] => 2000 [14] => radius [authmethod] => radius [15] => first [context] => first )Your looking at the dump of the pfSense captive portal logged in users.
It's a small PHP SQLITE database. For every logged in user, all variables are dumped.
For example : "[idle_timeout] => 5" has been set accrding to what came back from the Radius server.
While typing here, 5 minutes are passed, so :
05f04bde-5116-43e7-847e-1e4a315f876b-image.png