240

AT-WR4500 Series - IEEE 802.11abgh Outdoor Wireless Routers

 

RouterOS v3 Configuration and User Guide

 

 

￿

If you want to use HTTP-CHAP authentication method it is supposed that you include the doLogin() function (which references to the md5.js which must be already loaded) before the Submit action of the login form. Otherwise, CHAP login will fail.

The resulting password to be sent to the HotSpot gateway in case of HTTP-CHAP method, is formed MD5-hashing the concatenation of the following: chap-id, the password of the user and chap-challenge (in the given order)

In case if variables are to be used in link directly, then they must be escaped accordingly. For example, in login page, <a href="https://login.example.com/login?mac=$(mac)&user=$(username)">link</a> will not work as intended, if username will be "123&456=1 2". In this case instead of $(user), its escaped version must be used: $(user-esc): <a href="https://login.server.serv/login?mac=$(mac-esc)&user=$(user- esc)">link</a>. Now the same username will be converted to "123%26456%3D1+2", which is the valid representation of "123&456=1 2" in URL. This trick may be used with any variables, not only with $(username).

There is a boolean parameter "erase-cookie" to the logout page, which may be either "on" or "true" to delete user cookie on logout (so that the user would not be automatically logged on when he/she opens a browser next time.

Example

With basic HTML language knowledge and the examples below it should be easy to implement the ideas described above.

To provide predefined value as username, in login.html change:

<type="text" value="$(username)>

to this line:

<input type="hidden" name="user" value="hsuser">

(where hsuser is the username you are providing)

To provide predefined value as password, in login.html change:

<input type="password">

to this line:

<input type="hidden" name="password" value="hspass">

(where hspass is the password you are providing)

To send client's MAC address to a registration server in form of:

https://www.server.serv/register.html?mac=XX:XX:XX:XX:XX:XX

change the Login button link in login.html to:

https://www.example.com/register.html?mac=$(mac)

(you should correct the link to point to your server)

To show a banner after user login, in alogin.html after

$(if popup == 'true')

add the following line:

open('http://your.web.server/your-banner-page.html', 'my-banner-name','');

(you should correct the link to point to the page you want to show)

To choose different page shown after login, in login.html change:

<input type="hidden" name="dst" value="$(link-orig)">

to this line:

<input type="hidden" name="dst" value="http://www.example.com">

Page 240
Image 240
Allied Telesis AT-WR4500 manual To this line, Add the following line