Hi

After a long week of reading every config file, how-to's (old, outdated, new, faulty and what not) and reading this mailing list archive and tried many test installs of freeradius I now ask for some help.

Short version:
How to configure freeradius to populate the radacct mysql table. (need help)
And based on the info in the table, make a php page to list online user with the ability to kick them off. (will be able to do this by my self, if radacct table is the right place to do this) Am I supposed to send extra parameters to the server when logging in to get it to populate this table?

Long version:

My system is Slackware 12.1
Kernel 2.6.24.5
mysql 5.0.51b
php 5.2.5
Apache 2.2.8

And FreeRadius 2.0.5 from tar.gz source.

What I've done so far:

Extracted and doing the configure, make, make install.

mysql -uroot -p
 CREATE DATABASE radius;
 GRANT ALL ON radius.* TO [EMAIL PROTECTED] IDENTIFIED BY "radpass";
 exit

But in 2.0.5 I can't find the next two steps, cd /usr/share/doc/packages/freeradius/doc/examples/
mysql -uroot -p radius < mysql.sql

In fact I can't find either the mysql.sql or the db_mysql.sql stated in the schema.sql header.
So I imported the schema.sql from /usr/local/etc/raddb/sql/mysql/ folder.
This gives me the radius tables that I need so far I guess. (or is this wrong?)

Next up was sql.conf, added mysql credentials.
Followed by editing the /usr/local/etc/raddb/sites-available/default, adding sql to the authorize and accounting.

And added my pfSense to the client list aswell as my client pc (for NRradPing tool test).
client 192.168.1.1 {
 secret = testing123
 nastype = other
}
client 192.168.1.11 {
 secret = testing123
 nastype = other
}

Then manually added a user to the radcheck table.
id= 1
UserName= testuser
Attribute= Cleartext-Password
Value= testpasswd
Op= :=

Testing this from pfSense' captive portal with radius support works.
(And the NTradPing tool from my client pc)
I'm also able to kick out the user from pfSense captive portal status page.

And now to my problems/questions.

I'm building this into a small webtool for admin the users (daloRadius only gave me plenty of sql errors and since I'm able to write my own in php I will).
So far, adding the users to the radcheck table is easy.

What's not - is understanding how the radacct table gets populated.
All I get is new entries in the /usr/local/var/log/radius/radacct/192.168.1.1/auth-detail-yyymmdd
As shown here :

Tue Jul 22 14:06:55 2008
       Packet-Type = Access-Request
       NAS-IP-Address = 88.88.54.181
       NAS-Identifier = "router.local.lan"
       User-Name = "testuser"
       Service-Type = Login-User
       NAS-Port-Type = Ethernet
       NAS-Port = 0
       Framed-IP-Address = 192.168.1.11
       Called-Station-Id = "00:0d:9d:xx:xx:xx" (masked out to hide the mac)
Calling-Station-Id = "00:50:8d:xx:xx:xx" (masked out to hide the mac)

How do I redirect this (and more info) to populate the radacct table? (See the short version question on top of this post)

Thank you for reading this long post.
Feel free to ask any question about my setup, sorry if I've not included enough already.

Kind regards

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to