bird123 发表于 2005-1-4 22:17:52

RouterOS配置注意以下两条:/radius add service=hotspot address=x.x.x.x secret=ex/ip hotspot aaa set use-radius=yesXTRadius+MySQL服务器配置:#cat /etc/raddb/usersDEFAULT Auth-Type = External      Exec-Program-Wait = "/usr/local/bin/chap",      Fall-Through = 0#cat /usr/local/bin/chap#!/usr/bin/perl use Digest::MD5 qw(md5);use DBI; my $user=$ENV{'User-Name'}; my $dbh = DBI->connect("dbi:mysql:accounting","root","pppoe");my $sth = $dbh->prepare("select * from users where login = '$user'");$sth->execute;my $ref = $sth->fetchrow_hashref(); my $Plain_Password=$ref->{'passwd'};my $CHAP_Password=$ENV{'CHAP-Password'};my $CHAP_Challenge=$ENV{'CHAP-Challenge'}; # just one function callif (RADIUSCHAPCheck($CHAP_Challenge,$CHAP_Password,$Plain_Password)){exit 0;# print "Success";}else{exit 255;# print "Failed";}# RADIUSCHAPCheck($CHAP_Challenge,$CHAP_Password,$Plain_Password)sub RADIUSCHAPCheck{    my ($CHAP_Challenge,$CHAP_Password,$Plain_Password)=@_;   my @BCHAP_Password=unpack ('A2'x(length($CHAP_Password)/2),$CHAP_Password);my $CHAP_ID=chr(hex($BCHAP_Password));$CHAP_Password='';for($i=1;$i

sblive 发表于 2005-1-4 23:02:09

好东东就顶。

lzbnet 发表于 2005-1-5 01:01:06

顶呀!

ghg123456 发表于 2005-1-6 19:02:46

好久没有看到精品乐

oar 发表于 2005-1-6 19:45:52

兄弟不才,这个功能一般应用在什么地方?

txwwy 发表于 2005-1-8 22:24:34

麻烦提供XTRadius的下载地址!

bird123 发表于 2005-1-9 21:59:13

http://xtradius.sourceforge.net

andrew9916 发表于 2006-5-7 21:00:47

ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd

whq_wq 发表于 2006-5-8 16:56:49

asdf

kelin 发表于 2008-9-24 15:00:59

好久没有看到精品乐

fghi903 发表于 2008-12-1 09:36:43

好贴,顶顶顶

免费杀毒软件下载金山毒霸2009下载金山wps酷我免费杀毒软件下载~!!!~~

ngknet 发表于 2009-3-2 12:29:45

很好,好东西应该要多点人来学习和顶上去。

xiaojianhua 发表于 2009-3-24 11:13:35

这是好东西呀.
收下了.谢谢!!

ada2510 发表于 2009-3-31 20:09:42

好贴,学习中

jayrang 发表于 2009-5-6 16:14:01

好贴,学习中
页: [1]
查看完整版本: <共享> Hotspot+XTRadius+MySQL配置