Restricting logins with Calling-Station-Id in MySQL
Hello, I need help restricting users based on the number they called. I am using Freeradius 1.1.1 and a MySQL backend. I tried adding Called-Station-Id == "number,number,..." in to radgroupcheck, but it does not seem to be functioning. Could someone shed some light on the problem? Thanks.
In the users file you could have a line... DEFAULT Called-Station-ID == 1112223333, Auth-Type := Reject Chris Carver Pennswoods.Net Network Engineer Mike Jakubik wrote:
Hello,
I need help restricting users based on the number they called. I am using Freeradius 1.1.1 and a MySQL backend. I tried adding Called-Station-Id == "number,number,..." in to radgroupcheck, but it does not seem to be functioning. Could someone shed some light on the problem?
Thanks. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Christopher Carver wrote:
In the users file you could have a line...
DEFAULT Called-Station-ID == 1112223333, Auth-Type := Reject
As i mentioned, i need to do this in the sql database and for each group. Adding the Called-Station-ID to radgroupcheck results in the following error: Thu May 18 16:39:13 2006 : Info: rlm_sql (sql): No matching entry in the database for request from user [xxx] Thu May 18 16:39:13 2006 : Auth: Login incorrect: [xxx/xxx] (from client xxx port 1485 cli xxx)
In radgroupcheck set up something like this: +----+-------------+------------------+----+-------------+ | id | GroupName | Attribute | op | Value | +----+-------------+------------------+----+-------------+ | 1 | restricted | Called-Station-ID | == | 1112223333 | | 2 | restricted | Auth-Type | := | reject | +----+-------------+------------------+----+-------------+ The thing a lot of people mess up is they don't realize Auth-Type := reject needs to go in radgroupcheck not radgroupreply. Then in usergroup try this for each user you want to set this restriction for: +--------+-------------+---------------+ | id | UserName | GroupName | +--------+-------------+---------------+ | 39747 | <user> | restricted | +--------+-------------+---------------+ That should do it. Chris Carver Pennswoods.Net Network Engineer Mike Jakubik wrote:
Christopher Carver wrote:
In the users file you could have a line...
DEFAULT Called-Station-ID == 1112223333, Auth-Type := Reject
As i mentioned, i need to do this in the sql database and for each group. Adding the Called-Station-ID to radgroupcheck results in the following error:
Thu May 18 16:39:13 2006 : Info: rlm_sql (sql): No matching entry in the database for request from user [xxx] Thu May 18 16:39:13 2006 : Auth: Login incorrect: [xxx/xxx] (from client xxx port 1485 cli xxx) - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Christopher Carver wrote:
In radgroupcheck set up something like this:
+----+-------------+------------------+----+-------------+ | id | GroupName | Attribute | op | Value | +----+-------------+------------------+----+-------------+ | 1 | restricted | Called-Station-ID | == | 1112223333 | | 2 | restricted | Auth-Type | := | reject | +----+-------------+------------------+----+-------------+
The thing a lot of people mess up is they don't realize Auth-Type := reject needs to go in radgroupcheck not radgroupreply.
Yes, thats exactly what I've done, except for Called-Station-Id value i used "number,number,number". That seems to give an error. Adding the Auth-Type := Reject results in every login attempt being incorrect .
On Thu, 18 May 2006, Mike Jakubik wrote:
Hello,
I need help restricting users based on the number they called. I am using Freeradius 1.1.1 and a MySQL backend. I tried adding Called-Station-Id == "number,number,..." in to radgroupcheck, but it does not seem to be functioning. Could someone shed some light on the problem?
Check the checkval module. You can use a := operator in that case
Thanks. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-- Kostas Kalevras Network Operations Center kkalev@noc.ntua.gr National Technical University of Athens, Greece Work Phone: +30 210 7721861 'Go back to the shadow' Gandalf
Kostas Kalevras wrote:
On Thu, 18 May 2006, Mike Jakubik wrote:
Hello,
I need help restricting users based on the number they called. I am using Freeradius 1.1.1 and a MySQL backend. I tried adding Called-Station-Id == "number,number,..." in to radgroupcheck, but it does not seem to be functioning. Could someone shed some light on the problem?
Check the checkval module. You can use a := operator in that case
Are you saying that this cant be done by simply putting in Called-Station-Id in the database, but only with the checkval module? Also, how would one send a message to the users stating that they dialed in to the wrong number?
participants (3)
-
Christopher Carver -
Kostas Kalevras -
Mike Jakubik