Freeradius and Voip

miha- miha_zoubek at hotmail.com
Wed Dec 1 09:53:13 CET 2010


Hello,

I am first time setting freeradius. I am setting it for voip accounting. I
need a little help form you guys :)
I read that I need to enable sql in radiusd.conf. I have also run a script
for creating a tables. I changed sql.conf to voip-postpaid.conf ( I changed
login, pass, and server in conf file).
 
Is this the right scipt for crating tables : 
http://wiki.freeradius.org/MySQL_DDL_script
http://wiki.freeradius.org/MySQL_DDL_script 

I am getting this error beacuse I do not know where must I put users and
etc.

sql: group_membership_query = "SELECT GroupName FROM usergroup WHERE
UserName='%{SQL-User-Name}'"
 sql: connect_failure_retry_delay = 60
 sql: simul_count_query = ""
 sql: simul_verify_query = "SELECT RadAcctId, AcctSessionId, UserName,
NASIPAddress, NASPortId, FramedIPAddress, CallingStationId, FramedProtocol
FROM radacct WHERE UserName='%{SQL-User-Name}' AND AcctStopTime = 0"
 sql: postauth_query = "INSERT into radpostauth (id, user, pass, reply,
date) values ('', '%{User-Name}', '%{User-Password:-Chap-Password}',
'%{reply:Packet-Type}', NOW())"
 sql: safe-characters =
"@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_: /"
rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked
rlm_sql (sql): Attempting to connect to root at localhost:/radius
rlm_sql (sql): starting 0
rlm_sql (sql): Attempting to connect rlm_sql_mysql #0
rlm_sql_mysql: Starting connect to MySQL server for #0
rlm_sql (sql): Connected new DB handle, #0
rlm_sql (sql): starting 1
rlm_sql (sql): Attempting to connect rlm_sql_mysql #1
rlm_sql_mysql: Starting connect to MySQL server for #1
rlm_sql (sql): Connected new DB handle, #1
rlm_sql (sql): starting 2
rlm_sql (sql): Attempting to connect rlm_sql_mysql #2
rlm_sql_mysql: Starting connect to MySQL server for #2
rlm_sql (sql): Connected new DB handle, #2
rlm_sql (sql): starting 3
rlm_sql (sql): Attempting to connect rlm_sql_mysql #3
rlm_sql_mysql: Starting connect to MySQL server for #3
rlm_sql (sql): Connected new DB handle, #3
rlm_sql (sql): starting 4
rlm_sql (sql): Attempting to connect rlm_sql_mysql #4
rlm_sql_mysql: Starting connect to MySQL server for #4
rlm_sql (sql): Connected new DB handle, #4
Module: Instantiated sql (sql) 
Module: Loaded Acct-Unique-Session-Id 
 acct_unique: key = "User-Name, Acct-Session-Id, NAS-IP-Address,
Client-IP-Address, NAS-Port"
Module: Instantiated acct_unique (acct_unique) 
Module: Loaded detail 
 detail: detailfile =
"/var/log/radius/radacct/%{Client-IP-Address}/detail-%Y%m%d"
 detail: detailperm = 384
 detail: dirperm = 493
 detail: locking = no
Module: Instantiated detail (detail) 
Module: Loaded System 
 unix: cache = no
 unix: passwd = "/etc/passwd"
 unix: shadow = "(null)"
 unix: group = "/etc/group"
 unix: radwtmp = "/var/log/radius/radwtmp"
 unix: usegroup = no
 unix: cache_reload = 600
Module: Instantiated unix (unix) 
Module: Loaded radutmp 
 radutmp: filename = "/var/log/radius/radutmp"
 radutmp: username = "%{User-Name}"
 radutmp: case_sensitive = yes
 radutmp: check_with_nas = yes
 radutmp: perm = 384
 radutmp: callerid = yes
Module: Instantiated radutmp (radutmp) 
Listening on authentication *:1812
Listening on accounting *:1813
Ready to process requests.
rad_recv: Access-Request packet from host 212.13.228.58:47469, id=2,
length=206
        Acct-Multi-Session-Id = "1291187632294"
        Cisco-Attr-130 =
0x683332332d63616c6c696e672d656e74657270726973652d69643d656e74504258
        Calling-Station-Id = "81609000"
        NAS-Identifier = "intraswitch"
        NAS-IP-Address = 212.13.228.58
        3GPP2-Prepaid-acct-Capability = 0x010600000002
        3GPP2-Session-Termination-Capability = 1
        h323-conf-id = "h323-conf-id=1291187632294"
        Vendor-Specific = 0x00000009
        Event-Timestamp = "Dec  1 2010 08:13:52 CET"
        User-Name = "081609000"
        User-Password = "1234"
  Processing the authorize section of radiusd.conf
modcall: entering group authorize for request 0
  modcall[authorize]: module "preprocess" returns ok for request 0
  modcall[authorize]: module "chap" returns noop for request 0
  modcall[authorize]: module "digest" returns noop for request 0
    rlm_realm: No '@' in User-Name = "081609000", looking up realm NULL
    rlm_realm: No such realm "NULL"
  modcall[authorize]: module "suffix" returns noop for request 0
  rlm_eap: No EAP-Message, not doing EAP
  modcall[authorize]: module "eap" returns noop for request 0
    users: Matched entry 081609000 at line 92
  modcall[authorize]: module "files" returns ok for request 0
radius_xlat:  '081609000'
rlm_sql (sql): sql_set_user escaped user --> '081609000'
radius_xlat:  'SELECT id, UserName, Attribute, Value, op           FROM
radcheck           WHERE Username = '081609000'           ORDER BY id'
rlm_sql (sql): Reserving sql socket id: 4
rlm_sql: Failed to create the pair: Unknown attribute "1234"
rlm_sql (sql): Error getting data from database
rlm_sql (sql): SQL query error; rejecting user
rlm_sql (sql): Released sql socket id: 4
  modcall[authorize]: module "sql" returns fail for request 0
modcall: leaving group authorize (returns fail) for request 0
Finished request 0
Going to the next request
--- Walking the entire request list ---
Waking up in 6 seconds...
rad_recv: Access-Request packet from host 212.13.228.58:47469, id=2,
length=206
Discarding duplicate request from client intraswitch:47469 - ID: 2
--- Walking the entire request list ---
Waking up in 5 seconds...
rad_recv: Access-Request packet from host 212.13.228.58:47469, id=2,
length=206
Discarding duplicate request from client intraswitch:47469 - ID: 2
--- Walking the entire request list ---
Waking up in 4 seconds...
rad_recv: Access-Request packet from host 212.13.228.58:47469, id=2,
length=206
Discarding duplicate request from client intraswitch:47469 - ID: 2
--- Walking the entire request list ---
Waking up in 3 seconds...
rad_recv: Access-Request packet from host 212.13.228.58:47469, id=2,
length=206
Discarding duplicate request from client intraswitch:47469 - ID: 2
--- Walking the entire request list ---
Waking up in 2 seconds...
rad_recv: Access-Request packet from host 212.13.228.58:47469, id=2,
length=206
Discarding duplicate request from client intraswitch:47469 - ID: 2
--- Walking the entire request list ---
Waking up in 1 seconds...
--- Walking the entire request list ---
Cleaning up request 0 ID 2 with timestamp 4cf5f5ac
Nothing to do.  Sleeping until we see a request.



Thank you for your help!!!

I will remember this :)
-- 
View this message in context: http://freeradius.1045715.n5.nabble.com/Freeradius-and-Voip-tp3287359p3287359.html
Sent from the FreeRadius - User mailing list archive at Nabble.com.



More information about the Freeradius-Users mailing list