<div dir="ltr">Hi <div>I did setup Freeradius with SQL backend and connected it to a l2tp vpn server. Connecting works great and accounting is logged into the radacct table. So far so good, now I am experimenting with limits. And I chose daily session time to test out first. </div>
<div><br></div><div>I did insert into radcheck "where username is obviously test"</div><div><br></div><div>test Max-Daily-Session := 100000000<br></div><div><br></div><div>When I did that, logon fails</div><div>
<br></div><div>Now, here is where I might have messed up </div><div><br></div><div>In sites-enabled/default I did uncomment</div><div><br></div><div>authorise{</div><div>
<p> # Enforce daily limits on time spent logged in.</p>
<p> daily</p><p><br></p><p>and </p><p><br></p><p>accounting {</p><p>
</p><p> daily</p><p>In radiusd.conf I did uncomment </p><p><br></p><p>
</p><p class="">instantiate {</p><p> # We add the counter module here so that it registers</p><p> # the check-name attribute before any module which sets</p>
<p> # it</p><p>
</p><p> daily</p><p><br></p><p><br></p><p><br></p><p>modules/counter includes</p><p><br></p><p>counter daily {</p><p> filename = ${db_dir}/db.daily</p>
<p> key = User-Name</p><p> count-attribute = Acct-Session-Time</p><p> reset = daily</p><p> counter-name = Daily-Session-Time</p><p> check-name = Max-Daily-Session</p>
<p> reply-name = Session-Timeout</p><p> allowed-servicetype = Framed-User</p><p> cache-size = 5000</p><p>
</p><p>}</p><p><br></p><p><br></p><p>When I start radiusd -X I can see the following :</p><p><br></p><p> radiusd: #### Instantiating modules ####</p>
<p> instantiate {</p>
<p> Module: Linked to module rlm_exec</p>
<p> Module: Instantiating module "exec" from file /etc/raddb/modules/exec</p>
<p> exec {</p>
<p> wait = no</p>
<p> input_pairs = "request"</p>
<p> shell_escape = yes</p>
<p> }</p>
<p> Module: Linked to module rlm_expr</p>
<p> Module: Instantiating module "expr" from file /etc/raddb/modules/expr</p>
<p> Module: Linked to module rlm_counter</p>
<p> Module: Instantiating module "daily" from file /etc/raddb/modules/counter</p>
<p> counter daily {</p>
<p> filename = "/etc/raddb/db.daily"</p>
<p> key = "User-Name"</p>
<p> reset = "daily"</p>
<p> count-attribute = "Acct-Session-Time"</p>
<p> counter-name = "Daily-Session-Time"</p>
<p> check-name = "Max-Daily-Session"</p>
<p> reply-name = "Session-Timeout"</p>
<p> allowed-servicetype = "Framed-User"</p>
<p> cache-size = 5000</p>
<p> }</p>
<p>rlm_counter: Counter attribute Daily-Session-Time is number 11273</p>
<p>rlm_counter: Current Time: 1405421724 [2014-07-15 05:55:24], Next reset 1405486800 [2014-07-16 00:00:00]</p>
<p>rlm_counter: Failed to open file /etc/raddb/db.daily: Permission denied</p>
<p>/etc/raddb/modules/counter[71]: Instantiation failed for module "daily"</p><p><br></p><p><br></p><p><br></p><p>What strikes me as weird is why does freeradius try to look in db.daily which does not exist, instead of the MySQL table radacct ? I did try to create a file db.daily "just for testing" and seLinux is disabled. </p>
<p>[root@localhost raddb]# ls -lart /etc/raddb/db.daily </p><p>
</p><p>-rw-r--r-- 1 root radiusd 0 Jul 15 05:35 /etc/raddb/db.daily</p><p>[root@localhost raddb]# getenforce </p><p>
</p><p>Disabled</p><p>This is more or less a default CentOS RPM installation user and group are listed below</p><p>user = radiusd</p><p>
</p><p>group = radiusd</p><p><br></p><p><br></p><p>Am I barking up the wrong tree here ?</p><p><br></p><p>Any pointers in the right directions please?</p><p>
<br></p><p>Regards</p></div></div>