Offline Hotspot.

Hi all.
I am trying to do like a information hotspot, but the router is not going to be connected on the internet.
What i’m trying to achieve is:

  • The user connects to the Wifi,
  • The captive portal intercept all traffic and Popup login page
  • The page wont have any Login form, only info about schedule and some activities on a simple http web page.
  • This will be oriented to mobile devices such as Phones and Tablets, but mostly phones.

The Issue:
Everything is working fine when i have a dhcp-client and the router is connected to the Internet.
If i remove internet connection, and then try to connect to the Hotspot, it wont popup any page, it only works if i open the browser and i write whatever i put on the server-profile ->dns name
if i give internet Connection to the router, everything works again.


What i have tried, i have tried this: http://forum.mikrotik.com/t/hotspot-login-redirect-page-without-internet/78594/22 without any luck.
I try to add the DNS redirection with the RegExp .* to the mikrotik IP address, but when i try to connect with my iphone, it popups a window but immediately sends an error that says something like: “too many redirects ocurrred”.

one thing i dont understand, is that if you are not logged, and the browser needs to resolve to check ifs there connection, (some say this is the cause the hotspot page wont popup), how can it check it if you are not logged in yet?..

Please help, im loosing my mind here, in short, everything works as expected when Internet Is on.. but if there is not internet at all in the router, the page wont popup..
Im using rOS 6.46.2 on a RB951Ui-2HnD
Thanks In advance.

JB

the browser needs to resolve to check ifs there connection< AFAIK, this is done trying DNS. In standard hotspots, DNS works.
You should do detailed analysis, whats going on between browser and router. I.e. using tcp-dump.
Be warned, that “Captive Portal Detection” is similar for Andoid and iOS, but not identical. And it differs between versions, at least for Android.
As I did an offline hotspot in the past myself, but not on MT, but on openwrt, because more tricks possible, cause open source.

May be, on newer iOS, CP-detection relies on https. Which would make your task even more demanding.

I don’t know it it’s that, but I’d try some other address. It will be redirected anyway. And it will be clear that original connection wasn’t to router.

Edit: It’s not good either, because it also affects hotspot’s hostname. Even if I add static record for that, the regexp entry overrides it.

Edit2: It’s possible to have selected hostname with different address, if it’s before the catch-all entry also as regexp, e.g.:

/ip dns static
add address=192.168.88.1 regexp="^hotspot\\.mydomain\\.tld\$" ttl=5s
add address=1.1.1.1 regexp=.* ttl=5s

http://forum.mikrotik.com/t/hotspot-login-redirect-page-without-internet/78594/30
Works for offline hotspot!

Sent from my LYA-L29 using Tapatalk