L2TP session time limit

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?

In the /ppp profile you can use the session-timeout parameter…
https://wiki.mikrotik.com/wiki/Manual:PPP_AAA

Thank you! You saved me!