exteral login page no errors are displayed

I am using a redirect link to an external login.php on my Mikrotik hotspot. The radius server error messages( ex: maximun session reach for this username) does not get trasfer to the exteral login page.

Can someone help to resolve this problem ?

Thanks

Here is the wiki I wrote on external login pages.
http://wiki.mikrotik.com/wiki/HotSpot_external_login_page

Insure when the new login.html page in the router forwards the data to the external server, it sends this value

<input type="hidden" name="error" value="$(error)">

and you use it on the new login page.

Hi, tks for your reply and to have made the tutorial .

I copied and past the code to remote server and the file errors.txt but it does not seem to work . when the users logs in and it has an error he is just redirected to login page but no errors are displayed .

any more ideas ?

thanks very much

regards

Then you need to do a bit of troubleshooting. Use this as the login.html page in your router. Check all entries to insure it is passing the values to the new page, especially the error value. My apology in advance if I introduced any errors into this page during the edit.

<html>
<head><title>...</title></head>
<body>
$(if chap-id)
<noscript>
<center><b>JavaScript required. Enable JavaScript to continue.</b></center>
</noscript>
$(endif)
<center>If you are not redirected in a few seconds, click 'continue' below<br>
<form name="redirect" action="http://xx.xx.xx.xx/logintest.php" method="post">
mac: <input type="text" name="mac" value="$(mac)"><br>
ip: <input type="text" name="ip" value="$(ip)"><br>
username: <input type="text" name="username" value="$(username)"><br>
link-login: <input type="text" name="link-login" value="$(link-login)"><br>
link-orig: <input type="text" name="link-orig" value="$(link-orig)"><br>
error: <input type="text" name="error" value="$(error)"><br>
chap-id: <input type="text" name="chap-id" value="$(chap-id)"><br>
chap-challenge: <input type="text" name="chap-challenge" value="$(chap-challenge)"><br>
link-login-only: <input type="text" name="link-login-only" value="$(link-login-only)"><br>
link-orig-esc: <input type="text" name="link-orig-esc" value="$(link-orig-esc)"><br>
mac-esc: <input type="text" name="mac-esc" value="$(mac-esc)"><br>
<input type="submit" value="continue">
</form>
</center>
</body>
</html>

Hi,

again tks. I did that it does not pass errors and username .

thanks

regards

What version of RouterOS are you using?

5.26

I can’t help you there. All my routers are v6.x. I have no router to test that.

The only suggestion I can offer is upgrade to the latest version. If you still have that problem, maybe the Mikrotik crew can help you. They have been really helpful with my problems.

I presume you have the radius debug logging enabled. If not, that is helpful in debugging RADIUS responses.

/system logging
add topics=radius,debug action=memory

Hi,

ok i will upgrade and see how it goes .

thanks very much.

regards

i have webproxy enabled do u think that can be the problem ?

No. The web proxy works on port 80. The radius servers work on ports 1812 and 1813.

ok tks i will upgrade and see how it goes ..

Hi guys,

Is realy necessary to have a RADIUS server to the external hotspot work?

If you mean an external hotspot login page, no. It will check the local router database first (/ip hotspot user), then a RADIUS server if you have one set up.

I’m tring to use this manual " http://wiki.mikrotik.com/wiki/HotSpot_external_login_page " to create a web loging page but isn’t working, any thought?