FreeRadius MySQL -> Logs (where they are?)
Hello all, I have configured my FreeRadius server to auth my clients over a MySQL table. The problem is that I do not have any more logs (like wrong login attempts). The detailed log is been done into a MySQL table named radacct (and works fine to bloqs simultaneous use) but the problem is that I cant see anymore why a login attempt gets rejected. Can someone tell me where to look? -- Att, NATANIEL KLUG nata@cnett.com.br Cyber Nett - Internet Banda Larga www.cnett.com.br (42) 3635-2957 Rua Diogo Pinto, 1046, Centro Laranjeiras do Sul - PR Brasil - 85301-290 "... também os sábios possuem coração tangível e podem, por vezes, usar da ciência como meio de demonstrar impressões sentimentais de que muitos não os julgam suscetíveis." Visconde de Taunay -- Esta mensagem foi verificada pelo antivirus e antispam e acredita-se nao se tratar de nenhum dos dois. Sistema de email Cyber Nett - v2.0
Nataniel Klug wrote:
I have configured my FreeRadius server to auth my clients over a MySQL table. The problem is that I do not have any more logs (like wrong login attempts). The detailed log is been done into a MySQL table named radacct (and works fine to bloqs simultaneous use) but the problem is that I cant see anymore why a login attempt gets rejected.
Can someone tell me where to look?
The logs are put in the file "radius.log", not in SQL. See radiusd.conf. Alan DeKok.
Hello Alan, Yes, I know that this kind of log is put in /var/log/radius/radius.log. The problem is that they are not been logged there. It's a configuration in radiusd.conf? I could not find this... Can you tell me what tag? Alan DeKok escreveu:
Nataniel Klug wrote:
I have configured my FreeRadius server to auth my clients over a MySQL table. The problem is that I do not have any more logs (like wrong login attempts). The detailed log is been done into a MySQL table named radacct (and works fine to bloqs simultaneous use) but the problem is that I cant see anymore why a login attempt gets rejected.
Can someone tell me where to look?
The logs are put in the file "radius.log", not in SQL. See radiusd.conf.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-- Esta mensagem foi verificada pelo antivirus e antispam e acredita-se nao se tratar de nenhum dos dois.
Sistema de email Cyber Nett - v2.0
-- Att, NATANIEL KLUG nata@cnett.com.br Cyber Nett - Internet Banda Larga www.cnett.com.br (42) 3635-2957 Rua Diogo Pinto, 1046, Centro Laranjeiras do Sul - PR Brasil - 85301-290 "... também os sábios possuem coração tangível e podem, por vezes, usar da ciência como meio de demonstrar impressões sentimentais de que muitos não os julgam suscetíveis." Visconde de Taunay -- Esta mensagem foi verificada pelo antivirus e antispam e acredita-se nao se tratar de nenhum dos dois. Sistema de email Cyber Nett - v2.0
auth_log Ivan Kalik Kalik Informatika ISP Dana 16/7/2007, "Nataniel Klug" <nata@cnett.com.br> piše:
Hello Alan,
Yes, I know that this kind of log is put in /var/log/radius/radius.log. The problem is that they are not been logged there. It's a configuration in radiusd.conf? I could not find this... Can you tell me what tag?
Alan DeKok escreveu:
Nataniel Klug wrote:
I have configured my FreeRadius server to auth my clients over a MySQL table. The problem is that I do not have any more logs (like wrong login attempts). The detailed log is been done into a MySQL table named radacct (and works fine to bloqs simultaneous use) but the problem is that I cant see anymore why a login attempt gets rejected.
Can someone tell me where to look?
The logs are put in the file "radius.log", not in SQL. See radiusd.conf.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-- Esta mensagem foi verificada pelo antivirus e antispam e acredita-se nao se tratar de nenhum dos dois.
Sistema de email Cyber Nett - v2.0
-- Att,
NATANIEL KLUG nata@cnett.com.br
Cyber Nett - Internet Banda Larga www.cnett.com.br (42) 3635-2957 Rua Diogo Pinto, 1046, Centro Laranjeiras do Sul - PR Brasil - 85301-290
"... também os sábios possuem coraçăo tangível e podem, por vezes, usar da cięncia como meio de demonstrar impressőes sentimentais de que muitos năo os julgam suscetíveis." Visconde de Taunay
-- Esta mensagem foi verificada pelo antivirus e antispam e acredita-se nao se tratar de nenhum dos dois.
Sistema de email Cyber Nett - v2.0
I need to log connect speeds from users At any rate things working fine from our own carrier globalpops to capture these on the start packet but Yournetplus for some reason it doesn't work. I see this info in the update accounting packet so i thought I would modify the update query but It gives errors anyone know why this is wrong.. it stops right at the AscendDataRate ='26400' for example then nothing after Trying to gather the Ascend-Data-Rate and USR-Connect-Speed accounting_update_query = "UPDATE ${acct_table1} \ SET FramedIPAddress = '%{Framed-IP-Address}', \ AcctSessionTime = '%{Acct-Session-Time}', \ AcctInputOctets = '%{Acct-Input-Octets}', \ AcctOutputOctets = '%{Acct-Output-Octets}' \ AscenDataRate = '%{Ascend-Xmit-Rate}' \ USRConnectSpeed = '%{USR-Connect-Speed}' \ WHERE AcctSessionId = '%{Acct-Session-Id}' \ AND UserName = '%{SQL-User-Name}' \ AND NASIPAddress= '%{NAS-IP-Address}'"
And the errors are? Ivan Kalik Kalik Informatika ISP Dana 16/7/2007, "Jeff" <jeffa@jahelpdesk.com> piše:
I need to log connect speeds from users
At any rate things working fine from our own carrier globalpops to capture these on the start packet
but Yournetplus for some reason it doesn't work.
I see this info in the update accounting packet so i thought I would modify the update query but It gives errors
anyone know why this is wrong.. it stops right at the AscendDataRate ='26400' for example then nothing after
Trying to gather the Ascend-Data-Rate and USR-Connect-Speed
accounting_update_query = "UPDATE ${acct_table1} \ SET FramedIPAddress = '%{Framed-IP-Address}', \ AcctSessionTime = '%{Acct-Session-Time}', \ AcctInputOctets = '%{Acct-Input-Octets}', \ AcctOutputOctets = '%{Acct-Output-Octets}' \ AscenDataRate = '%{Ascend-Xmit-Rate}' \ USRConnectSpeed = '%{USR-Connect-Speed}' \ WHERE AcctSessionId = '%{Acct-Session-Id}' \ AND UserName = '%{SQL-User-Name}' \ AND NASIPAddress= '%{NAS-IP-Address}'"
Mon Jul 16 11:23:22 2007 : Error: rlm_sql (sql): Couldn't update SQL accounting ALIVE record - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AscendDataRate = '24000' USRConnectSpeed = '' WHERE AcctSess' at line 1 Mon Jul 16 11:23:24 2007 : Error: rlm_sql (sql): Couldn't update SQL accounting ALIVE record - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AscendDataRate = '19200' USRConnectSpeed = '' WHERE AcctSess' at line 1 Mon Jul 16 11:23:37 2007 : Error: rlm_sql (sql): Couldn't update SQL accounting ALIVE record - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AscendDataRate = '19200' USRConnectSpeed = '' WHERE AcctSess' at line 1 Mon Jul 16 11:23:42 2007 : Error: rlm_sql (sql): Couldn't update SQL accounting ALIVE record - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AscendDataRate = '19200' USRConnectSpeed = '' WHERE AcctSess' at line 1 _____ From: tnt@kalik.co.yu To: FreeRadius users mailing list [mailto:freeradius-users@lists.freeradius.org] Sent: Mon, 16 Jul 2007 11:06:28 -0400 Subject: Re: mysql accounting connect speeds And the errors are? Ivan Kalik Kalik Informatika ISP Dana 16/7/2007, "Jeff" <jeffa@jahelpdesk.com> piše:
I need to log connect speeds from users
At any rate things working fine from our own carrier globalpops to capture these on the start packet
but Yournetplus for some reason it doesn't work.
I see this info in the update accounting packet so i thought I would modify the update query but It gives errors
anyone know why this is wrong.. it stops right at the AscendDataRate ='26400' for example then nothing after
Trying to gather the Ascend-Data-Rate and USR-Connect-Speed
accounting_update_query = "UPDATE ${acct_table1} \ SET FramedIPAddress = '%{Framed-IP-Address}', \ AcctSessionTime = '%{Acct-Session-Time}', \ AcctInputOctets = '%{Acct-Input-Octets}', \ AcctOutputOctets = '%{Acct-Output-Octets}' \ AscenDataRate = '%{Ascend-Xmit-Rate}' \ USRConnectSpeed = '%{USR-Connect-Speed}' \ WHERE AcctSessionId = '%{Acct-Session-Id}' \ AND UserName = '%{SQL-User-Name}' \ AND NASIPAddress= '%{NAS-IP-Address}'"
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Jeff wrote:
Mon Jul 16 11:23:22 2007 : Error: rlm_sql (sql): Couldn't update SQL accounting ALIVE record - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AscendDataRate = '24000' USRConnectSpeed = '' WHERE AcctSess' at line 1
You need a comma between data items: 'AscendDataRate = '24000', USRConnectSpeed ='' WHERE AcctSess' ^^^ -- Dennis Skinner Systems Administrator BlueFrog Internet http://www.bluefrog.com
ok heres what i have now accounting_update_query = "UPDATE ${acct_table1} \ SET FramedIPAddress = '%{Framed-IP-Address}', \ AcctSessionTime = '%{Acct-Session-Time}', \ AcctInputOctets = '%{Acct-Input-Octets}', \ AcctOutputOctets = '%{Acct-Output-Octets}' \ AscendDataRate = '%{Ascend-Data-Rate}', \ USRConnectSpeed = '%{USR-Connect-Speed}' \ WHERE AcctSessionId = '%{Acct-Session-Id}' \ AND UserName = '%{SQL-User-Name}' \ AND NASIPAddress= '%{NAS-IP-Address}'" an heres the new error Mon Jul 16 12:49:19 2007 : Error: rlm_sql (sql): Couldn't update SQL accounting ALIVE record - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AscendDataRate = '19200', USRConnectSpeed = '' WHERE AcctSes' at line 1 Mon Jul 16 12:49:35 2007 : Error: rlm_sql (sql): Couldn't update SQL accounting ALIVE record - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AscendDataRate = '19200', USRConnectSpeed = '' WHERE AcctSes' at line 1 Mon Jul 16 12:49:40 2007 : Error: rlm_sql (sql): Couldn't update SQL accounting ALIVE record - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AscendDataRate = '19200', USRConnectSpeed = '' WHERE AcctSes' at line 1 Mon Jul 16 12:49:59 2007 : Error: rlm_sql (sql): Couldn't update SQL accounting ALIVE record - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AscendDataRate = '19200', USRConnectSpeed = '' WHERE AcctSes' at line _____ From: Dennis Skinner [mailto:dskinner@bluefrog.com] To: FreeRadius users mailing list [mailto:freeradius-users@lists.freeradius.org] Sent: Mon, 16 Jul 2007 11:59:34 -0400 Subject: Re: mysql accounting connect speeds Jeff wrote:
Mon Jul 16 11:23:22 2007 : Error: rlm_sql (sql): Couldn't update SQL accounting ALIVE record - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AscendDataRate = '24000' USRConnectSpeed = '' WHERE AcctSess' at line 1
You need a comma between data items: 'AscendDataRate = '24000', USRConnectSpeed ='' WHERE AcctSess' ^^^ -- Dennis Skinner Systems Administrator BlueFrog Internet http://www.bluefrog.com - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Jeff wrote:
AcctOutputOctets = '%{Acct-Output-Octets}' \
Need comma on live above. This is a MySQL issue, not a FR issue. Please read the MySQL docs if you don't understand how to create a valid query. -- Dennis Skinner Systems Administrator BlueFrog Internet http://www.bluefrog.com
its not i do not understand its just these stupid bi-focals i have a hard time seeing. I overlooked that, sorry for being a blind idiot _____ From: Dennis Skinner [mailto:dskinner@bluefrog.com] To: FreeRadius users mailing list [mailto:freeradius-users@lists.freeradius.org] Sent: Mon, 16 Jul 2007 13:54:02 -0400 Subject: Re: mysql accounting connect speeds Jeff wrote:
AcctOutputOctets = '%{Acct-Output-Octets}' \
Need comma on live above. This is a MySQL issue, not a FR issue. Please read the MySQL docs if you don't understand how to create a valid query. -- Dennis Skinner Systems Administrator BlueFrog Internet http://www.bluefrog.com - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Yes. You are missing commas before AscendDataRate and USRConnectSpeed expressions that you have added to the update query. Ivan Kalik Kalik Informatika ISP Dana 16/7/2007, "Dennis Skinner" <dskinner@bluefrog.com> piše:
Jeff wrote:
Mon Jul 16 11:23:22 2007 : Error: rlm_sql (sql): Couldn't update SQL accounting ALIVE record - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AscendDataRate = '24000' USRConnectSpeed = '' WHERE AcctSess' at line 1
You need a comma between data items:
'AscendDataRate = '24000', USRConnectSpeed ='' WHERE AcctSess' ^^^
-- Dennis Skinner Systems Administrator BlueFrog Internet http://www.bluefrog.com - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Yes, and the AscendDataRate too. I get the inserts fine on the start packet and the data goes right in as suppose too. all works fine this way for our GlobalPOPS and all data shows up and into sql using this line in the start --- accounting_start_query = "INSERT into ${acct_table1} (AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctStopTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, ConnectInfo_stop, AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId, AcctTerminateCause, ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay, AscendDataRate, USRConnectSpeed, AcctStopDelay) values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', '%{NAS-Port-Type}', '%S', '0', '0', '%{Acct-Authentic}', '%{Connect-Info}', '', '0', '0', '%{Called-Station-Id}', '%{Calling-Station-Id}', '', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '%{Acct-Delay-Time}', '%{Ascend-Xmit-Rate}', '%{USR-Connect-Speed}', '0')" --- data goes right into mysql tables But YNP for some reason most miss the start, so I thought maybe I could grab them on the update query cause i see one or the other on in update packet, for ynp so then i would have what i need, but as i stated this errors out with the error i mentioned below trying to do this Jeff _____ From: Hugh Messenger [mailto:hugh@alaweb.com] To: 'FreeRadius users mailing list' [mailto:freeradius-users@lists.freeradius.org] Sent: Mon, 16 Jul 2007 11:40:53 -0400 Subject: RE: mysql accounting connect speeds Jeff said:
USRConnectSpeed = '%{USR-Connect-Speed}' \
Did you actually add a USRConnectSpeed column to the radacct table? There isn't one by default. -- hugh - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Nataniel Klug wrote:
Yes, I know that this kind of log is put in /var/log/radius/radius.log. The problem is that they are not been logged there.
If the server starts, it prints text to that file. If the file is empty, the server isn't running as a daemon. If you're running in debugging mode, all output goes to the screen. Alan DeKok.
Thanks Alan, I found the solution. Alan DeKok escreveu:
Nataniel Klug wrote:
Yes, I know that this kind of log is put in /var/log/radius/radius.log. The problem is that they are not been logged there.
If the server starts, it prints text to that file. If the file is empty, the server isn't running as a daemon.
If you're running in debugging mode, all output goes to the screen.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-- Esta mensagem foi verificada pelo antivirus e antispam e acredita-se nao se tratar de nenhum dos dois.
Sistema de email Cyber Nett - v2.0
-- Att, NATANIEL KLUG nata@cnett.com.br Cyber Nett - Internet Banda Larga www.cnett.com.br (42) 3635-2957 Rua Diogo Pinto, 1046, Centro Laranjeiras do Sul - PR Brasil - 85301-290 "... também os sábios possuem coração tangível e podem, por vezes, usar da ciência como meio de demonstrar impressões sentimentais de que muitos não os julgam suscetíveis." Visconde de Taunay -- Esta mensagem foi verificada pelo antivirus e antispam e acredita-se nao se tratar de nenhum dos dois. Sistema de email Cyber Nett - v2.0
participants (6)
-
Alan DeKok -
Dennis Skinner -
Hugh Messenger -
Jeff -
Nataniel Klug -
tnt@kalik.co.yu