Is it possible to log connection details in MySQL?

ZaiPower trabajo at ciges.net
Fri Sep 1 16:42:22 CEST 2006


Hello:

I'd like to know if it is possible to save all the info under the log
directory "radacct" (connections' details by client's IP) in MySQL instead
of files in hard disk.	

Are all the variables accessible?. I mean, are they valid for an SQL
sentence in 'postauth_query' variables %{Packet-Type}, %{User-Name},
%{User-Password}, %{NAS-IP-Address}, %{NAS-Port} and  %{Client-IP-Address}?
Am I missing any other info?

After reading the answer
(http://wiki.freeradius.org/index.php/FAQ#How_do_I_log_failed_login_attempts_in_a_SQL_database.3F)
to the question "How do I log failed login attempts in a SQL database?" in
the FreeRadius wiki it seems it is possible with adequate SQL sentences.

I see three problems:
- I don't see clearly how to separate successfully authentication of
unsuccessfull. Maybe like this? How could I tell FreeRadius different
queries depending on type of request?

	post-auth {
		# Login successful: get an address from the IP pool.
		ippool

		Post-Auth-Type ACCEPT {
			sql
		}
	
		Post-Auth-Type REJECT {
			# Login failed: log to SQL database.
			sql
		}
	}


- Where I can find documentation about the different packet types and their
data?
- Is it possible to tell FreeRadius that I want to send more than one query
to MySQL?


I really want this functionality (keep the connection logs in MySQL, not in
the filesystem).  I make this question to know if I am in the right path or
ideally if anybody has already make something like this.
-- 
View this message in context: http://www.nabble.com/Is-it-possible-to-log-connection-details-in-MySQL--tf2202961.html#a6099963
Sent from the FreeRadius - User forum at Nabble.com.




More information about the Freeradius-Users mailing list