Reply to Re: php + radius ISA (Microsoft)

Your name:

Reply:


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;
>
>

[Back to original message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация