- This topic has 7 replies, 1 voice, and was last updated 10 years, 4 months ago by
Anonymous.
MikroTik logout link BUG/Feature
-
Anonymous April 28, 2016 at 12:12 pm
As you know if you try to change the Splash Internal Login (or Logout) URL it switches to “Custom”, and changing to MikroTik stomps over and changes with the IP 10.5.50.1 for both the Internal Login & Logout URLs.
I’ve needed a more advanced setup (I touch on later) and have been informed it’s not supported? Still this doesn’t matter to eventually explain this simple to fix bug, so please bare with me.
In my “working” (dare I say superior) setup I used a different hotspot pool with 192.168.88.1/24 (also don’t need 4000+ IPs).
On the After Login (aka alogin.html) Page there is a super simple “Logout” link to that value, which I can’t change but should be able to there is no reason not to allow setting that in your webGUI.
Still to solve this bug, you already have in the source code for that page the correct values shown and demonstrated twice!
in the “Hotspot Start Page” link it clearly shows the value “uamip” is set to my value for my custom hostspot server which is 192.168.88.2 (or whatever 192.168.88.* could be anything).
The “uamip” value is actually what should be placed in the generated logout value as the IP, or you should let me set it in the WebGUI without overriding it.
It seems changing one affects the other and then the payment options disappear from the login page?Notes on why I changed your script:
I will be virtually/remotely accessing/administering from the other side of the world (Vancouver Canada to the Philippines).
When as one has to, the multiple WiFi routers positioned after the MikroTik (hEX) Router are all Open Access Points with no WAN (linked to LAN), disabled DHCP running as only a wireless switch and in Router Mode (No Gateway with NAT off).
I setup a VPN because having to have a physical machine behind the router is costly, unreliable, and unnecessary. [Sure there will be directly wired machines with Chrome Remote Desktop connected and probably at least a server with IP Binding allowing access without hotspot blocking, but it’s much, much better to have the VPN setup.]
I was not able after 4 long days of hacking to get your configuration to allow the VPN to access the WiFi routers Web GUI interface. [Again Yes I probably don’t want to change the Open WIFi routers once there setup, but I’ll need to make sure no one has reset them and therefore allowing a single hotspot login to allow access to all those connected to the potentially compromised router.]So if I put my custom logout URL to point to my Hotspot Server IP 192.168.88.2/logout, then the login page is no longer the one that includes all the payment options, which maybe there’s a way to rig it I’m looking into it. Please advise alternative solutions there thanks, but it seems to me you really just want to put the “uamip” into the otherwise stomped/auto-generated Internal Logout URL.
I can see how you use the customized value there and that people should be able to change it, but in the case of the MikroTik you set an overriding default, and have perceivably a little bit of a tangled situation there.
Here are the options as I see it, all of them provide the solution we need and resolve this bug. Please explain how I’m wrong otherwise thanks.
1). Because you override in MikroTik mode those values then it’s safe to set the IP in the simple logout link to the value passed in “uamip” that’s already available in the page.
2). Do Not overwrite the the Internal Login/Logout URLs when in MikroTik mode, and use them.
3). observe values passed in login.html (and/or alogin.html etc.) via the form redirect
‘ input type=”hidden” name=”link-logout” value=”http://192.168.88.2/logout” ‘
4). Don’t remove the payment options from the login page (just user & password shows) when a “custom” logout url is set. Maybe the default for login when setting to MikroTik isn’t showing to the right thing. (res=notyet?)
5). maybe there’s others ???!What I’m unclear on is how the logout link actually results in the clients account stopping the timer on their account?
I’ve lowered the “Idle-Timeout for Time-Based accesses” to 15 minutes thinking they will otherwise loss an hour (default 60 minutes) when they think they’ve logged out, so it’s important the “logout” action is available and actually logs them out, however it does it.I’m including my previous export src to show you how this setup allows proper access with the VPN to the Open WiFi routers WebGUIs. Maybe you have insight or would like to explore how your MikroTik script did not enable that ability and either use this one instead or change yours to allow that ability. Still in the end this logout link having hard coded to your script is totally dysfunctional, and an oversight I’m sure you’re eager to fix as it’s clearly really simple to just put the IP from the “uamip”, when they have MikroTik enabled, or again allow us to override it.(see many recommendations above). [The DDNS Script/Schedule I’ve changed since and is deactivated or unneeded.]
I discussed all this quickly with one of the “Team” and it was not well received or maybe not well understood so I’m hopeful one of the developers there will see this is in fact a Bug and how easy it is to resolve. { Call it a feature request if you prefer. }
Again please explain otherwise the best workaround and what I’m missing. I’ll continue to try various solutions on this end, and hope it doesn’t lead to me considering another solution.
As far as I can tell it’s just this one little simple problem left to easily fix that almost isn’t a concern, so otherwise I’m/we’re loving the product and the great support and in general services you provide, so thank you.James
Anonymous April 29, 2016 at 2:11 amAdding Screen Captures where requested of me. There are many I’m not sure any are small enough to upload 512KB. Let’s see how it goes with the 4? at a time limit.
Anonymous April 29, 2016 at 2:30 am
04/28/2016 02:49 PM 52,185 CreditLogin.JPG
04/28/2016 03:00 PM 20,348 HSS_SettingsA.JPG
04/28/2016 03:02 PM 27,567 HSS_SettingsEdittedLogoutLink.JPG
04/28/2016 02:50 PM 47,097 LoggedIn.JPG
04/28/2016 03:07 PM 57,308 loginHTMLWithAddedLogoutLink.JPG
04/28/2016 02:51 PM 11,225 LogoutLink.JPG
04/28/2016 02:55 PM 16,207 manualEntryOfProperLogoutLink.JPG
04/28/2016 03:04 PM 92,883 NoMoreCreditOptionsLogin.JPG
04/28/2016 02:52 PM 19,273 UAMIPInLogout.JPG
04/28/2016 02:56 PM 29,040 WrongLogoutLinkExperience.JPG
04/28/2016 02:53 PM 19,293 WrongLogoutLinkInLoggedIn.JPG
11 File(s) 392,426 bytes
2 Dir(s) 437,594,943,488 bytes free
Okay let’s see if the titles and images with the detailed explanation arn’t enough.You’ll want to note that if you change the logout link (normally HSS_SettingsA) in the interface to my new Hotsport Server IP 192.168.88.2 (see HSS_SettingsEdittedLogoutLink), you won’t get the payment options on the login anymore. You see instead of this CreditLogin (with Credit Card options), it looks like this NoMoreCreditOptionsLogin, without the credit card options.
On my MikroTik hEX box I’ve added the login-link seen in loginHTMLWithAddedLogoutLink that does redirect the needed information for the logout link via the form redirect (which would be an option that should also work and override the gui setting [maybe that’s the 6th recommendation/solution]).Of course it’s in this super simple logout link LogoutLink you find the code WrongLogoutLinkInLoggedIn that will go nowhere since it always points to 10.5.50.1 (and not my hotspot server setting of 192.168.88.2) WrongLogoutLinkExperience which is where the bug is and should be set one of the ways I’ve recommended (please and thank you), so you don’t get an unreachable error page after a long delay that looks like this WrongLogoutLinkExperience.
If I then manually enter the link into the browser like so, manualEntryOfProperLogoutLink to point correctly to my mikrotik hotspot server ip 192.168.88.2, then you’ll get bounced back to the proper login page CreditLogin which has the payment system.
Anonymous April 29, 2016 at 8:44 amAlso note the uamip value is already being adding through your code to the source page where the logout link is waiting for the same value. UAMIPInLogout
The default seeting HSS_SettingsA should probably have these in it as shown in red although there is a typo of logoff shown there HSS_SettingsEdittedLogoutLinkAnonymous April 30, 2016 at 10:36 amReally strange this seems unable to accept postings anymore? Nothings showing up?!
Oh well I can’t post my work around hack to this forum?Anonymous April 30, 2016 at 10:37 amMaybe it was the links that won’t post?
Okay I found a hack to get this working.
If you go out of MikroTik mode and into Custom mode of the splash settings, it will lose the Payment options on first load. To fix that instead is the approach that’s working for me finally.The login.html from the hotspot server on mikrotik is used by the system on first request, so you have to hack the form redirect line and create a new userlogin.html it will work properly.
First copy the index.html to userlogin.html that has the hotspotlogin.php in the form redirect.
Then change the index.html file to point to index.php instead of hotspotlogin.php.
Now in the HSS Web interface under Splash Settings put for Custom Internal login URL with
your MikroTik Hotspot Servers IP. Note: the Squiggly Brackets UAMIP isn’t working as suggested in red there either so you have to hard code the IP, in my case it’s 192.168.88.2
192.168.88.2/userlogin.html
this one points to the login that doesn’t have any payment options.
while the Internal Logout URL should be set like this with your custom Router IP.
192.168.88.2/logout/Then when they first visit they get to a payment options page, and if the click login they get a username password login page and the logout links are then correct on both the popup and logged in page.
You must be logged in to reply to this topic.