<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:"Century Gothic";
panose-1:2 11 5 2 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Markeringsbobletekst Tegn";
margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";
mso-fareast-language:EN-US;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.MarkeringsbobletekstTegn
{mso-style-name:"Markeringsbobletekst Tegn";
mso-style-priority:99;
mso-style-link:Markeringsbobletekst;
font-family:"Tahoma","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:3.0cm 2.0cm 3.0cm 2.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DA" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-GB">IŽam trying to create a php OTP script with challenge reponse.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">echo "Reply-Message += \"Enter SMS\",\n";<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">echo "State += \"$random\",\n";<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">echo "Response-Packet-Type = \"Access-Challenge\",\n";<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">exit(4);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Reply and State gets sent to the client. But I canŽt seem to get challenge response to work.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Has anyone done this time off stuff before and is it even possible?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Found Auth-Type = otp<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"># Executing group from file /etc/raddb/sites-enabled/default<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">+- entering group otp {...}<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">[OTP] expand: %{User-Name} -> test2<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">[OTP] expand: %{User-Password} -> test2<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">[OTP] expand: %{reply:Secret} -> 891a79d80c9f1cd2<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">[OTP] expand: %{reply:Pin} -> 0201<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">[OTP] expand: %{reply:Offset} -> 1<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Exec-Program output: Reply-Message += "Enter SMS", State += "21427", Response-Packet-Type = "Access-Challenge",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Exec-Program-Wait: value-pairs: Reply-Message += "Enter SMS", State += "21427", Response-Packet-Type = "Access-Challenge",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Exec-Program: returned: 4<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">++[OTP] returns handled<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">There was no response configured: rejecting request 15<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Using Post-Auth-Type Reject<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"># Executing group from file /etc/raddb/sites-enabled/default<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">+- entering group REJECT {...}<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">[attr_filter.access_reject] expand: %{User-Name} -> test2<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">attr_filter: Matched entry DEFAULT at line 11<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">++[attr_filter.access_reject] returns updated<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Delaying reject of request 15 for 1 seconds<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Going to the next request<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Waking up in 0.9 seconds.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Sending delayed reject for request 15<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Sending Access-Reject of id 66 to 172.31.2.20 port 42617<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> Reply-Message += "Enter SMS"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> State += 0x3231343237<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">My sites-enabled<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">authorize {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> preprocess<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> chap<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> mschap<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> suffix<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> eap {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> ok = return<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> unix<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> files<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> sql<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> expiration<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> logintime<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> pap<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> update control {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> Auth-Type := otp<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">}<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">authenticate {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> Auth-Type PAP {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> pap<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> Auth-Type CHAP {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> chap<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> Auth-Type MS-CHAP {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> mschap<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> Auth-Type otp {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> OTP<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> pap<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> unix<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> eap<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">}<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">My exec module<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> exec OTP {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> wait = yes<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> program = "/etc/raddb/otp.php %{User-Name} %{User-Password} %{reply:Secret} %{reply:Pin} %{reply:Offset}""<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> input_pairs = request<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> output_pairs = reply<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;color:black;mso-fareast-language:DA">Med venlig hilsen
<b>|</b> Best regards<o:p></o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="color:black;mso-fareast-language:DA">Thomas Raabo<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:black;mso-fareast-language:DA">Senior Network Engineer CCIE #33466</span><span style="font-size:10.0pt;font-family:"Century Gothic","sans-serif";color:black;mso-fareast-language:DA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:4.0pt;color:#1F497D;mso-fareast-language:DA"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:4.0pt;color:#1F497D;mso-fareast-language:DA"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:#1F497D;mso-fareast-language:DA"><img width="185" height="28" id="Billede_x0020_1" src="cid:image001.jpg@01CDA797.E0775670" alt="Beskrivelse: Beskrivelse: cid:image001.jpg@01CB9163.2FCD3AC0"></span><span style="font-size:12.0pt;color:#1D1B11;mso-fareast-language:DA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:#1D1B11;mso-fareast-language:DA">_____________________________________________<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:#0070C0;mso-fareast-language:DA"><a href="mailto:tr@zitcom.dk"><span style="color:blue">tr@zitcom.dk</span></a>
<b>|</b> Direkte: +45 69 10 60 18 <b>|</b> Tlf.: +45 70 23 55 66</span><span style="color:#0070C0;mso-fareast-language:DA"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>