<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Possible solution for delayed termination of captive portal users&#x2F;clients]]></title><description><![CDATA[<p dir="auto">given</p>
<p dir="auto">captive portal user id: wifi<br />
usage limit: 1 day or 24hrs will due on 00:01AM<br />
idle timeout: 3hrs<br />
hard timeout: 0</p>
<p dir="auto">here is the problem</p>
<p dir="auto">If user wifi still connected until 00:01AM (which supposedly he will be disconnected automatically) he won't be disconnected until he logs out or he reaches the idle timeout.</p>
<p dir="auto">possible solution is to edit the freeradius.inc in such a way it will look for users that expire on captive database and delete that entry right away.</p>
<p dir="auto">i'm calling the coders, will this be possible or it is fixed on version 2.0 already?</p>
<p dir="auto">any thoughts?</p>
]]></description><link>https://forum.netgate.com/topic/25970/possible-solution-for-delayed-termination-of-captive-portal-users-clients</link><generator>RSS for Node</generator><lastBuildDate>Tue, 21 Apr 2026 01:05:05 GMT</lastBuildDate><atom:link href="https://forum.netgate.com/topic/25970.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 21 Aug 2010 13:51:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Possible solution for delayed termination of captive portal users&#x2F;clients on Mon, 30 Aug 2010 04:30:31 GMT]]></title><description><![CDATA[<p dir="auto">thank you sir.</p>
<p dir="auto">sir, may also ask a minor clarification with the "concurrency" you've just mentioned, is this means that this will "only" work if I had put "checked" on "Disable concurrent logins"?</p>
<p dir="auto">oh, how if I would like to stop using it or remove it from running? how will I do it?</p>
<pre><code>
/* no pruning for fixed mac address entry */
		if (portal_mac_fixed($cpdb[$i][3])) 
</code></pre>
<p dir="auto">based on your code, what do you mean "fixed mac address", is this the Pass-through entries?</p>
<p dir="auto">-cruzades<br />
still researching/learning how to use cron job :)</p>
]]></description><link>https://forum.netgate.com/post/244800</link><guid isPermaLink="true">https://forum.netgate.com/post/244800</guid><dc:creator><![CDATA[cruzades]]></dc:creator><pubDate>Mon, 30 Aug 2010 04:30:31 GMT</pubDate></item><item><title><![CDATA[Reply to Possible solution for delayed termination of captive portal users&#x2F;clients on Sun, 29 Aug 2010 23:59:20 GMT]]></title><description><![CDATA[<p dir="auto">Yes sure - this can. Its actually just a matter of setting the time the script runs. You can run it every 30 minutes, or at one specific time - all depends on how you setup the cron job.</p>
<p dir="auto">e.g.<br />
0  1  *  *  *  root  /usr/local/bin/php -q /usr/local/captiveportal/portal-reauth.php</p>
<p dir="auto">would run every day at 1am. You should do a google on cron jobs syntax to understand how to set the time and frequency etc.</p>
<p dir="auto">Sorry - I should mention that this should be used at your own risk as is an adaptation (hack) from stock pfsense. But it works for us well.</p>
]]></description><link>https://forum.netgate.com/post/244790</link><guid isPermaLink="true">https://forum.netgate.com/post/244790</guid><dc:creator><![CDATA[cordeos]]></dc:creator><pubDate>Sun, 29 Aug 2010 23:59:20 GMT</pubDate></item><item><title><![CDATA[Reply to Possible solution for delayed termination of captive portal users&#x2F;clients on Sun, 29 Aug 2010 11:37:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/cordeos">@<bdi>cordeos</bdi></a>:</p>
<blockquote>
<p dir="auto">We adapted the the existing 'Prune' routine, threw it into a seperate php file and call it from a Cron job (every 30minutes) using following command:</p>
<p dir="auto">/usr/local/bin/php -q /usr/local/captiveportal/portal-reauth.php</p>
<p dir="auto">So what it does is run though the local file created by cp (of all current users) and does a re-auth call to radius to see if they should still be logged in. Given we allow concurrency on the system we have to send an accounting disconnect then reconnect after (just the way we have things setup)</p>
<p dir="auto">Have attached the PHP page we created to this post. Note it is setup for concurrency at the moment - maybe you dont need that. Hopefully work out of the box for you. (remove the txt extension)</p>
<p dir="auto">Hope this helps - not sure if its what your after ?</p>
</blockquote>
<p dir="auto">sir, I'm too noob about scripting, I would like to know if this could be adjusted from 30minute to a specific time (e.g. 0000hrs)?, so that all connected cp users needs to re-authenticate, and hopefully the due accounts will not.</p>
<p dir="auto">btw, I'm using freeRadius for authentication.</p>
<p dir="auto">thanks.</p>
]]></description><link>https://forum.netgate.com/post/244755</link><guid isPermaLink="true">https://forum.netgate.com/post/244755</guid><dc:creator><![CDATA[cruzades]]></dc:creator><pubDate>Sun, 29 Aug 2010 11:37:24 GMT</pubDate></item><item><title><![CDATA[Reply to Possible solution for delayed termination of captive portal users&#x2F;clients on Fri, 27 Aug 2010 23:38:59 GMT]]></title><description><![CDATA[<p dir="auto">Yeah - we read the forums and didnt like the sound of a reauthenticate every minute. Too much loading we thought. Yes this hack is not ideal, but gets around this problem. In 2.0 can you specify the reauthenticate interval ? that would be great.</p>
]]></description><link>https://forum.netgate.com/post/244672</link><guid isPermaLink="true">https://forum.netgate.com/post/244672</guid><dc:creator><![CDATA[cordeos]]></dc:creator><pubDate>Fri, 27 Aug 2010 23:38:59 GMT</pubDate></item><item><title><![CDATA[Reply to Possible solution for delayed termination of captive portal users&#x2F;clients on Fri, 27 Aug 2010 23:16:36 GMT]]></title><description><![CDATA[<p dir="auto">Doesn't the "reauthenticate" run every minute? Everyone always says, "don't use it".</p>
]]></description><link>https://forum.netgate.com/post/244626</link><guid isPermaLink="true">https://forum.netgate.com/post/244626</guid><dc:creator><![CDATA[joe_adk]]></dc:creator><pubDate>Fri, 27 Aug 2010 23:16:36 GMT</pubDate></item><item><title><![CDATA[Reply to Possible solution for delayed termination of captive portal users&#x2F;clients on Fri, 27 Aug 2010 13:23:14 GMT]]></title><description><![CDATA[<p dir="auto">You have an option to reauthenticate users on the CP no need for this hack.</p>
]]></description><link>https://forum.netgate.com/post/244624</link><guid isPermaLink="true">https://forum.netgate.com/post/244624</guid><dc:creator><![CDATA[eri--]]></dc:creator><pubDate>Fri, 27 Aug 2010 13:23:14 GMT</pubDate></item><item><title><![CDATA[Reply to Possible solution for delayed termination of captive portal users&#x2F;clients on Fri, 27 Aug 2010 01:58:56 GMT]]></title><description><![CDATA[<p dir="auto">Ob btw - this is for 1.2.3</p>
]]></description><link>https://forum.netgate.com/post/244572</link><guid isPermaLink="true">https://forum.netgate.com/post/244572</guid><dc:creator><![CDATA[cordeos]]></dc:creator><pubDate>Fri, 27 Aug 2010 01:58:56 GMT</pubDate></item><item><title><![CDATA[Reply to Possible solution for delayed termination of captive portal users&#x2F;clients on Fri, 27 Aug 2010 01:57:45 GMT]]></title><description><![CDATA[<p dir="auto">We adapted the the existing 'Prune' routine, threw it into a seperate php file and call it from a Cron job (every 30minutes) using following command:</p>
<p dir="auto">/usr/local/bin/php -q /usr/local/captiveportal/portal-reauth.php</p>
<p dir="auto">So what it does is run though the local file created by cp (of all current users) and does a re-auth call to radius to see if they should still be logged in. Given we allow concurrency on the system we have to send an accounting disconnect then reconnect after (just the way we have things setup)</p>
<p dir="auto">Have attached the PHP page we created to this post. Note it is setup for concurrency at the moment - maybe you dont need that. Hopefully work out of the box for you. (remove the txt extension)</p>
<p dir="auto">Hope this helps - not sure if its what your after ?</p>
<p dir="auto"><a href="/public/_imported_attachments_/1/portal-reauth.php.txt">portal-reauth.php.txt</a></p>
]]></description><link>https://forum.netgate.com/post/244571</link><guid isPermaLink="true">https://forum.netgate.com/post/244571</guid><dc:creator><![CDATA[cordeos]]></dc:creator><pubDate>Fri, 27 Aug 2010 01:57:45 GMT</pubDate></item></channel></rss>