Have got the hotspot on mikrotik routerboard, that redirects to the external page after login. On ios it works well, user scrolls the captive portal page, authenticates and gets redirected to the external page. On android got an issue - after opening the notification of wifi session, android opens the captive portal and after authentication, while gets the redirection, popup browser closes automatic. Need to prevent from automatic close and show redirected page after the success authentication.
Used to try to add deny rules to wallet garden and firewall of clients3.google.com, but no success.
What kind of solution could be applied for this type of issue? Did somebody tried to use ajax instead of redirection?
I’ve setup hotspot on RouterBoard 2011 and edited login.html page so it logs in the trial user and redirects to an external web page. I’ve tested it on several devices running different types of OS; and on some devices the redirect works, on others it doesn’t. As follows:
Notebook PC running Windows 7 and Windows 10 – I connect to the network, open a browser, get the login page and everything works fine
HTC One M8 mini running Adnroid 4.4.2 – after i connect to the network i get the notification I need to login, I click on the notification, get the login page and everything works fine
Lenovo P70 running Android 4.4.2 – after i connect to the network i get the notification I need to login, I click on the notification, get the login page and everything works fine
Samsung Galaxy S5 running Android 5.0 – login page pops out automaticly after i connect to the network; and everything works fine
Notebook PC running Linux Ubuntu 14.04.3 - login page pops out automaticly after i connect to the network; and after i click the login link the browser shows a blank page
Samsung Galaxy S6 Edge running Android 5.1.1 – login page pops out automaticly after i connect to the network; and after i click the login link the browser closes automaticly
Sony Xperia Z3 Compact running Android 5.1.1 – after i connect to the network i get the notification I need to login, I click on the notification, get the login page and after i click the login link the browser closes automaticly
Nokia Lumia 735 running Windows Phone 8 – login page pops out automaticly after i connect to the network; and after i click the login link the browser closes automaticly
Lenovo P70 running Android 5.1 - after i connect to the network i get the notification I need to login, I click on the notification, get the login page and after i click the login link I get an error (just an red lock icon)
The problem is the same regardless of the web page I redirect to. Could there be a problem with hotspot configuration or with login.html page?
I’ve setup hotspot on RouterBoard 2011 and edited login.html page so it logs in the trial user and redirects to an external web page. I’ve tested it on several devices running different types of OS; and on some devices the redirect works, on others it doesn’t. As follows:
Notebook PC running Windows 7 and Windows 10 – I connect to the network, open a browser, get the login page and everything works fine
HTC One M8 mini running Adnroid 4.4.2 – after i connect to the network i get the notification I need to login, I click on the notification, get the login page and everything works fine
Lenovo P70 running Android 4.4.2 – after i connect to the network i get the notification I need to login, I click on the notification, get the login page and everything works fine
Samsung Galaxy S5 running Android 5.0 – login page pops out automaticly after i connect to the network; and everything works fine
Notebook PC running Linux Ubuntu 14.04.3 - login page pops out automaticly after i connect to the network; and after i click the login link the browser shows a blank page
Samsung Galaxy S6 Edge running Android 5.1.1 – login page pops out automaticly after i connect to the network; and after i click the login link the browser closes automaticly
Sony Xperia Z3 Compact running Android 5.1.1 – after i connect to the network i get the notification I need to login, I click on the notification, get the login page and after i click the login link the browser closes automaticly
Nokia Lumia 735 running Windows Phone 8 – login page pops out automaticly after i connect to the network; and after i click the login link the browser closes automaticly
Lenovo P70 running Android 5.1 - after i connect to the network i get the notification I need to login, I click on the notification, get the login page and after i click the login link I get an error (just an red lock icon)
The problem is the same regardless of the web page I redirect to. Could there be a problem with hotspot configuration or with login.html page?
Hello All.. I have the same issue. This is the not a Mikrotik issue. This is a OS Android issue. By default browser on the the Android device it will do that/ Don’t ask why but there is NO fix at all for that.. Do this..
Connect to you’re network. Once connected , open up google chrome on youre’re Android device, see you’re Terms of page. Once you do that, it will take you to your landing page correctly.
I was doing some testing myself as well today and it works fine on other browsers.. Try to make google chrome ur browser, or other browser besides the “DEFAULT” that comes with Android.
You will see your login page and get redirected to ur landing page.. ( home page ) or whatever you want to call it…
Thanks all.
Hi, we guess that we have found a solution. At least, we avoid captive portal login being automatically closed. For anyone that requires more information, please reach us in contacto@santangeloingenieria.com
Hello guys. I’ve found a partial solution. So i’ve made an investigation. When android phone connects to wi-fi he trying to access some google net and amazon net addresses (to tcp pot 5223 and so on). So i’ve sniffed that addresses and put in walled-garden white list. So now when phones connects he thinks that Internet is accessible and doesn’t open hotspot login page automatically.
The minus of this scheme is that google pages are accessible without login. But for my environment it is not a problem. May be for someone this info will be useful.
You have the best solution, possible on mikrotik. However, very best solution can be done on open (openwrt/LEDE) hotspot systems.
I.g. it means, to filter (or to fake) the internet-connection probes by iOs, WP, Android.
Your issue is one more confirmation for my decision, to drop MT for hotspots with special (read: top of the line) requirements.
So here is what I have done seems to work pretty well.
So after you login the user profile adds you to a firewall list which blocks the connectivy checker for 15 secs before removing the user from the list.
So this allows the redirect to happen to the post page because you are online but fools the captive portal and phone to think you are still not online and not close the captive portal. This seems to work at least 80% of the time as it is all a timing issue and also if google changes the chekecer url at somepoint you would then need to change it in the firewall rules.
can you explain what you did there?
I can’t seem to understad the logic
I have the same problem -
I want to redirect my users to my page after login - but the captive portal is turn off after login
did you mange to “Fix” this problem ?
And when it cant reach the link it will popup a sign in option in your mobile. Its all by design. And if you sign in through that pop up by clicking on it it will take you to the internal browser which is hardcoded in android . This is not the default Browser or any custom browser. So changing the default browser to Chrome will not help.
For me the simplest solution is to bypass the link by adding it to wallgarden. Hope it will work for you guys.
Be aware that by bypassing the connectivity check in this way there will be NO hotspot popup. Your users will have a very hard time triggering the captive portal redirect, as most sites are using HTTPS which means they will show scary security error messages instead of a redirect.
Think carefully about the appearance you want to give your users. Fast and easy access with automatic hotspot popup? Or leaving them to see lots of HTTPS errors and stumble around until they finally hit a HTTP link to trigger the redirect?