Community discussions

MikroTik App
 
hsfrmusr
just joined
Topic Author
Posts: 4
Joined: Fri Feb 15, 2013 6:54 pm

Hotspot One Time Login Only

Fri Feb 15, 2013 7:04 pm

Hi All,
I want to set my users to login once only until their package expires,
say a user buy a one day package, along that day if the user leave the network and return to the network will not need to enter username and password, or at least a long lease time,
i am using freeradius with mikrotik, tried to set idle timeout, keepalive and session timeout, but still users will need to relogin after few minutes leaving the network and return
please help and advise

tks
 
dtoffo
Trainer
Trainer
Posts: 98
Joined: Tue May 17, 2011 9:19 am

Re: Hotspot One Time Login Only

Sat Feb 16, 2013 12:52 am

did you try to add "cookie" in login-by and http-cookie-lifetime=1d in hotspot profile?
 
hsfrmusr
just joined
Topic Author
Posts: 4
Joined: Fri Feb 15, 2013 6:54 pm

Re: Hotspot One Time Login Only

Sat Feb 16, 2013 2:24 am

yes, i tried adding cookie, but still it doesnt work,
i am wondering if its some attribute that i need to add on the radgroupreply, any idea?
 
User avatar
samir494
Member Candidate
Member Candidate
Posts: 236
Joined: Thu Aug 06, 2009 11:27 am
Location: India

Re: Hotspot One Time Login Only

Sat Feb 16, 2013 6:24 am

it is only possible if you open site on the same page / running page / refresh that page


to counter this i used logout page ( status ) where log off button available, i used that to log out & closed the broswer

so when ever user open new broswer page it will ask for login :lol:

its work for me.. try once
Mistry Samir
Unique and Different
India
9920670022

Give me more Karma
 
hsfrmusr
just joined
Topic Author
Posts: 4
Joined: Fri Feb 15, 2013 6:54 pm

Re: Hotspot One Time Login Only

Sat Feb 16, 2013 9:13 am

it is only possible if you open site on the same page / running page / refresh that page


to counter this i used logout page ( status ) where log off button available, i used that to log out & closed the broswer

so when ever user open new broswer page it will ask for login :lol:

its work for me.. try once

samir, what i want is the opposite of what u said, i wanted people to login only once,
 
dtoffo
Trainer
Trainer
Posts: 98
Joined: Tue May 17, 2011 9:19 am

Re: Hotspot One Time Login Only

Wed Feb 20, 2013 12:22 am

I am working on a similar configuration for a customer.

My idea is to have cookies for 12h and sessions for the same time, without idle or keepalive timeouts.
This means that normally an user doesn't need to autetichate for the whole day (it's for an office, so 8 am to 8 pm is enough), but in case something changes the use has just to open browser to any site, it is automatically redirected to login, the cookies makes the magic and he logs in without need to reauthenticate.
I'll use two profiles: 12h (that I name "one day") and 1w1d (that I name "one week"). Who has the "one week" profile needs to authenticate every morning, but not during the day: this is the design. Using longer values for sessions and cookies can cover longer periods, but for the "one day user" this will mean he ca connect the second day, the third and so on until cookie expires, so i set them to the same value as the smaller amount of time i'll give to a user. The 12h trick can be sufficient for me, but I could even set values to 24 hours and delete cookies and active users by script during the night.

What can break this plan is if the ip address of the user changes, for example if dhcp lease is too short. I'll set it at 12h.

I have some more test to do, but as for now it seems ok.
I don't use openradius, so I don't know if there are any specific attribute tu set.
 
praqashmalla977
just joined
Posts: 1
Joined: Tue Nov 07, 2017 7:27 am

Re: Hotspot One Time Login Only

Tue Nov 07, 2017 7:42 am

I have made a voucher for in which a user can surf the internet for 12hrs. i have set the HTTP cookie lifetime to 12hrs and MAC cookie time also for 12hrs. But the user can login again next day due to cookie. In log it says "trying to login by cookie, logged in". How do stop this to happen again. How do i make it a one time login for 12hrs only?
 
WarlitoBaya
just joined
Posts: 1
Joined: Mon Sep 23, 2019 10:40 am

Re: Hotspot One Time Login Only

Wed Mar 04, 2020 1:21 am

Anyone have solve this problem. I have experiencing the same


thanks
 
moonehman
just joined
Posts: 3
Joined: Sun Mar 08, 2020 12:53 pm

Re: Hotspot One Time Login Only

Sun Mar 08, 2020 4:44 pm

you should also add mac addresses of all uap to "hotspot - ip bindings"

Who is online

Users browsing this forum: No registered users and 5 guests