|
Posted by Fairul Izham on 10/21/05 04:38
try to check back the ISA Attributes
maybe you have some missing ISA attributes there.
to check the attributes that ISA required please go to
http://www.isaserver.org/tutorials/ISA2004-RADIUS-Authentication-Web-Publishing-Rules-Part1.html
"Tomasz D³uΏniewski" <tdluzniewski@system.strefa.pl> wrote in message
news:dj7vl2$c99$1@pippin.nask.net.pl...
> Hello
>
> I wrote (mostly copy - paste) a script which authenticates users in Open
> Raius .. it looks like below. Everything works fine on Open Radius. But
> ISA
> gets me the following error
> A malformed RADIUS message was received from client portal. The data is
> the
> RADIUS message.
>
> I think the problem is in ISA attributes ?
>
>
> $connected = socket_connect($socket , $ip, $port);
> $user = $user.$this->params->getRadiusSuffix($i);
> $nasIP = explode('.', $ip);
>
> //
> // auth code
>
> $RA=pack("CCCCCCCCCCCCCCCC",
> 1+rand()%255, 1+rand()%255, 1+rand()%255, 1+rand()%255,
> 1+rand()%255, 1+rand()%255, 1+rand()%255, 1+rand()%255,
> 1+rand()%255, 1+rand()%255, 1+rand()%255, 1+rand()%255,
> 1+rand()%255, 1+rand()%255, 1+rand()%255, 1+rand()%255);
>
> $encryptedPassword =
> $this->encryptRadiusPassword(trim($pass),trim($key),$RA);
>
> $length=4+ // header
> 16+ // auth code
> 6+ // service type
> 2+strlen($user)+ // username
> 2+strlen($encryptedPassword)+ // userpassword
> 6+ // nasIP
> 6+ // nasPort
> 6; // nasPortType
>
> $thisidentifier=rand()%256;
>
> $data=pack("CCCCa*CCCCCCCCa*CCa*CCCCCCCCCCCC",
> 1,$thisidentifier,$length/256,$length%256, // header
> $RA, // authcode
> 6,6,0,0,0,1, // service type
> 1,2+strlen($user),$user, // username
> 2,2+strlen($encryptedPassword),$encryptedPassword, // userpassword
> 4,6,$nasIP[0],$nasIP[1],$nasIP[2],$nasIP[3], // nasIP
> 5,6,0,0,0,0, // nasPort
> 61,6,0,0,0,15 // nasPortType = Ethernet);
>
> socket_write($socket,$data,$length)
> socket_recv($socket,$return,512,0);
> if (ord($return) == 2) return true;
> else return false;
>
>
Navigation:
[Reply to this message]
|