Community discussions

MikroTik App
 
User avatar
Kamaz
newbie
Topic Author
Posts: 43
Joined: Sun Apr 30, 2017 9:35 am

L2TP session time limit

Fri Oct 08, 2021 8:59 pm

Hi there.
Can anybody help me with script creation? I'd like to limit L2TP session time as 8 hours.
So the idea is to get time when user connected to VPN and drop it's connection in a 8 hours. The only idea I have is to pars logs and get connection time from there. Or from connection itself.


TO start with I tested command
> interface l2tp-server print
 #     NAME            USER                MTU CLIENT-ADDRESS            UPTIME   ENCODING           
 0     L2TP server-... l2tp-xxx  
 1 X   L2TP server-... l2tp-yyyy  
 2   R L2TP server-AC2 l2tp-zzzzz           1450 xx.xx.xx.xx             10h23... cbc(aes).
but at the same time command
 > interface l2tp-server get "L2TP server-AC2" uptime
gives me nothing.

So I need to get uptime value for every VPN user and drop it in case it's uptime more than 8h

Any thought and suggestions?
 
Zacharias
Forum Guru
Forum Guru
Posts: 2747
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: L2TP session time limit  [SOLVED]

Sat Oct 09, 2021 8:25 pm

In the /ppp profile you can use the session-timeout parameter...
https://wiki.mikrotik.com/wiki/Manual:PPP_AAA
 
User avatar
Kamaz
newbie
Topic Author
Posts: 43
Joined: Sun Apr 30, 2017 9:35 am

Re: L2TP session time limit

Tue Oct 12, 2021 4:39 pm

In the /ppp profile you can use the session-timeout parameter...
https://wiki.mikrotik.com/wiki/Manual:PPP_AAA
Thank you! You saved me!

Who is online

Users browsing this forum: No registered users and 10 guests