Community discussions

MikroTik App
 
alf3299
just joined
Topic Author
Posts: 11
Joined: Wed Oct 02, 2013 2:46 pm

exteral login page no errors are displayed

Sat Sep 13, 2014 2:30 am

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
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: exteral login page no errors are displayed

Sat Sep 13, 2014 3:22 pm

Here is the wiki I wrote on external login pages.
http://wiki.mikrotik.com/wiki/HotSpot_e ... 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.
 
alf3299
just joined
Topic Author
Posts: 11
Joined: Wed Oct 02, 2013 2:46 pm

Re: exteral login page no errors are displayed

Sat Sep 13, 2014 4:21 pm

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
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: exteral login page no errors are displayed

Sat Sep 13, 2014 4:41 pm

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>
 
alf3299
just joined
Topic Author
Posts: 11
Joined: Wed Oct 02, 2013 2:46 pm

Re: exteral login page no errors are displayed

Sat Sep 13, 2014 6:01 pm

Hi,

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

thanks

regards
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: exteral login page no errors are displayed

Sat Sep 13, 2014 6:05 pm

What version of RouterOS are you using?
 
alf3299
just joined
Topic Author
Posts: 11
Joined: Wed Oct 02, 2013 2:46 pm

Re: exteral login page no errors are displayed

Sat Sep 13, 2014 6:20 pm

5.26
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: exteral login page no errors are displayed

Sat Sep 13, 2014 6:28 pm

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
 
alf3299
just joined
Topic Author
Posts: 11
Joined: Wed Oct 02, 2013 2:46 pm

Re: exteral login page no errors are displayed

Sat Sep 13, 2014 6:36 pm

Hi,

ok i will upgrade and see how it goes .

thanks very much.

regards
 
alf3299
just joined
Topic Author
Posts: 11
Joined: Wed Oct 02, 2013 2:46 pm

Re: exteral login page no errors are displayed

Sat Sep 13, 2014 6:41 pm

i have webproxy enabled do u think that can be the problem ?
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: exteral login page no errors are displayed

Sat Sep 13, 2014 6:54 pm

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.
 
alf3299
just joined
Topic Author
Posts: 11
Joined: Wed Oct 02, 2013 2:46 pm

Re: exteral login page no errors are displayed

Sat Sep 13, 2014 7:06 pm

ok tks i will upgrade and see how it goes ..
 
Focus
just joined
Posts: 6
Joined: Fri Oct 17, 2014 12:34 am

Re: exteral login page no errors are displayed

Fri Oct 17, 2014 12:42 am

Hi guys,

Is realy necessary to have a RADIUS server to the external hotspot work?
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: exteral login page no errors are displayed

Fri Oct 17, 2014 4:05 pm

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.
 
Focus
just joined
Posts: 6
Joined: Fri Oct 17, 2014 12:34 am

Re: exteral login page no errors are displayed

Fri Oct 17, 2014 8:41 pm

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_e ... login_page " to create a web loging page but isn't working, any thought?

Who is online

Users browsing this forum: parm and 12 guests