If the hotspot server is a mikrotik router, how do you accomplish this?Make sure your hotspot is intercepting requests to hotspot-detection services that any modern OS has. This includes HTTP requests to URLs such as http://gstatic.com/generate_204 and intercepting all DNS requests eg for invalid / random hostnames like "xgjaiobman"
Sorry, no idea, but doing this for long time already, on openwrt-based devices.If the hotspot server is a mikrotik router, how do you accomplish this?
Doesn't change the fact that other hotspot devices have far, far better hotspot handling than MikroTik. It seems to 'just work' far more often.In part, HTTPS exists exactly to prevent such silent interception of web browsing.
Any recommendations for a package we can put on a low cost or low form factor device like a Raspberry Pi3/4?Sorry, no idea, but doing this for long time already, on openwrt-based devices.If the hotspot server is a mikrotik router, how do you accomplish this?
Which are much better suited for hotspots with "advanced features", like this one.
Wait a moment... this should read: make sure your hotspot is not intercepting....Make sure your hotspot is intercepting requests to hotspot-detection services that any modern OS has. This includes HTTP requests to URLs such as http://gstatic.com/generate_204 and intercepting all DNS requests eg for invalid / random hostnames like "xgjaiobman"
The captive portal detection not working for you is almost certainly caused by some kind of hotspot walled garden entry that shouldn't be there. The hotspot manager you are using I believe is HSNM hotspot manager. I would go through the walled garden with a fine-tooth comb and clean up anything from there that might be causing a problem. Something I see on the software page that is a bit alarming is the fact that they display YouTube videos when you are not authenticated, as well as other resources. Those same Google servers are likely being used to host the captive portal detection sites, and if they are allowed through by a walled garden entry, then the captive portal detection will be broken. In essence, you may be giving up reliable captive portal detection in exchange for the ability to play youtube videos for unauthenticated users. I'm not sure the trade-off is worth it.My main focus here is not in actually trying to redirect HTTPS, I really honestly don't give a flying stuff about that
The real issue is simply when hotspot detection fails, the user gets no prompt or no notification in any way that they need to first 'sign in' and the normal behavior is they just open up a web browser and by default it'll usually be a HTTPS site, this just leads to a the connection being dropped. So the idea of HTTPS redirection is just a band-aid for the real problem
Once again, I really don't at all care about a redirect, but I want the captive portal/hotspot detection to JUST WORK so that this never happens, and they ALWAYS get a notification to sign in. MikroTik sucks at this
This problem has not been fixed with the updates that come from the company .. The biggest problem when you activate the hotspot service to impose in the hotel and the customer will connect his laptop and then the page did not appear Login and the customer does not know in the field of information technology What is the attitude of the hotel towards such problems in the page access!As written many times above, that issue cannot be solved!
However, the writers of software like Chrome and Android do know that, and they use requests that you do not enter yourself (some DNS and some HTTP requests) to detect this situation.
When they find that they are on a hotspot/portal network, they allow the user to enter the login info instead of going to the homepage site.
What company do you mean here?This problem has not been fixed with the updates that come from the company ..As written many times above, that issue cannot be solved!
However, the writers of software like Chrome and Android do know that, and they use requests that you do not enter yourself (some DNS and some HTTP requests) to detect this situation.
When they find that they are on a hotspot/portal network, they allow the user to enter the login info instead of going to the homepage site.
It is a problem that has been caused by the move of all websites to https.The biggest problem when you activate the hotspot service to impose in the hotel and the customer will connect his laptop and then the page did not appear Login and the customer does not know in the field of information technology What is the attitude of the hotel towards such problems in the page access!
Yes, this is very, very suspicious, at least.hing I see on the software page that is a bit alarming is the fact that they display YouTube videos when you are not authenticated
The company i mean "The mikrotik company", (The manufacture company),What company do you mean here?This problem has not been fixed with the updates that come from the company ..As written many times above, that issue cannot be solved!
However, the writers of software like Chrome and Android do know that, and they use requests that you do not enter yourself (some DNS and some HTTP requests) to detect this situation.
When they find that they are on a hotspot/portal network, they allow the user to enter the login info instead of going to the homepage site.It is a problem that has been caused by the move of all websites to https.The biggest problem when you activate the hotspot service to impose in the hotel and the customer will connect his laptop and then the page did not appear Login and the customer does not know in the field of information technology What is the attitude of the hotel towards such problems in the page access!
That move wasn't very wise, but we will all have to live with it, no matter if we are using a hotspot service, operating a hotel, or visiting one.
According to your advice at the moment not to buy a certificate so do not solve the problem, in the case of buying a certificate for the same subject What are the costs if i buy for hotspot?@loveman: I think you don't get it, MikroTik can't solve it. The redirection done by captive portals was always dirty trick, an abuse of technology. That's one reason why https became so popular, because too many people liked to tamper with someone else's unprotected traffic. Https prevents that, so the redirection no longer works, and it's by design.
You can buy certificate for your hotspot, but it won't help you with redirecting others websites. You can imagine certificate like house key, you can have your own, but it won't unlock other houses.
"You can get certificates for free" whats the steps for how to get certificate to hotspot after that i have the secure website login in my server?You can get certificates for free. But only for your own site. So you cannot get a certificate for Google.com and so you CANNOT SOLVE the redirection problem.
And neither can MikroTik.
It is just a case of 'sorry but that is no longer possible, forget about it'.
That is why you should focus on getting the portal detection in the browser working correctly.
That is, you must make sure that the probes that the browser makes (resolving certain DNS names, fetching certain http pages) do NOT get treated special by the portal.
They must get the same treatment as any other DNS lookup or http page lookup. I.e. be disallowed.
When that is properly setup, it will work OK.
Can you tell me about trusted website to buy from it.When buying a certificate for your website, buy from "trusted" authority.
Otherwise you might face inconvenient issues when using newer IOS clients.
Is the website can buy direct to hotspot server mikrotik?
Price and Trust have nothing to do with each other!
If possible, please write down the basic steps in order to make the login page safe "secure" for hotspot server, and are they all change to secure for free or not?Price and Trust have nothing to do with each other!
E.g. Letsencrypt certificates are free and they are trusted, but paid certificates from some used-to-be-big-names like Symantec are NOT Trusted!
Fine, but does the default MikroTik hotspot do the first 2 in which case nothing else needs to be done? Or are additional steps required?Best things to do:
- Intercept ALL requests to internet (make sure gstatic.com, captive.apple.com, etc are NOT whitelisted as some misguided posts suggest)
- Make sure interception is redirecting to a local IP or DNS name (eg http://hotspot.local/) and only hosted on private IP range.
- Ideally have a FQDN with split horizon DNS so you can use Let's Encrypt and redirect to https instead to protect your logins (eg https://myhotspot.example.com/)
Google uses HSTS. Once you visited an HSTS enabled site your browser will force you into using HTTPS any time you access that domain. HSTS expiration period for google.com is currently set to 1 year.Now here's another question, i'm not typing https://www.google.com
I'm simply typing www.google.com or google.com and it fails. Why?
Very bad idea to put gstatic.com into walled garden. Which could mean, there are more such harmful entries.What I did do is scour all the walled garden section (there's a bunch) and found *gstatic.com and *akamai* was infact in the wallen garden list. We are using HSNM (lets see if that now fixes the issue and reduces complaints)
These were not in the configurable parameters but actually came from a php script. I found the file in /sitiweb/hotspot/functions/walledgarden.php and simply commented out mentions of these 2
But as I keep saying, I want some actual information on this. Not just 'it should work'Like said above, you should not be typing anything. Computers and phones have hotspot detection
Back to one of my previous posts: Using openwrt for hotspots will show you, because open source. I.e. check the docs and source code for coova-chilli,And how does does it know the hotspot login page to send the user to?
Lets say the hotspot is hosted at 1.1.1.1, how does it know to send the user to 1.1.1.1?
This question has nothing to do with Mikrotik, all vendors do it in their own unique way (and also change those ways from time to time). This is in no way standardized. You should direct such questions to Google, Apple, Microsoft, etc. I doubt anyone on this forum will be able to answer this particular question fully.But as I keep saying, I want some actual information on this. Not just 'it should work'
HOW does it work? I would like information on how all devices detect hotspot in the first place.
1) Correct.1) This question has nothing to do with Mikrotik, all vendors do it in their own unique way (and also change those ways from time to time).
2) I doubt anyone of this forum will be able to answer this particular question fully.
When the device connects to the network, or the browser starts, it does an HTTP request (not HTTPS) to download a specific file from the vendor website. The file is a special file only used for detecting captive portal. Different vendors use different files (URLs) in different versions sometimes. If it gets the expected file from the vendor website, it knows there is no captive portal and doesn't bother to present a login page. If the file from the vendor website is not as expected (different contents) or the HTTP response doesn't match (generally it expects 204 I believe) then the device knows there is a captive portal.But as I keep saying, I want some actual information on this. Not just 'it should work'
HOW does it work? I would like information on how all devices detect hotspot in the first place. Not just a brief overview of "they try and connect to a site and if it fails it'll show you the login page" that doesn't tell me anything. I want to know what sites are attempted to be accessed, does it do a http request? DNS? ping?
The MikroTik hotspot takes any HTTP request from an unauthenticated user destined for the Internet and replies instead with a HTTP 302 (redirect) to go to http://1.1.1.1/login. Since the device is using HTTP (and not HTTPS) to request the captive portal detection page from the browser or device vendor site (ex. www.msftncsi.com or clients3.google.com), when it makes this request to www.msftncsi.com, it not only receives the wrong data and wrong code, so that it knows there is a captive portal, but it also receives the MikroTik's inserted reply of HTTP 302 ordering it to redirect to http://1.1.1.1/login. The device knows since it got this 302 redirect it was not expecting that that must be the captive portal address and pops up a browser window and goes to the URL it received from the HTTP 302 request for the user to complete the captive portal login process.And how does does it know the hotspot login page to send the user to?
Lets say the hotspot is hosted at 1.1.1.1, how does it know to send the user to 1.1.1.1? This is handled behind the scenes by the MikroTik router but I want to know this information to properly troubleshoot and possibly improve it as much as possible
Yes, that is correct. If the hotspot has an IPv6 address and the customer gets IPv6 from the hotspot device, and firewall rules allow them to browse, they will be able to get online to any IPv6 sites but the captive portal detection will not work so they will not be prompted to log in and any v4 sites would be broken. If a user cannot get an IPv6 address connected to the hotspot you are safe - the device itself can have IPv6 as long as the interface your hotspot users are on does not have v6. If you really need IPv6 on your hotspot for some reason, it must be blocked until the user authenticates, and only then should they be allowed through IPv6. Hotspot doesn't do anything with IPv6 out of the box, so you would need to script this somehow with the IPv6 firewall and lookup their v6 address through neighbor discovery or something. If it even works it is a lot of work and so it would not be worth doing unless you really really need IPv6.So what if IPv6 is also enabled but hotspot isn't handling IPv6? Will that mean no hotspot notification, but sites that are on IPv6 work fine but when a user tries a IPv4 site it silently fails (never got a notification to login)
A router with the IPv6 package simply installed is not a concern. The interface needs a valid v6 global address on a /64 subnet with advertise=yes in order for end users to get a v6 global address that could cause a problem. If the interface only has an fe80:: link local IPv6 there is no issue, since the customer could potentially reach that interface with IPv6 but that doesn't allow them to get online and doesn't interfere with captive portal detection.I don't run IPv6 anywhere yet but knowing about this helps greatly because there may be a server which has had DHCPv4 turned off, but DHCPv6 was forgotten and left on. Or a router got installed that had IPv6 package installed for testing and again same problem.
There is some bug in the RouterOS DHCPv6 that I still need to investigate further but that could make that statement partly invalid.A router with the IPv6 package simply installed is not a concern. The interface needs a valid v6 global address on a /64 subnet with advertise=yes in order for end users to get a v6 global address that could cause a problem.
This doesn't sound like an IPv6 problem to me. There is probably a switching loop or switching problem somewhere where the three VLANs are being untagged and bridged to the fourth VLAN. The result would be that the router sending out regular "broadcast" ICMPv6 RA packets would get looped, bridged back to the other network, received by the computer and it would add the addresses, but it would not be possible to send responses back because the FIB on the switch probably is using a different path to send back to the MAC of the router where those VLANs exist.But recently, I added a Windows 10 machine on the network which does NOT have IPv6, no address, no RA, no DHCPv6 server, and it had connectivity problems.
Looking in "ipconfig /all" I saw that it had obtained 3 IPv6 addresses belonging to the 3 networks it isn't connected to!
For now I disabled the IPv6 protocol but I plan to look further into it and attempt to make a trace what is going on there.
That is RFC7710. Nobody uses it. The usual chicken-egg situation: nobody queries the option, so nobody bothers to support it in their DHCP server, so noboty bothers to query it because it will not be there anyway.The industry should move to a better system in general, such as a new DHCP option number that includes a URL.