Presentation is loading. Please wait.

Presentation is loading. Please wait.

Presented by Liang-Chang Yu

Similar presentations


Presentation on theme: "Presented by Liang-Chang Yu"— Presentation transcript:

1 Presented by Liang-Chang Yu
Scenario 4 - testing of ser and b2bua and freeradius with Mysql-enabled Presented by Liang-Chang Yu

2 5-4-1 The figure of scenario4 - call from laksman@voip to 8899@voip
MySQL Server

3 5-4-1 The testing of scenario 4 - call from laksman@voip to 8899@voip

4 5-4-3 The log information displayed on b2bua – call from laksman@voip to 8899@voip
[ ] WARN B2bUa: AAATransceiver.cxx:196 Problem with Radius message ,reason:VRadiusException: No attributes of type 27 found in Attribute list

5 5-4-4 The log information displayed on radius – call from laksman@voip to 8899@voip
Module: Loaded SQL Module: Instantiated sql (sql) Module: Loaded Acct-Unique-Session-Id Module: Instantiated acct_unique (acct_unique) rad_recv: Access-Request packet from host :1024, id=0, length=74 User-Name = "laksman" User-Password = "." NAS-IP-Address = NAS-Port = 1000 Called-Station-Id = "8899" Calling-Station-Id = "laksman“ Login OK: [laksman/.] (from client localhost port 1000 cli laksman) Sending Access-Accept of id 0 to :1024

6 5-4-5 The Config of ser.cfg of senario4
# if the request URI is numerical, forward the request to B2BUA server... if { forward (voip.lges.chc.edu.tw, 5065); };

7 5-4-6 The Config of b2bConfig.xml of senario4
<B2BUA_Configuration> <SIP> <Local> <Port>5065</Port> <Transport>UDP</Transport> </Local> <Proxy_Server> <Address> </Address> <Port>5069</Port> </Proxy_Server> <Registration> <Register>no</Register> <Port>5060</Port> <Expires>600</Expires> </Registration> </SIP> <RADIUS> <Authentication_Port>1812</Authentication_Port> <Accounting_Port>1813</Accounting_Port> <Billing_Server> <Password>testing123</Password> </Billing_Server> </RADIUS> <PrePaid> <Billing> <Option>mandatory</Option> <Refresh_Time>60</Refresh_Time> <Extract_User_Id_From>Proxy-Authorization</Extract_User_Id_From> <User_Id_Decode_Scheme>Basic</User_Id_Decode_Scheme> </Billing> <Use_SIP_INFO>no</Use_SIP_INFO> <Use_HTTP>no</Use_HTTP> </PrePaid> <Redundancy /> </B2BUA_Configuration>

8 5-4-7 The Config of radiusd.conf of freeradius of senario4
In authorize and accounting section, umcomment # of sql line. Like this: authorize { # auth_log # attr_filter chap mschap # digest # IPASS suffix # ntdomain eap # Read the 'users' file files # # Look in an SQL database. The schema of the database # is meant to mirror the "users" file. # See "Authorization Queries" in sql.conf sql # etc_smbpasswd # ldap # daily # checkval } . accounting { unix radutmp # sradutmp # main_pool # Log traffic to an SQL database. # See "Accounting queries" in sql.conf # Cisco VoIP specific bulk accounting # pgsql-voip

9 5-4-8 The Config of clients.conf of freeradius of senario4
In clients.conf, add these lines like below: client { secret = testing123 shortname = localhost password = testing123 } client voip.lges.chc.edu.tw {

10 5-4-9 The Config of sql.conf of freeradius of senario4
In sql.conf, put the right rootpassword sql { # Database type # Current supported are: rlm_sql_mysql, rlm_sql_postgresql, # rlm_sql_iodbc, rlm_sql_oracle, rlm_sql_unixodbc, rlm_sql_freetds driver = "rlm_sql_mysql" # Connect info server = "localhost" login = "root" password = "rootpassword" # Database table configuration radius_db = "radius" # If you want both stop and start records logged to the # same SQL table, leave this as is. If you want them in # different tables, put the start table in acct_table1 # and stop table in acct_table2 acct_table1 = "radacct" acct_table2 = "radacct" # Allow for storing data after authentication postauth_table = "radpostauth" authcheck_table = "radcheck" authreply_table = "radreply" groupcheck_table = "radgroupcheck" groupreply_table = "radgroupreply" usergroup_table = "usergroup" # Remove stale session if checkrad does not see a double login deletestalesessions = yes # Print all SQL statements when in debug mode (-x) sqltrace = yes sqltracefile = ${logdir}/sqltrace.sql }

11 5-4-10 The value of each table of radius in MySQL of senario4 #1
#cd /usr/ports/distfiles/freeradius-1.0.0/src/modules/rlm_sql/drivers/rlm_sql_mysql # mysql –uroot –prootpasswd radius < db_mysql.sql Then, In radcheck table, add like this: In radreply table, add like this:

12 5-4-10 The value of each table of radius in MySQL of senario4 #2
In radgroupcheck table, add like this: In radgroupreply table, add like this: In usergroup table, add like this:


Download ppt "Presented by Liang-Chang Yu"

Similar presentations


Ads by Google