K
K
kodi2013-12-26 10:36:47
VPN
kodi, 2013-12-26 10:36:47

How to implement vpn connection log on mikrotik?

By default, the memory log contains brief information about who and what time connected / disconnected. But when a bunch of other events pour in this log, information on vpn connections goes away. Therefore, it must be written in a separate log.
But if you write from a topic, for example, pptp, then there is a large amount of debugging information that is not needed and in the logs it appears as "pptp debug packet". And you only need "pptp ppp info".
How to implement?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Stepan, 2013-12-26
@kodi

Create a new log for yourself in System/logging with Topics=pptp,ppp,info,account

S
Sergey, 2013-12-26
@edinorog

syslog on the side and filter. =) not?
MikroTik Syslog Daemon

M
masterworm, 2021-11-25
@masterworm

In the corresponding PPP profile, you can add scripts to connect / disconnect users:
UP

:local pppuser
:local localAddr
:local remoteAddr
:local callerId
:local calledId
:local interfaceName
 
:set pppuser $"user"
:set localAddr $"local-address"
:set remoteAddr $"remote-address"
:set callerId $"caller-id"
:set calledId $"called-id"
:set interfaceName [/interface get $interface name] 

:log info message="$interfaceName $callerId @ $remoteAddr connected"

DOWN
:local pppuser
:local localAddr
:local remoteAddr
:local callerId
:local calledId
:local interfaceName
 
:set pppuser $"user"
:set localAddr $"local-address"
:set remoteAddr $"remote-address"
:set callerId $"caller-id"
:set calledId $"called-id"
:set interfaceName [/interface get $interface name] 

:log info message="$callerId @ $remoteAddr disconnected"

Well, of course, create a log with Topics=script,info in System/logging, and write it to a separate file, for example.
The content of the message in the log can be customized

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question