Remove ghost connections (inactive users) on OpenVPN/PPTP

I have OpenVPN server and PPTP server setup on a Mikrotik RB2011iL (v7.1.1). The problem I’m running into is that when users are supposedly dropped off/disconnect due to inactivity, the ‘Active Connections’ tab still shows those users active. I’ve used the command /ppp active print to see which connections are live and which aren’t and I can clearly see that connections that aren’t live are still showing up as active. The only way I can “clear” it and for the ‘Active Connections’ tab to show properly is to restart the Mikrotik, which removes ghost connections and also active connections as well.

Any thoughts on how to clear those ghost connections without having to restart the Mikrotik? Thank you for your assistance!

Any thoughts?

I didn’t test it, but perhaps idle timeout in PPP profile?

Thank you for replying.

I tried that option (PPP Profile → Limits) and changed ‘Idle Timeout’ to 10 mins, but the connection is still showing connected under ‘Active Connections’ and hasn’t been removed.

I went into the log to see when this happened, here’s what I’m seeing. It appears whatever happened at 12:42 is what started this issue:

feb/01 09:32:28 ovpn,info connection established from , port: 62633
feb/01 09:32:30 ovpn,info : using encoding - AES-256-CBC/SHA1
feb/01 09:32:30 ovpn,info,account logged in, 10.10.118.250 from
feb/01 09:32:31 ovpn,info : connected
feb/01 12:42:52 ovpn,info : terminating… - nothing received for a while
feb/01 12:42:52 ovpn,info,account username logged out, (some numbers) from
feb/01 12:42:52 ovpn,info : disconnected

feb/01 14:45:56 ovpn,info connection established from , port: 54254
feb/01 14:45:58 ovpn,info : using encoding - AES-256-CBC/SHA1
feb/01 14:45:58 ovpn,info,account logged in, 10.10.118.250 from
feb/01 14:45:58 ovpn,info : connected
feb/01 14:46:38 ovpn,info : terminating… - peer disconnected
feb/01 14:46:38 ovpn,info,account username logged out, (some numbers) from
feb/01 14:46:38 ovpn,info : disconnected

I have this too.
If I remove the session (the ghost and the active) from the active session tab in order to trigger new connection, later it shows the ghost connection again.
Like you said, currently I should reboot the router to remove it.

What I have done without success:

  1. Remove ghost session from active connection tab.
  2. Remove ghost + active session
  3. Remove ghost + active session, and ovpn interface
  4. Disable enable OVPN server
  5. Change keepalive time out

Any thougt?

Any have solution? Have same problem since 2022