I'm having problems getting ippool to work. The rlm_ippool module seems
to load and initialize ok, but when I add the Pool-Name attribute,
authentication starts failing. I'm not sure if I'm putting the
Pool-Name attribute in the right spot or not. I've tried putting it in
radcheck and radreply and radgroupcheck and radgroup reply as well. I
was basing my Pool-Name attribute placement on a posting from Cassiano
Aquino on June 16th 2002.
http://www.mail-archive.com/[email protected]/msg06510.h
tml
It sounded like he had ippool working but was having address
de-allocation problems. Maybe my problem has something to do with the
mschap or postgres module , but I don't see how/why.
I've also tried creating a separate group and making that user a member
of both groups and putting the Pool-Name in radgroupreply as part of the
separate group. I've also tried using different "op" values for
User-Password and Pool-Name with no luck
Here's what I have at this point. I hope I've provided enough
information. Many thanks to those working on freeradius and it's
modules ...
In SQL I have the following:
customers=# select * from radcheck where username = 'charlieb';
id | username | attribute | value | op
-----+----------+---------------+---------+----
771 | charlieb | User-Password | testing | :=
customers=# select * from usergroup where username = 'charlieb';
id | customer_user_id | username | groupname
-----+------------------+----------+-----------
771 | CHA1646-100 | charlieb | dialplan1
customers=# select * from radgroupreply;
id | groupname | attribute | value | op |
prio
----+-----------+---------------------------+-----------------+----+----
--
2 | dialplan1 | Service-Type | Framed-User | := |
0
3 | dialplan1 | Framed-Protocol | PPP | := |
0
4 | dialplan1 | Framed-IP-Netmask | 255.255.255.255 | := |
0
5 | dialplan1 | X-Ascend-Assign-IP-Pool | 1 | := |
0
6 | dialplan1 | X-Ascend-Idle-Limit | 900 | := |
0
7 | dialplan1 | X-Ascend-Maximum-Channels | 1 | := |
0
1 | dialplan1 | Acct-Authentic | RADIUS | := |
0
customers=# select * from radreply;
id | username | attribute | value | op
----+----------+------------------+-------+----
2 | charlieb | BWControl-RxRate | 384 | :=
3 | charlieb | BWControl-TxRate | 128 | :=
customers=# select * from radgroupcheck;
id | groupname | attribute | value | op
----+-----------+-----------+----------+----
11 | dialplan1 | Pool-Name | wireless | :=
radiusd.conf
#in modules
ippool wireless {
session-db = ${raddbdir}/wireless.db
ip-index = ${raddbdir}/wireless.idx.db
range-start = 63.167.49.1
range-stop = 63.167.49.253
netmask = 255.255.255.0
cache-size = 1024
}
authorize {
preprocess
suffix
sql
mschap
wireless
}
authenticate {
mschap
}
accounting {
acct_unique
detail
wireless
sql
radutmp
}
In users, I have:
DEFAULT Auth-Type := Local
Fall-Through = 1
DEFAULT Service-Type == Framed-User
Framed-IP-Address = 255.255.255.254,
Framed-MTU = 576,
Service-Type = Framed-User,
Fall-Through = 1
DEFAULT Acct-Authentic == RADIUS
Service-Type = Framed-User,
Framed-Protocol = PPP,
Framed-Netmask = 255.255.255.255,
Ascend-Assign-IP-Pool = 1,
Ascend-Idle-Limit = 900,
Ascend-Maximum-Channels = 1
########################################################################
########
With the Pool-Name attribute set in radgroupcheck, authorization fails.
(working debug log below this)
########################################################################
########
rad_recv: Access-Request packet from host 63.167.48.244:1029, id=104,
length=136
Service-Type = Framed-User
Framed-Protocol = PPP
User-Name = "charlieb"
MS-CHAP-Challenge = 0x5931d1c70b2cf8d5bf43d429d5c4f49c
MS-CHAP2-Response =
0x010066977855bea946c46a9ade213bad6cd200000000000000001830fc78d1b993e139
8bcc47c98d26488c8f4eedcbb4075b
NAS-IP-Address = 10.100.1.1
NAS-Port = 0
modcall: entering group authorize
modcall[authorize]: module "preprocess" returns ok
rlm_realm: Looking up realm NULL for User-Name = "charlieb"
rlm_realm: No such realm NULL
modcall[authorize]: module "suffix" returns noop
radius_xlat: 'charlieb'
sql_set_user: escaped user --> 'charlieb'
radius_xlat: 'SELECT id,UserName,Attribute,Value FROM radcheck WHERE
Username = 'charlieb' ORDER BY id'
rlm_sql: Reserving sql socket id: 2
query: SELECT id,UserName,Attribute,Value FROM radcheck WHERE Username =
'charlieb' ORDER BY id
rlm_postgresql Status: PGRES_TUPLES_OK
sql_postgresql: affected rows =
radius_xlat: 'SELECT
radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgrou
pcheck.Value FROM radgroupcheck,usergroup WHERE usergroup.Username =
'charlieb' AND usergroup.GroupName = radgroupcheck.GroupName ORDER BY
radgroupcheck.id'
query: SELECT
radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgrou
pcheck.Value FROM radgroupcheck,usergroup WHERE usergroup.Username =
'charlieb' AND usergroup.GroupName = radgroupcheck.GroupName ORDER BY
radgroupcheck.id
rlm_postgresql Status: PGRES_TUPLES_OK
sql_postgresql: affected rows =
radius_xlat: 'SELECT id,UserName,Attribute,Value FROM radreply WHERE
Username = 'charlieb' ORDER BY id'
query: SELECT id,UserName,Attribute,Value FROM radreply WHERE Username =
'charlieb' ORDER BY id
rlm_postgresql Status: PGRES_TUPLES_OK
sql_postgresql: affected rows =
radius_xlat: 'SELECT
radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgrou
preply.Value FROM radgroupreply,usergroup WHERE usergroup.Username =
'charlieb' AND usergroup.GroupName = radgroupreply.GroupName ORDER BY
radgroupreply.id'
query: SELECT
radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgrou
preply.Value FROM radgroupreply,usergroup WHERE usergroup.Username =
'charlieb' AND usergroup.GroupName = radgroupreply.GroupName ORDER BY
radgroupreply.id
rlm_postgresql Status: PGRES_TUPLES_OK
sql_postgresql: affected rows =
rlm_sql: Pairs do not match [charlieb]
rlm_sql: Released sql socket id: 2
modcall[authorize]: module "sql" returns notfound
modcall[authorize]: module "mschap" returns notfound
modcall[authorize]: module "wireless" returns noop
modcall: group authorize returns ok
auth: No authenticate method (Auth-Type) configuration found for the
request: Rejecting the user
auth: Failed to validate the user.
Delaying request 2 for 1 seconds
Finished request 2
Going to the next request
--- Walking the entire request list ---
Waking up in 1 seconds...
--- Walking the entire request list ---
Waking up in 1 seconds...
--- Walking the entire request list ---
Sending Access-Reject of id 104 to 63.167.48.244:1029
MS-CHAP-Error = "\001E=691 R=1"
Waking up in 4 seconds...
--- Walking the entire request list ---
Cleaning up request 2 ID 104 with timestamp 3d3d8a9c
########################################################################
########
Take that attribute out and authorization works ok.
########################################################################
########
rad_recv: Access-Request packet from host 63.167.48.244:1029, id=108,
length=136
Service-Type = Framed-User
Framed-Protocol = PPP
User-Name = "charlieb"
MS-CHAP-Challenge = 0xc33b4bf96121b7d781721f3eed0fc091
MS-CHAP2-Response =
0x01004e17f7e7f4b464d9ac229cc3bc9705d2000000000000000093eeaba4e043744e7b
f12cc15e3acaa1682713a56f220389
NAS-IP-Address = 10.100.1.1
NAS-Port = 0
modcall: entering group authorize
modcall[authorize]: module "preprocess" returns ok
rlm_realm: Looking up realm NULL for User-Name = "charlieb"
rlm_realm: No such realm NULL
modcall[authorize]: module "suffix" returns noop
radius_xlat: 'charlieb'
sql_set_user: escaped user --> 'charlieb'
radius_xlat: 'SELECT id,UserName,Attribute,Value FROM radcheck WHERE
Username = 'charlieb' ORDER BY id'
rlm_sql: Reserving sql socket id: 1
query: SELECT id,UserName,Attribute,Value FROM radcheck WHERE Username =
'charlieb' ORDER BY id
rlm_postgresql Status: PGRES_TUPLES_OK
sql_postgresql: affected rows =
radius_xlat: 'SELECT
radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgrou
pcheck.Value FROM radgroupcheck,usergroup WHERE usergroup.Username =
'charlieb' AND usergroup.GroupName = radgroupcheck.GroupName ORDER BY
radgroupcheck.id'
query: SELECT
radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgrou
pcheck.Value FROM radgroupcheck,usergroup WHERE usergroup.Username =
'charlieb' AND usergroup.GroupName = radgroupcheck.GroupName ORDER BY
radgroupcheck.id
rlm_postgresql Status: PGRES_TUPLES_OK
sql_postgresql: affected rows =
radius_xlat: 'SELECT id,UserName,Attribute,Value FROM radreply WHERE
Username = 'charlieb' ORDER BY id'
query: SELECT id,UserName,Attribute,Value FROM radreply WHERE Username =
'charlieb' ORDER BY id
rlm_postgresql Status: PGRES_TUPLES_OK
sql_postgresql: affected rows =
radius_xlat: 'SELECT
radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgrou
preply.Value FROM radgroupreply,usergroup WHERE usergroup.Username =
'charlieb' AND usergroup.GroupName = radgroupreply.GroupName ORDER BY
radgroupreply.id'
query: SELECT
radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgrou
preply.Value FROM radgroupreply,usergroup WHERE usergroup.Username =
'charlieb' AND usergroup.GroupName = radgroupreply.GroupName ORDER BY
radgroupreply.id
rlm_postgresql Status: PGRES_TUPLES_OK
sql_postgresql: affected rows =
radius_xlat: 'SELECT Value,Attribute FROM radcheck WHERE UserName =
'charlieb' AND ( Attribute = 'CHAP-Password' or Attribute =
'NT-Password' or Attribute = 'User-Password' OR Attribute =
'Crypt-Password' ) ORDER BY Attribute DESC'
query: SELECT Value,Attribute FROM radcheck WHERE UserName = 'charlieb'
AND ( Attribute = 'CHAP-Password' or Attribute = 'NT-Password' or
Attribute = 'User-Password' OR Attribute = 'Crypt-Password' ) ORDER BY
Attribute DESC
rlm_postgresql Status: PGRES_TUPLES_OK
sql_postgresql: affected rows =
rlm_sql: Released sql socket id: 1
modcall[authorize]: module "sql" returns ok
modcall[authorize]: module "mschap" returns ok
modcall: group authorize returns ok
rad_check_password: Found Auth-Type MS-CHAP
auth: type "MS-CHAP"
modcall: entering group authenticate
modcall[authenticate]: module "mschap" returns ok
modcall: group authenticate returns ok
Sending Access-Accept of id 108 to 63.167.48.244:1029
BWControl-RxRate = 384
BWControl-TxRate = 128
Acct-Authentic = RADIUS
Service-Type = Framed-User
Framed-Protocol = PPP
Framed-IP-Netmask = 255.255.255.255
X-Ascend-Assign-IP-Pool = 1
X-Ascend-Idle-Limit = 900
X-Ascend-Maximum-Channels = 1
MS-CHAP2-Success =
0x01533d3044383336353935374633424631343945373736453534333130364644313341
4543444642453545
MS-MPPE-Recv-Key =
0xc926ff56d7e1826dc18e7aa51c3f6cef8fda76e2b117f5a1917054a4e172d0190c65
MS-MPPE-Send-Key =
0xc925466ddaade509c72f9d3161f32572d7566eb62ab259d2f31e07ccb6bb5bf402a5
MS-MPPE-Encryption-Policy = 0x00000001
MS-MPPE-Encryption-Types = 0x00000006
Finished request 3
Going to the next request
--- Walking the entire request list ---
Waking up in 6 seconds...
--- Walking the entire request list ---
Cleaning up request 3 ID 108 with timestamp 3d3d8b71
Nothing to do. Sleeping until we see a request.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html