[Freeswitch-dev] mod_radiusclient
Hi all, Here is a small piece of log from the radius auth module that i wrote. Just by curiosity, i patched mod_sofia to handle incoming registration requests with radius.I used freeradius-client library like the mod_radius_cdr module.Almost all the client configuration is in radiusclient.conf.xml. I hope i am not duplicating someone else's work.I am planning to release it after adding a few more features..If someone has a better idea, some thoughts about a cool feature or anything, i will be happy to hear that.. Cheers /tuyan freeswitch@gitt> 2007-07-20 04:46:32 [DEBUG] sofia_reg.c:430 sofia_reg_handle_register() Requesting Registration from: [tuyan@10.0.0.1] 2007-07-20 04:46:32 [DEBUG] mod_fradiusclient.c:216 radius_accrequest_digest_function() Sending Digest Request 2007-07-20 04:46:32 [DEBUG] sofia_reg.c:465 sofia_reg_handle_register() Register: From: [tuyan@10.0.0.1] Contact: [tuyan <sip:tuyan@10.0.0.2:5060>] Expires: [89] and from freeradius rad_recv: Access-Request packet from host 127.0.0.1 port 33676, id=81, length=200 User-Name = "tuyan" Digest-Response = "dded20ab037e670932e15104cd91ec98" Digest-Attributes = 0x010a31302e302e302e31 Digest-Attributes = 0x022635636636643966652d333661312d313164632d626330652d393764356565303135626466 Digest-Attributes = 0x030a5245474953544552 Digest-Attributes = 0x040e7369703a31302e302e302e31 Digest-Attributes = 0x06054d4435 Digest-Attributes = 0x0a07747579616e Digest-Attributes = 0x050661757468 Digest-Attributes = 0x080962353632663666 Digest-Attributes = 0x090a3030303030303031 NAS-Port = 0 NAS-IP-Address = 127.0.0.1 rlm_digest: Converting Digest-Attributes to something sane... Digest-Realm = "10.0.0.1" Digest-Nonce = "5cf6d9fe-36a1-11dc-bc0e-97d5ee015bdf" Digest-Method = "REGISTER" Digest-URI = "sip:10.0.0.1" Digest-Algorithm = "MD5" Digest-User-Name = "tuyan" Digest-QOP = "auth" Digest-CNonce = "b562f6f" Digest-Nonce-Count = "00000001" A1 = tuyan:10.0.0.1:tuyan A2 = REGISTER:sip:10.0.0.1 H(A1) = 7eeee22e4515abd8631075ce5f548eb9 H(A2) = bde0744e720053a66f505221cfc7202f KD = 7eeee22e4515abd8631075ce5f548eb9:5cf6d9fe-36a1-11dc-bc0e-97d5ee015bdf:00000001:b562f6f:auth:bde0744e720053a66f505221cfc7202f EXPECTED dded20ab037e670932e15104cd91ec98 RECEIVED dded20ab037e670932e15104cd91ec98 ++[digest] returns ok Sending Access-Accept of id 81 to 127.0.0.1 port 33676 And the configuration file <configuration name="radiusclient.conf" description="Radius Client Configuration"> <settings> <param name="auth_order" value="radius"/> <param name="login_tries" value="3"/> <param name="dictionary" value="/opt/radiusclient/etc/dictionary.tuyan"/> <param name="seqfile" value="/var/run/radius.seq"/> <param name="authserver" value="127.0.0.1:1812:testing123"/> <param name="acctserver" value="localhost:1813:testing1234"/> <!--<param name="servers" value="/opt/radiusclient/etc/radiusclient/servers"/>--> <!--<param name="default_realm" value=""/>--> <param name="radius_timeout" value="2"/> <param name="radius_retries" value="3"/> <param name="bindaddr" value="127.0.0.1"/> </settings> </configuration>
I'm the guy who wrote the mod_radius_cdr module, as well as the maintainer of freeradius-client. Glad to see that is useful! :) Definitely want to assist on this, as radius auth module was the next thing I'd been planning to work on. If you want to collaborate on this, I'm willing to assist any way I can. So far, it looks good to me, and I'm looking forward to your code. -Chris On Jul 20, 2007, at 4:20 AM, Tuyan Özipek wrote:
Hi all,
Here is a small piece of log from the radius auth module that i wrote. Just by curiosity, i patched mod_sofia to handle incoming registration requests with radius.I used freeradius-client library like the mod_radius_cdr module.Almost all the client configuration is in radiusclient.conf.xml.
I hope i am not duplicating someone else's work.I am planning to release it after adding a few more features..If someone has a better idea, some thoughts about a cool feature or anything, i will be happy to hear that..
Cheers /tuyan
-- \\\|||/// \ Chris Parker - Segmentation Fault ( core dumped ) \ ~ ~ / \ | @ @ | \ http://www.segv.org | cparker@segv.org oOo (_) oOo \ ------------------------------------------------------------------------ # OS's are nothing more than device drivers! #
participants (2)
-
Chris Parker
-
Tuyan Özipek