Community discussions

MikroTik App
 
videolab
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 59
Joined: Mon Feb 25, 2008 12:41 am

Session Timeout in User Profile

Sat Aug 09, 2014 8:28 am

I created 20 user in hotspot (no radius, no user-manager) with a limit of 10 hours/day, with script at 00:00.

Problem:
In User Profile, the session timeout is set to 1 hour, this does not work...


http://wiki.mikrotik.com/wiki/Manual:IP/Hotspot/User
session-timeout (time; Default: 0s) Allowed session time for client. After this time, the user is logged out unconditionally
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Session Timeout in User Profile

Sat Aug 09, 2014 4:18 pm

It did last time I checked. Look in "/ip hotspot active" and see what that client shows under "session time left".

Once the client is logged out, there is nothing to prevent the client from logging in again unless you use some other way of preventing the login. If you have "login-by=cookie" in "/ip hotspot profile", the client will log in again transparently, appearing that the client never logged out.
 
videolab
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 59
Joined: Mon Feb 25, 2008 12:41 am

Re: Session Timeout in User Profile

Sat Aug 09, 2014 7:55 pm

Mac-cookies are not active


session-timeout (time; Default: 0s) Allowed session time for client. After this time, the user is logged out unconditionally
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Session Timeout in User Profile

Sat Aug 09, 2014 8:08 pm

The user is logged out unconditionally. That does NOT mean the user cannot log back in immediately!

I use FreeRADIUS and send a WISPr-Session-Terminate-Time with the Access-Accept message instead of session-timeout. That will prevent a client from logging back in.
http://wiki.mikrotik.com/wiki/Manual:RA ... ess-Accept

Does it show a session-time-left in "/ip hotspot active"?
 
videolab
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 59
Joined: Mon Feb 25, 2008 12:41 am

Re: Session Timeout in User Profile

Sat Aug 09, 2014 8:23 pm

I want that the user has the 1 hour session.....the user to continue using the connection? again login.
what's the problem?
If user downloads files from the internet or another, the session continues for a long time ... I do not want this.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Session Timeout in User Profile

Sat Aug 09, 2014 8:37 pm

If you do not see a value here, it isn't working.
Does it show a session-time-left in "/ip hotspot active"?
 
videolab
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 59
Joined: Mon Feb 25, 2008 12:41 am

Re: Session Timeout in User Profile

Sat Aug 09, 2014 8:45 pm

Sorry
You do not have the required permissions to view the files attached to this post.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Session Timeout in User Profile

Sat Aug 09, 2014 9:13 pm

I just tested mine. Here is the result from "/ip hotspot active".
UPTIME + SESSION-TIME-LEFT = 1 hour.
[admin@test] /ip hotspot active> pri
Flags: R - radius, B - blocked
# USER ADDRESS UPTIME SESSION-TIME-LEFT IDLE-TIMEOUT
0 tim 192.168.1.254 4m53s 55m7s 1d
[admin@test] /ip hotspot active>
I will wait until the time expires to check the logout function.
 
videolab
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 59
Joined: Mon Feb 25, 2008 12:41 am

Re: Session Timeout in User Profile

Sat Aug 09, 2014 9:22 pm

user 207nx4 use whatsapp in smartphones, every minute there are data packets in the network.
this situation for a long time.
You do not have the required permissions to view the files attached to this post.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Session Timeout in User Profile

Sat Aug 09, 2014 9:26 pm

I just checked my Winbox, and it is showing the correct times there also. Why is your display showing an 'R' before the line number in "ip hotspot active"? That is supposed to indicate you are using a radius server for authentication. I'm using a user from my router database in "/ip hotspot user".
 
videolab
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 59
Joined: Mon Feb 25, 2008 12:41 am

Re: Session Timeout in User Profile

Sat Aug 09, 2014 9:30 pm

Excuse my insistence, it is a rule for my hotspot.
All my user have seven days of the Internet, the session must last 1 hour max.
I think I need to write scripts for this problem.

This problem is also on other hotspot without radius, see image...another RB (v5.26)
You do not have the required permissions to view the files attached to this post.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Session Timeout in User Profile

Sat Aug 09, 2014 9:43 pm

Are you sure those users are using the default profile? The 'R' indicates you are using a RADIUS server for auth. Note the lack of a 'R' on the second active list.

What version RouterOS are you using?

I've got 25 minutes to go on my one hour session timeout.
 
videolab
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 59
Joined: Mon Feb 25, 2008 12:41 am

Re: Session Timeout in User Profile

Sat Aug 09, 2014 10:00 pm

They are 2 different routers.
first router CCR v.6.18 with user manager
second router RB951 v.5.26 without radiur or user manager
the problem is the same

I think the problem is with your smartphone, tablet, etc.. Whatsapp, Skype, youtube in layer7, etc.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Session Timeout in User Profile

Sat Aug 09, 2014 10:11 pm

I'm using v6.9. It logged me out after 1 hour. I had to log in again.

Maybe it is your script. You should post it so I can try it.

It is not a problem here. This is your problem. I was testing with a YouTube video running during the last few minutes to insure it cut off the video when the time ran out, and it did.
 
videolab
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 59
Joined: Mon Feb 25, 2008 12:41 am

Re: Session Timeout in User Profile

Sat Aug 09, 2014 10:36 pm

what time do you set idle-timeout in Hotspot server
I have 5 min, is a short time?
 
videolab
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 59
Joined: Mon Feb 25, 2008 12:41 am

Re: Session Timeout in User Profile

Sat Aug 09, 2014 10:42 pm


It is not a problem here. This is your problem. I was testing with a YouTube video running during the last few minutes to insure it cut off the video when the time ran out, and it did.
use with the iPhone or Android app
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Session Timeout in User Profile

Sat Aug 09, 2014 11:04 pm

I have my idle timeout set high (1 day) so I can run tests like these without having to download something every few minutes.

I'm now running this test on my iPhone 5. I have 58 minutes to go.

edit: This is more difficult on my iPhone. When it goes into standby, it disconnects from my wifi and that logs me out.

update: After one hour, the hotspot logged out my iPhone during a YouTube video.
 
videolab
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 59
Joined: Mon Feb 25, 2008 12:41 am

Re: Session Timeout in User Profile

Tue Aug 12, 2014 11:48 pm

I see that the traffic generated by user does not interrupt the session automatically with session-timeout

solved with this script in schedule time 5 min.

:foreach i in=[/ip hotspot active find] do={
:if ([/ip hotspot active get $i uptime]>01:00:00) do={
/ip hotspot active remove $i
}
}

Who is online

Users browsing this forum: anav, Google [Bot], PLJ020 and 86 guests