Community discussions

MikroTik App
 
moutzl
just joined
Topic Author
Posts: 11
Joined: Fri Jul 20, 2012 12:06 pm

ipass / gis /xml

Fri Oct 18, 2013 8:41 pm

Hello Im trying to implement IPASS gis into the mikrotik, but I cannot find a way how to properelly setup login.html, or whole hotspot.
easy way - just upload valid certificate and turn on the HTTPS hotspot is working fine. But for many reasons ( better statistic,speed limitation by location...etc)
I dont wanna run this scenario and just wanna use our own solution, which we are using with other gateways(nomadix etc.),also I dont wanna run HTTPS hotspot.
So I tried to upload modified login.html with wispr code
<html>
<head>
<!--
 <?xml version="1.0" encoding="UTF-8" ?>
<WISPAccessGatewayParam>
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://www.acmewisp.com/WISPAccessGatewayParam.xsd">
    <Redirect>
        <AccessProcedure>1.0</AccessProcedure>
        <AccessLocation>19</AccessLocation>
        <LocationName>somewhere</LocationName>
        <LoginURL>https://somepage.com/web/gis.php?n=$(identity)&m=$(mac)</LoginURL>
        <MessageType>100</MessageType>
        <ResponseCode>0</ResponseCode>
    </Redirect>
</WISPAccessGatewayParam>
-->
<meta http-equiv="refresh" content="1;url=http://somepage.com/web/login.php?MA=$(mac)&IP=$(ip)&OS=$(link-orig-esc)&T=M&UI=11.22.33.44&PORT=$(interface-name)" />
<title>...</title>
</head>
<body>
<center>If you are not redirected in a few seconds, click 'continue' below<br>
<form name="redirect" action="http://somepage.com/web/login.php" method="get">
<input type="hidden" name="MA" value="$(mac)">
<input type="hidden" name="IP" value="$(ip)">
<input type="hidden" name="OS" value="$(link-orig)">
<input type="hidden" name="T" value="M">
<input type="hidden" name="UI" value="11.22.33.44">
<input type="hidden" name="PORT" value="$(interface-name)">
<input type="submit" value="continue">
</form>
<script language="JavaScript">
<!--
   document.redirect.submit();
//-->
</script></center>
</body>
</html>
problem is, that mikrotik never send this code to the ipass client.
I was sniffing the traffic with wireshark and for every attempt done by Ipass client from windows, or android, the mikrotik is sending hiw own xml/wispr page, not the login.html.

so, any idea how to force mikrotik to send my url
https://somepage.com/web/gis.php?n=$(identity)&m=$(mac)
to the ipass client?
Is this possible by changing login.html only, or I should edit files in /hotspot/xml/* also?
 
moutzl
just joined
Topic Author
Posts: 11
Joined: Fri Jul 20, 2012 12:06 pm

Re: ipass / gis /xml

Fri Nov 01, 2013 1:59 pm

Hello Im trying to implement IPASS gis into the mikrotik, but I cannot find a way how to properelly setup login.html, or whole hotspot.
easy way - just upload valid certificate and turn on the HTTPS hotspot is working fine. But for many reasons ( better statistic,speed limitation by location...etc)
I dont wanna run this scenario and just wanna use our own solution, which we are using with other gateways(nomadix etc.),also I dont wanna run HTTPS hotspot.
So I tried to upload modified login.html with wispr code
<html>
<head>
<!--
 <?xml version="1.0" encoding="UTF-8" ?>
<WISPAccessGatewayParam>
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://www.acmewisp.com/WISPAccessGatewayParam.xsd">
    <Redirect>
        <AccessProcedure>1.0</AccessProcedure>
        <AccessLocation>19</AccessLocation>
        <LocationName>somewhere</LocationName>
        <LoginURL>https://somepage.com/web/gis.php?n=$(identity)&m=$(mac)</LoginURL>
        <MessageType>100</MessageType>
        <ResponseCode>0</ResponseCode>
    </Redirect>
</WISPAccessGatewayParam>
-->
<meta http-equiv="refresh" content="1;url=http://somepage.com/web/login.php?MA=$(mac)&IP=$(ip)&OS=$(link-orig-esc)&T=M&UI=11.22.33.44&PORT=$(interface-name)" />
<title>...</title>
</head>
<body>
<center>If you are not redirected in a few seconds, click 'continue' below<br>
<form name="redirect" action="http://somepage.com/web/login.php" method="get">
<input type="hidden" name="MA" value="$(mac)">
<input type="hidden" name="IP" value="$(ip)">
<input type="hidden" name="OS" value="$(link-orig)">
<input type="hidden" name="T" value="M">
<input type="hidden" name="UI" value="11.22.33.44">
<input type="hidden" name="PORT" value="$(interface-name)">
<input type="submit" value="continue">
</form>
<script language="JavaScript">
<!--
   document.redirect.submit();
//-->
</script></center>
</body>
</html>
problem is, that mikrotik never send this code to the ipass client.
I was sniffing the traffic with wireshark and for every attempt done by Ipass client from windows, or android, the mikrotik is sending hiw own xml/wispr page, not the login.html.

so, any idea how to force mikrotik to send my url
https://somepage.com/web/gis.php?n=$(identity)&m=$(mac)
to the ipass client?
Is this possible by changing login.html only, or I should edit files in /hotspot/xml/* also?





ok, so I answer to me, and all of you who will read this and looking for solution. Just copy login.html to rlogin.html and its done. :D facepalm.

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot], GoogleOther [Bot], techcomtecnico and 129 guests