How to redirect hotspot login page to new external server

  • We have a mikrotik router acting as hotspot gateway.
  • Radius Manager 3.0 is used as authentication server.

what We are trying to do is :

  • Mikrotik will only used as gateway.
  • All the request will be redireted to external server(web server).
  • Hotspot user will login from the login page hosted in external server.

Is it possible ? How ?

We have designed a login page with php and all .

Thanx in advance.

Hi shivathapa,
You can customized Mikrotik HotSpot login page. After setup Hotspot Server, go to /file and in there you’ll see a folder with name Hotspot that contains some files. copy the folder to your system and edit.
For more info http://wiki.mikrotik.com/wiki/Manual:Customizing_Hotspot

I have tried and is not working.

I need it very badly.

Pls help me out .


Regards,
Shiva

What did you do? While edit login page, there is certain code that shouldn’t change. Here is an example http://wiki.mikrotik.com/wiki/Use_HOTSPOT_for_advertisement_purpose

Thanx for the reply.

Current scenario :

  • I’m currently using the default hotspot Directory page ie login.html and other under files.
    along with Radius Server 3.9.

What I’m trying to do is :

  • Design a page login.php and hosted in external server(web server) not in mikrotik.
  • Just need to redirect to login.php to some domain(www.wifi.com) or something else.

Will it work ? Does it make any difference while authenticating with radius server ? How can I make it work ?

I have read in teh forum , it is possible but It didn’t

If it does, How ?

Pls help.


Regards,
Shiva

Did you try http://wiki.mikrotik.com/wiki/HotSpot_Redirect_To_External_Login_Page and http://forum.mikrotik.com/t/redirect-hotspot-login-page/34474/1 ?

HotSpot Redirect To External Login Page
From MikroTik Wiki
Jump to: navigation, search
When login page is hosted on the another server, and HotSpot users should be redirected to external login page.

Create rlogin.html page, which redirects to external server login page.
Make the copy of the rlogin.html page to the following pages,
rlogin.html(How to and what should be included)
falogin.html (How to and what should be included)
fstatus.html (How to and what should be included)
flogout.html (How to and what should be included)
fadvert.html (How to and what should be included)

HTML knowledge is required to make correct rlogin.html and other pages, but it is not covered in the topic.

Now its working from login.php hosted in external server.

  • but need to following the steps as following (I have name called ttdcwifi:

  • have to manually type ttdc.wifi/login (redirects to ttdcwifi.mos.com.np/login.php(this is hosted in one of our server).

  • have to manually logout. What happens logout successfull but returns http error 404.

  • Status page is not showing as we used to have earlier after sucessful login.

What I have done is , I have login.php along with others files that we have in default mikrotik hotspot folder (error.html,logout.html,status.html,alogin.html,redirect.html to external server.

Is there nything to left so that i can have the same as we used to have while in router.

Thanx in advance and waiting the reply.

Thanx ,

Have you put the external server ip to the wall-garden.

yes Already.

Now I just want the status and logout page to be displayed.

  • status page just after sucessful login.
  • logout for customer logout purpose.

The status page is depend have you user blocked the pop on page or not.
and regarding the logout page, it actually inside the pop out page when user successfully login.

Allowed all the popups.

Actually I dont understand , Shoud I have to place the status and logout page in the router or
It has to be with the login.php hosted in external server ?..

Only the login.html page is redirected to the external server. The status.html and other pages stay in the router.

If you did not find the wiki article on external login pages, this might help.
http://wiki.mikrotik.com/wiki/HotSpot_external_login_page

I did the same already and it worked.

Thanx to all and hope for the same in the future.

Hi siva

I also wanted to do that extact thing, I want to know that where to edit where i can give the my external server IP?

If you see the hotspot Directory lot of file are there which are the file has to be edited?

Hi all,

I am going to deploy an External Web Server and Radius Server. I want to clearly know about below sthings:

  1. Is variables defined and put somewhere in Mikrotik Gateway ?? And can we know where? Can we edit them ?
  2. If we are using External web server, so user will be redirected to External Web Server, after that External Web Server will handle these variables, e.g username and password. So how External Web Server contact with Radius Server for authentication? If these password and username wrong, so how External Web Server return result to Mikrotik gateway ??


    Thank for your help and advices

Please can anyone tell me how this can be useful? Rather, I am thinking about integrating Mikrotik for billing automation. If anyone have links to useful resources please kindly provide it.

Thanks in advance

Hi web specialists,

  • i have external web server problem for hosting multiple hotspot router login page.. more network guy than /php /css /html builder… :slight_smile:

Whats working:

  • DMA radiusmanager + Mikrotik hotspot (registering + paypal payments + login successfully).
  • External Web server hosting Mikrotik Userman login (Mikrotik Hotspot redirects login to external web server). used php from “http://wiki.mikrotik.com/wiki/HotSpot_external_login_page


    Not Working (don’t know what files needs modification):
  • External Web server hosting Mikrotik hotspot login.html with DMA radiusmanager authentication)


    wandering thoughts:
  • Best way to secure login communication between hotspot routers ↔ servers ?
  • Best protocol for using between router ↔ servers ? http-chap, http-pap, https ? or even simple answer when/why to use for. ex. https ?


    Network pic:




Visio-mtik-hotspot-radius-auth.pdf (344 KB)
br.
K

  • Did you find answers to your questions ? Did you get ext. Web server hosting login for radius ?
  • im struggling with the same questions.. :slight_smile:

Br.
.K

Hi, in this method is the client authenticated to the local mikrotik’s captive portal or remote external server’s captive portal?
when i tried this method, it worked, client could go out to the internet, but client logon to the local mikrotik’s captive portal,
i need to make the client log on to the externel server’s captive portal, i did this via editing the php files, now client logs on to the external server pfsense’s captive portal, but client can not go to the internet, i think i must give some permissions on the mikrotik too. do you know this method, how can i achieve this situation?