Answer the question
In order to leave comments, you need to log in
How to send logs from Mikrotika about vpn client connection time?
How to send logs from Mikrotika about vpn client connection time to another syslog server?
Is the question in the logging script itself?
Answer the question
In order to leave comments, you need to log in
In system -> logging add an action with the remote type and specify the server address.
Then, in the rules, specify the necessary topics (l2tp, ppp, info - for example) with the previously created action.
Although it is better to log everything at once. You never know what will be needed in the future
use radius server for authorization. In it you will immediately see both the connection time and the disconnect time ....
In the L2TP profile, write a script for the OnUp event
: local email "[email protected]"
/tool e-mail send to=$email subject="User $user connected to VPN" body="User $user connected to $[/ppp active get [/ppp active find where name=$user caller-id=$"caller-id" address=$"remote-address"] service] at $[/system clock get time].\r\nIP-address of this user - $"caller-id".\r\nUser's info - apps.db.ripe.net/search/query.html?searchtext=$ "caller-id""
On OnDown event
:local email "[email protected] com"
/tool e-mail send to=$email subject="User $user disconnected from VPN" body="User $user disconnected at $[/system clock get time]."
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question