<div dir="ltr"><div><div><span style="font-family:georgia,serif">Hi Anusha<br><br></span></div><span style="font-family:georgia,serif">You are right, this is how it works. You need rlm_sqlcounter setup to achieve that. Do you already have MySQL FreeRADIUS working setup? Authentication & Accounting with MySQL ? Please note, accounting must work with MySQL so that FreeRADIUS can calculate the time. please let me know if you already have above. i can then help further. <br><br></span></div><span style="font-family:georgia,serif">Thanks / Prabhpal Singh </span><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 19, 2014 at 9:27 AM, anusha mule <span dir="ltr"><<a href="mailto:anusha.mule9988@gmail.com" target="_blank">anusha.mule9988@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><br>
<div style="MARGIN:0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Calibri">Hi, </font></font></div>
<div style="MARGIN:0in 0in 0pt" class="MsoNormal"><font face="Calibri" size="3"></font> </div>
<div style="MARGIN:0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Calibri">We have the following understanding RADIUS Authentication and Accounting flow :-</font></font></div>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font face="Calibri" size="3"> </font></p>
<p style="MARGIN:0in 0in 0pt 0.5in"><span><span><font face="Calibri" size="3">1.</font><span style="FONT:7pt 'Times New Roman'">       </span></span></span><font size="3"><font face="Calibri">When the Access-request from the NAS, Server will search in the radcheck table to check the attributes for the user.</font></font></p>
<p style="MARGIN:0in 0in 0pt 0.5in"><span><span><font face="Calibri" size="3">2.</font><span style="FONT:7pt 'Times New Roman'">       </span></span></span><font size="3"><font face="Calibri">If check attributes are found and its matches to the user, then the server will pull the reply items (Attributes like Bandwidth, Volume, Timeout, etc) from the radreply table for this user and add it in the Access-Accept packet.</font></font></p>
<p style="MARGIN:0in 0in 0pt 0.5in"><span><span><font face="Calibri" size="3">3.</font><span style="FONT:7pt 'Times New Roman'">       </span></span></span><font size="3"><font face="Calibri">On receiving Access-Accept packet, session will get established for the user and Accounting-Start message will get transmitted to the Server.</font></font></p>
<p style="MARGIN:0in 0in 0pt 0.5in"><span><span><font face="Calibri" size="3">4.</font><span style="FONT:7pt 'Times New Roman'">       </span></span></span><font size="3"><font face="Calibri">The server will update the radacct table with Accounting start message.</font></font></p>
<p style="MARGIN:0in 0in 0pt 0.5in"><span><span><font face="Calibri" size="3">5.</font><span style="FONT:7pt 'Times New Roman'">       </span></span></span><font size="3"><font face="Calibri">When the station get disconnected, Session should get deleted and Accounting-Stop message should sent to the Server including user statistics (like Session-time, input-octets, output-octets, etc)in it.</font></font></p>
<p style="MARGIN:0in 0in 0pt 0.5in"><span><span><font face="Calibri" size="3">6.</font><span style="FONT:7pt 'Times New Roman'">       </span></span></span><font size="3"><font face="Calibri">Server will update the radacct table with all the attributed present in the STOP message.</font></font></p>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font face="Calibri" size="3"> </font></p>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Calibri">With let us consider the following simple scenario :-</font></font></p>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font face="Calibri" size="3"> </font></p>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Calibri">RADIUS Server having User details as </font></font></p>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font face="Calibri" size="3"> </font></p>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Calibri">User Name = Joe</font></font></p>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Calibri">Password <span>   </span>= Joe123</font></font></p>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Calibri">Timeout <span>     </span>= 30000 Secs</font></font></p>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font face="Calibri" size="3"> </font></p>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Calibri">Step 1: During the initial connect<span>  </span>- User should be authenticated and Access-Accept should contains the attribute value as 30000 Secs, </font></font></p>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Calibri"><span>              </span>mentioning the max duration that the user session is allowed.</font></font></p>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font face="Calibri" size="3"> </font></p>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Calibri"><span>              </span>Once the session is established, RADIUS Accounting Start message is send to RADIUS server.</font></font></p>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font face="Calibri" size="3"> </font></p>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Calibri"><span>               </span>Next let us say, User has been disconnected after 20000 Secs.</font></font></p>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font face="Calibri" size="3"> </font></p>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Calibri"><span>               </span>Again, the RADIUS Accounting Stop message with the consumed duration of 20000 Secs shall be send to the RADIUS Server.</font></font></p>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font face="Calibri" size="3"> </font></p>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Calibri">Step 2:<span>   </span>Now, when the same user tries to authenticate, he should be authenticated and the Access-Accept provide the Timeout attribute as 10000 Secs ( i.e. 30000 Secs – 20000 Secs)</font></font></p>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font face="Calibri" size="3"> </font></p>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Calibri"><span>                 </span>Here, let us assume the user used the full session duration and get time out.</font></font></p>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font face="Calibri" size="3"> </font></p>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Calibri"><span>               </span>Again, the RADIUS Accounting Stop message with the consumed duration of 10000 Secs shall be send to the RADIUS Server.</font></font></p>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Calibri"><span>               </span></font></font></p>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Calibri">Step 3:<span>   </span>Now, when the same user tries to authenticate, he should be rejected. </font></font></p>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font face="Calibri" size="3"> </font></p>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font face="Calibri" size="3"> </font></p>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Calibri">How can the above be achieved using radius server configurations.</font></font></p>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font face="Calibri" size="3"> </font></p>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Calibri">Kindly help us in this.</font></font></p><br clear="all">
<div>
<div>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Calibri">Thanks in advance.</font></font></p>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Calibri"></font></font> </p>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Calibri">Thank you & Regards,</font></font></p>
<p style="MARGIN:0in 0in 0pt" class="MsoNormal"><font face="Calibri" size="3">Anusha M</font></p></div></div></div><br>
<br>-<br>
List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">http://www.freeradius.org/list/users.html</a><br></blockquote></div><br></div>