freeradius + MySQL
Posted on 2009-04-26
Hi! I have the two Debian packages, freeradius and freeradius-mysql installed.
The MySQL database is populated with some data for testing, and the freeradiusd.conf and sql.conf are configured.
The following test on localhost works:
~# radtest johndoe abc123 localhost 1812 testing123
The RADIUS server is able to connect with the MySQL database, and I can authenticate users from it. I also have a remote RADIUS client configured that is working with my captive portal and RADIUS server, however, it only works when I have the client's IP address configured in /etc/freeradius/clients.conf. It does not work using the MySQL 'nas' table.
In other words, freeradius does not seem to be querying my nas table from the MySQL database.
In my /etc/freeradius/sql.conf file I have following:
# Table to keep radius client info
nas_table = "nas"
# Set to 'yes' to read radius clients from the database ('nas' table)
readclients = yes
In my nas table I have following:
id nasname shortname type ports secret community description
1 xx.xx.xx.xx NULL other NULL testing123 NULL RADIUS Client
... where xx.xx.xx.xx is the correct IP address of my RADIUS client.
When I try to log in via the captive portal, with freeradius running in debug mode, I get the following:
rad_recv: Access-Request packet from host xx.xx.xx.xx:2326, id=126, length=341
Ignoring request from unknown client xx.xx.xx.xx:2326
--- Walking the entire request list ---
Nothing to do. Sleeping until we see a request.
Any help would be greatly apprciated!