Simultaneous-Use Attribute not working
Muhammed Buvaydani
muhammed.buvaydani at netcom.com.tr
Thu Mar 8 10:54:11 CET 2018
Hello every body
I made all important configuration to allow Simultaneous-Use attribute working without result .
Modify the /etc/freeradius/sql/mysql/dialup.conf file and unncomment :
simul_count_query = "SELECT COUNT(*) \
FROM ${acct_table1} \
WHERE username = '%{SQL-User-Name}' \
AND acctstoptime IS NULL"
This is the result when I run freeradius in debug mode , there are no any check for simultaneous-use attribute
rad_recv: Accounting-Request packet from host 10.10.0.130 port 1049, id=231, length=104
Acct-Status-Type = Start
Acct-Session-Id = "3a457fb2"
User-Name = "99625743140"
NAS-Identifier = "ftg"
Framed-IP-Address = 192.168.33.5
Fortinet-Client-IP-Address = 192.168.33.5
Fortinet-Vdom-Name = "root"
Calling-Station-Id = "192.168.33.5"
Event-Timestamp = "Mar 8 2018 12:32:49 +03"
# Executing section preacct from file /etc/freeradius/sites-enabled/default
+group preacct {
++[preprocess] = ok
[acct_unique] WARNING: Attribute NAS-Port was not found in request, unique ID MAY be inconsistent
[acct_unique] Hashing ',NAS-Identifier = "ftg",NAS-IP-Address = 10.10.0.130,Acct-Session-Id = "3a457fb2",User-Name = "99625743140"'
[acct_unique] Acct-Unique-Session-ID = "cd2730cfc5c2adb4".
++[acct_unique] = ok
[suffix] No '@' in User-Name = "99625743140", looking up realm NULL
[suffix] No such realm "NULL"
++[suffix] = noop
+} # group preacct = ok
# Executing section accounting from file /etc/freeradius/sites-enabled/default
+group accounting {
[detail] expand: %{Packet-Src-IP-Address} -> 10.10.0.130
[detail] expand: /var/log/freeradius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/detail-%Y%m%d -> /var/log/freeradius/radacct/10.10.0.130/detail-20180308
[detail] /var/log/freeradius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/detail-%Y%m%d expands to /var/log/freeradius/radacct/10.10.0.130/detail-20180308
[detail] expand: %t -> Thu Mar 8 12:32:49 2018
++[detail] = ok
[sradutmp] expand: /var/log/freeradius/sradutmp -> /var/log/freeradius/sradutmp
[sradutmp] expand: %{User-Name} -> 99625743140
rlm_radutmp: No NAS-Port seen. Cannot do anything.
rlm_radumtp: WARNING: checkrad will probably not work!
++[sradutmp] = noop
[sql] expand: %{User-Name} -> 99625743140
[sql] sql_set_user escaped user --> '99625743140'
[sql] expand: %{Acct-Delay-Time} ->
[sql] ... expanding second conditional
[sql] expand: INSERT INTO radacct (acctsessionid, acctuniqueid, username, realm, nasipaddress, nasportid, nasporttype, acctstarttime, acctstoptime, acctsessiontime, acctauthentic, connectinfo_start, connectinfo_stop, acctinputoctets, acctoutputoctets, calledstationid, callingstationid, acctterminatecause, servicetype, framedprotocol, framedipaddress, acctstartdelay, acctstopdelay, xascendsessionsvrkey) VALUES ('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', '%{NAS-Port-Type}', '%S', NULL, '0', '%{Acct-Authentic}', '%{Connect-Info}', '', '0', '0', '%{Called-Station-Id}', '%{Calling-Station-Id}', '', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}',
rlm_sql (sql): Reserving sql socket id: 10
rlm_sql (sql): Released sql socket id: 10
++[sql] = ok
++update control {
sql_xlat
expand: %{User-Name} -> 99625743140
sql_set_user escaped user --> '99625743140'
expand: SELECT (SUM(acctinputoctets)+SUM(acctoutputoctets)) AS Total FROM radacct where acctstarttime >= CURDATE() AND radacct.username='%{User-Name}' -> SELECT (SUM(acctinputoctets)+SUM(acctoutputoctets)) AS Total FROM radacct where acctstarttime >= CURDATE() AND radacct.username='99625743140'
rlm_sql (sql): Reserving sql socket id: 9
sql_xlat finished
rlm_sql (sql): Released sql socket id: 9
expand: %{sql:SELECT (SUM(acctinputoctets)+SUM(acctoutputoctets)) AS Total FROM radacct where acctstarttime >= CURDATE() AND radacct.username='%{User-Name}'} -> 115456
sql_xlat
expand: %{User-Name} -> 99625743140
sql_set_user escaped user --> '99625743140'
expand: SELECT value FROM radcheck WHERE attribute='Ftg-Total-Limit' AND username='%{User-Name}' -> SELECT value FROM radcheck WHERE attribute='Ftg-Total-Limit' AND username='99625743140'
rlm_sql (sql): Reserving sql socket id: 8
SQL query did not return any results
rlm_sql (sql): Released sql socket id: 8
expand: %{sql: SELECT value FROM radcheck WHERE attribute='Ftg-Total-Limit' AND username='%{User-Name}'} ->
sql_xlat
expand: %{User-Name} -> 99625743140
sql_set_user escaped user --> '99625743140'
expand: SELECT value FROM radcheck WHERE attribute='Ftg-Total-Limit' AND username='%{User-Name}' -> SELECT value FROM radcheck WHERE attribute='Ftg-Total-Limit' AND username='99625743140'
rlm_sql (sql): Reserving sql socket id: 7
SQL query did not return any results
rlm_sql (sql): Released sql socket id: 7
expand: %{sql: SELECT value FROM radcheck WHERE attribute='Ftg-Total-Limit' AND username='%{User-Name}'} ->
sql_xlat
expand: %{User-Name} -> 99625743140
sql_set_user escaped user --> '99625743140'
expand: select calledstationid from radacct where acctsessionid='%{Acct-Session-Id}' -> select calledstationid from radacct where acctsessionid='3a457fb2'
rlm_sql (sql): Reserving sql socket id: 6
sql_xlat finished
rlm_sql (sql): Released sql socket id: 6
expand: %{sql:select calledstationid from radacct where acctsessionid='%{Acct-Session-Id}'} ->
++} # update control = noop
++? if ("%{control:Tmp-Integer-0}" > "%{control:Tmp-String-1}")
expand: %{control:Tmp-Integer-0} -> 115456
expand: %{control:Tmp-String-1} ->
? Evaluating ("%{control:Tmp-Integer-0}" > "%{control:Tmp-String-1}") -> TRUE
++? if ("%{control:Tmp-Integer-0}" > "%{control:Tmp-String-1}") -> TRUE
++if ("%{control:Tmp-Integer-0}" > "%{control:Tmp-String-1}") {
+++update coa {
expand: %{User-Name} -> 99625743140
expand: %{Framed-IP-Address} -> 192.168.33.5
+++} # update coa = noop
++} # if ("%{control:Tmp-Integer-0}" > "%{control:Tmp-String-1}") = noop
[attr_filter.accounting_response] expand: %{User-Name} -> 99625743140
attr_filter: Matched entry DEFAULT at line 12
++[attr_filter.accounting_response] = updated
+} # group accounting = updated
Sending Accounting-Response of id 231 to 10.10.0.130 port 1049
WARNING: Empty pre-proxy section. Using default return values.
Sending CoA-Request of id 235 to 10.10.0.130 port 3799
User-Name = "99625743140"
Framed-IP-Address = 192.168.33.5
Finished request 2.
Cleaning up request 2 ID 231 with timestamp +244
Going to the next request
Waking up in 2.4 seconds.
rad_recv: CoA-NAK packet from host 10.10.0.130 port 3799, id=235, length=50
Error-Cause = Session-Context-Not-Found
Event-Timestamp = "Mar 8 2018 12:32:49 +03"
Message-Authenticator = 0xdecd7dd3d4d82835f93f87c35704f1b9
# Executing section post-proxy from file /etc/freeradius/sites-enabled/default
+group post-proxy {
[eap] No pre-existing handler found
++[eap] = noop
+} # group post-proxy = noop
Finished request 2.
Going to the next request
Waking up in 2.9 seconds.
More information about the Freeradius-Users
mailing list