Redirect Hotspot Login Page

We use RouterOS Hotspot service with an externally located Radius server. Right now users have to login through the hotspot login page to access the internet, and if they haven’t paid for service, then they have to go to our radius server website to login (with the same hotspot credentials) and purchase credits. (By the way we are using DMA Softlab’s RadiusManager).
We would like to change this so there are less steps and just one login for both interfaces. Is that possible?

Has anyone out there did some programming to make this work or is it simple and I’m just missing something?

Are you asking if you can host the Hotspot login page on an external server? If so, sure, it’s fairly simple.

The 3.0 manual contains a detailed write up of resources that are used for the login screen display/login process, but here’s a short run down that assumes there are no other files in the Hotspot directory as differently named files may be loaded first if they exist (refer to the documentation for details).

Make a login.html that redirects to your external page:

And both redirect.html and logout.html contain the same HTML, they just loop back to login.html:

Make a alogin.html that redirects to the “You are now connected” page displayed after a successful login:

The external login page should redirect back to “/login?username=username&password=password” on the Hotspot router. You’ll also have to permit the external page in the walled garden so unauthorized users can get there.

Hope that helps and that I’m not misunderstanding the question.

Yes, that is what I was looking for, but will it work if the external login page doesn’t use the code the original login page uses in the login form and javascript:

Here is the hotspot login code:

$(if chap-id)

$(endif)

and the form:

login
password
 

If the above code needs to be in the external login page, I suppose I could add it, but my external login page already uses it’s own code to authenticate users. Can they be merged so it logs in the user in both locations or is that not feasible. Basically we want just one login page for both the radius server and hotspot login so it authenticates the user on the router so they could use the Internet (if they have credits), and view the status of their account on the radius server - one login for two places.

The code for the external login page is:

{UCPLOGIN0}

{UCPLOGIN4}

{ERROR}

{UCPLOGIN6}:
{LANGLIST}
{UCPLOGIN1}:
{UCPLOGIN2}:
 
{REGISTER}
_

Thanks for any help.

a) none of the variables for the router hosted page will be available since the router won’t be interpolating them, things like $(link-login-only) etc. will have to be passed on to the external page in the redirect and then re-interpreted by a dynamic scripting language on the server
b) you can’t log into two things at once. To log into the router Hotspot you must redirect the customer back to /login?username=username&password=password on the router, which takes the user away from the external server. You can have the user log into the server, and then have the server check if the user has uptime. If not, the server displays a page that lets the user purchase uptime and redirects the user back to the router for login on successful transaction. If the user already has uptime, just redirect back to the router login.

Hi we also using hotpot system for our clients…, we are using a customer radius server a product of Wifi4india it uses radius server and a web based user management were all database and their accounting related data stores like traffic and bills.

in our case now peoples signup for the service and after paying the charges their account will be activated they will be login to hotspot login page and asking them to login please in order to use internet.

in that web management we can define n number of NAS and porxy, plans, group, attributes, user and their password etc…

They provide service based on subscription or one time ownership based we are on subscription based yearly subscription no monthly fixed charges no revenue sharing policy.

Its very simple and user friendly with online help for configuring the components and modules.

I know this is an old thread but fewi can you show the code what should be on the external login page - index.html (which If I’ve understood should be on the server).

Thank you

Update:

Ok here is the link you need to get this to work using php

http://wiki.mikrotik.com/wiki/HotSpot_external_login_page