I am looking for a good reference on how to integrate MYSQL and Freeradius.  I've set up the basics and imported the schema's and modified the sql.conf file and the sites-enabled/default files.  All starting and running fine.  What I don't know about are how (if at all) you can log the rad_recv messages to sql.  For instance my NAS is sending back the following:<br>
<br><b>rad_recv: Accounting-Request packet from host x.x.x.120 port 51637, id=50, length=95<br>        Acct-Status-Type = Interim-Update<br>        Acct-Session-Id = "C2594B9A71DB"<br>        Acct-Delay-Time = 0<br>
        User-Name = "joe.bobuser"<br>        NAS-Identifier = "M20"<br>        Juniper-Interactive-Command = "run start shell "<br>        NAS-IP-Address = x.x.x.120<br></b>+- entering group preacct {...}<br>
++[preprocess] returns ok<br>[acct_unique] WARNING: Attribute NAS-Port was not found in request, unique ID MAY be inconsistent<br>[acct_unique] Hashing ',Client-IP-Address = x.x.x.120,NAS-IP-Address = x.x.x.120,Acct-Session-Id = "C2594B9A71DB",User-Name = "joe.bobuser"'<br>
[acct_unique] Acct-Unique-Session-ID = "c8c99ca6ea5c67dc".<br>++[acct_unique] returns ok<br>[suffix] No '@' in User-Name = "joe.bobuser", looking up realm NULL<br>[suffix] No such realm "NULL"<br>
++[suffix] returns noop<br>++[files] returns noop<br>+- entering group accounting {...}<br>[detail]        expand: /var/log/radius/radacct/%{Client-IP-Address}/detail-%Y%m%d -> /var/log/radius/radacct/x.x.x.120/detail-20100607<br>
[detail] /var/log/radius/radacct/%{Client-IP-Address}/detail-%Y%m%d expands to /var/log/radius/radacct/x.x.x.120/detail-20100607<br>[detail]        expand: %t -> Mon Jun  7 11:13:24 2010<br>++[detail] returns ok<br>++[unix] returns noop<br>
[radutmp]       expand: /var/log/radius/radutmp -> /var/log/radius/radutmp<br>[radutmp]       expand: %{User-Name} -> joe.bobuser<br>  rlm_radutmp: No NAS-Port seen.  Cannot do anything.<br>  rlm_radumtp: WARNING: checkrad will probably not work!<br>
++[radutmp] returns noop<br>[sql]   expand: %{User-Name} -> joe.bobuser<br>[sql] sql_set_user escaped user --> 'joe.bobuser'<br>[sql]   expand: %{Acct-Input-Gigawords} -> <br>[sql]   ... expanding second conditional<br>
[sql]   expand: %{Acct-Input-Octets} -> <br>[sql]   ... expanding second conditional<br>[sql]   expand: %{Acct-Output-Gigawords} -> <br>[sql]   ... expanding second conditional<br>[sql]   expand: %{Acct-Output-Octets} -> <br>
[sql]   ... expanding second conditional<br>[sql]   expand:            UPDATE radacct           SET              framedipaddress = '%{Framed-IP-Address}',              acctsessiontime     = '%{Acct-Session-Time}',              acctinputoctets     = '%{%{Acct-Input-Gigawords}:-0}'  << 32 |                                    '%{%{Acct-Input-Octets}:-0}',              acctoutputoctets    = '%{%{Acct-Output-Gigawords}:-0}' << 32 |                                    '%{%{Acct-Output-Octets}:-0}'           WHERE acctsessionid = '%{Acct-Session-Id}'           AND username        = '%{SQL-User-Name}'           AND nasipaddress    = '%{NAS-IP-Address}' ->            UPDATE radacct           SET              framedipaddress = '',              acctsessiontime     = '',              acctinputoctets     = '0'  << 32 |                                    '0',              acctoutputoctets    = '0' << 32 |                                    '0'           WHERE acctsessionid = 'C2594B9A71DB'           AND username        = 'joe.bobuser'           AND nasipaddress    =<br>
[sql]   expand: /var/log/radius/sqltrace.sql -> /var/log/radius/sqltrace.sql<br>rlm_sql (sql): Reserving sql socket id: 0<br>rlm_sql_mysql: query:             UPDATE radacct           SET              framedipaddress = '',              acctsessiontime     = '',              acctinputoctets     = '0'  << 32 |                                    '0',              acctoutputoctets    = '0' << 32 |                                    '0'           WHERE acctsessionid = 'C2594B9A71DB'           AND username        = 'joe.bobuser'           AND nasipaddress    = 'x.x.x.120'<br>
rlm_sql (sql): Released sql socket id: 0<br>++[sql] returns ok<br>[attr_filter.accounting_response]       expand: %{User-Name} -> joe.bobuser<br> attr_filter: Matched entry DEFAULT at line 12<br>++[attr_filter.accounting_response] returns updated<br>
Sending Accounting-Response of id 50 to x.x.x.120 port 51637<br>Finished request 5.<br>Cleaning up request 5 ID 50 with timestamp +397<br>Going to the next request<br>Ready to process requests.<br>rad_recv: Accounting-Request packet from host x.x.x.120 port 51637, id=51, length=84<br>
        Acct-Status-Type = Interim-Update<br>        Acct-Session-Id = "C2594B9A71DB"<br>        Acct-Delay-Time = 0<br>        User-Name = "joe.bobuser"<br>        NAS-Identifier = "M20"<br>
        Juniper-Interactive-Command = "quit "<br>        NAS-IP-Address = x.x.x.120<br><br><br>...<br>As can be seen above the rad_recv: section is sending back a few items that I am interested in having logged.  For instance the Juniper-Interactive-Command.  <br>
<br>Thanks if you can help or point me in the right direction.<br><br>N  <br><br><br>