Using MySQL and assigning IP-Addresses based on Calling-Station-ID
Hi all, I sent an email to the list before, and still haven’t been able to fix my problem. This is what I want to do: I am using MySql to authenticate users. However, I need to authenticate them based on the Calling-Station-ID, and then assign IP-addresses to them, through the Framed-IP-Address attribute. This seems to be a very one to do, but its not working. All users will be having same username (user1) and password. This is the logic I am using: I haven't changed the sql query which comes with FreeRadius. In my usergroup table, I am putting users with the same username, but different groupnames. The radcheck table contains an entry for the password. The radreply table contains a Fall-Through = Yes for the user user1. The radgroupcheck contains groupnames (coming from the usergroup table) and Calling-Station-Id which I need to authenticate against. The radgroupreply table contains the replies I want to send to the different groups, which would have been authenticated/differentiated through their calling-station-id. Is this setup wrong? The replies which are being allocated is for the first groupname that appears in the radgroupreply table, which to me, means that the radgroupcheck is not having any user. Can anyone who has done the above before give me some hints as to what I am doing wrong, or maybe my setup could be wrong? Would the radius server not check the attributes appearing in the request automatically against the ones in the radcheck/radgroupcheck tables, or do I need to modify the sql_query? Thanks AL -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.432 / Virus Database: 268.16.10/624 - Release Date: 12/01/2007 14:04
Ackbar Joolia wrote:
The radcheck table contains an entry for the password. The radreply table contains a Fall-Through = Yes for the user user1. The radgroupcheck contains groupnames (coming from the usergroup table) and Calling-Station-Id which I need to authenticate against. The radgroupreply table contains the replies I want to send to the different groups, which would have been authenticated/differentiated through their calling-station-id.
That's not right, and if I'm understanding you correctly you can't do exactly what you want with the current release version of FreeRadius. Fall-Through does nothing on the current release version of FreeRadius - the SQL module merges the user and all the group check items into one, checks them, then puts all the reply items in. Since they're all merged, putting users into >1 group with conflicting check items will fail, as will putting users into >1 group with the same reply items. Also, you would not normally assign IPs to groups - you would assign them to sessions from a pool (see rlm_sqlippool) or statically to users (using Framed-IP-Address in the radreply items) Could you be a bit more specific about what you're trying to do?
participants (2)
-
Ackbar Joolia -
Phil Mayers