Hello Everybody,
Is any one has a solution for this moment when internet is cutting the hotspot page is go? is there any future or solution in Mikrotik RouterOS?
Thanks,
?..
I have a hotspot server. when internet connection is cutting , the hotspot page (the login page) doesn’t show for the clients, my question is: how can the router show the hotspot page in both cases , when internet is available and not available?
sorry for bad English, please let me know if need more explanation.
Thanks,
Twana
I think, he means the following “feature” of hotspot, which I simply can confirm already for quite some time, but did not report, because there are no bugs (per definitionem):
IF internet-connection from MT-box is up THEN
IF browser on client-PC is started THEN
display LOGIN-page of hotspot
END IF
ELSE
IF browser on client-PC is started THEN
do nothing !Strange, isn’t it ?
END IF
END IF
That’s neither a bug nor a feature, it’s simply a by-product of how Hotpots work (not just in RouterOS, but in at least 3 other Hotspot solutions I have worked with):
- The client opens a browser.
- The browser either loads a default home page, or the user manually loads a page. This is done in two steps:
a) the user resolves the server’s IP address by name
b) the user then sends an HTTP GET to that server - RouterOS intercepts the HTTP GET, pretends to be that server and throws an HTTP 302 (“I found your content, but it has moved please go here instead”) and redirects to the login page.
If 2.a) fails, the user never requests a page that can be intercepted to the login page. 2.a) may fail, for example, if the user cannot resolve the host name because the router’s internet connection is down. That has nothing to do with the Hotspot server, it’s simply due to the client never requesting a page for the Hotspot server to intercept if it cannot resolve the server name.
You can confirm this by configuring RouterOS as a caching DNS proxy, and configuring the unauthorized Hotspot’s client to use RouterOS as its DNS server. Then unplug the router’s internet connection, and try to navigate to google.com in a browser. The login page should not load. Then enter a static DNS entry in RouterOS’s DNS proxy for google.com, pointing to any outside IP (5.5.5.5, for example). Try to load google.com again in the client’s browser. Now the login page should show.
Since there’s no trivial way for you to meaningfully supply a DNS result without an available upstream DNS available, there’s no way for you to workaround this. You could probably hack something up in an open source DNS proxy, supplying bogus results whenever upstream is down. But that would be entirely outside of RouterOS (and would break a couple of RFCs).
I have to ask, though: what’s the point of showing the user a login page and letting him either purchase credits or burn existing credits by logging in when the user cannot do anything because the upstream internet connection is down?
actually, you may try to do the following:
/ip dns static add address=1.2.3.4 disabled=yes name=.*
then use any failover script, and when the Internet goes down, do
/ip dns static enable [ find name=.* ]
(and ‘disable’ when Inet is up)
Very nice solution. I would never have thought of that.
It would simply be consistent and “intuitiv”: The user “sees”, that he has access to the “HotSpot” (thats the source of the login-page, naturally), but not the web.
Would make problem-tracing easier.
Actually that wildcard static DNS setting was a feature request from me some time ago - for exactly this situation.
To make it really intuitive and sensible for the user, you’ll have to extend the idea a bit, though:
Not only enable the wildcard static DNS entry, but also switch the hotspots’ html directory to another one where the login page isn’t really a login page, but rather says “sorry, we’re offline right now”. You get the idea…
YES, I got it.
Will give it a try some time, for sure.
Finally a MT-specialist, who has “user-friendliness” in his mind. Which is somehing, I can not say about quite a few developers at XX …
But that is a very philosophical discussion. Being a SW-developer (better to say: …-dinosaur) myself, I still keep in mind, what one customer of mine told me a few times during acceptance testing: “There is no such thing as a user error”. And he was right.
Beside that, he should know, because this guy is from a very big German airline …