Community discussions

MikroTik App
 
WildWest
just joined
Topic Author
Posts: 17
Joined: Sat Feb 23, 2019 12:02 am

OpenVPN can't reconnect (Site to Site)

Tue Apr 09, 2024 6:44 pm

This problem is being exist for a while, for several years. It does not matter on what RouterOS version, now it is 7.14.2

Here is an example:

Mikrotik Router (any model) OpenVPN client is connected to Mikrotik Router (any model or CHR) OpenVPN Server.

The client lost OpenVPN tunnel link because of unstable Internet, then it is trying to reconnect but can't.

--------------------------------------------------------------------------------------------------
The server log shows (the IP addresses are not real, for demonstration):

connection established from 172.20.1.100 port: 47301 to 172.20.1.1
172.20.1.100 using encoding - AES-256GCM...
<172.20.1.100>: disconnected <user REMOTE-VPN-USER is already active>
<172.20.1.100>: disconnected <explicit peer disconnect>

---------------------------------------------------------------------------------------------------
The client log shows:

ovpn-server: initializing, connecting, using encoding - AES-256-GCM...
warning: recvd <AUTH_FAILED, user REMOTE-VPN-USER is already active>
ovpn-server: disconnected <explicit peer disconnect>
ovpn-server: terminating... - explicit peer disconnect
ovpn-server: disconnected

----------------------------------------------------------------------------------------------------

On the Server side
There is a static OpenVPN interface, it was made specially for that user REMOTE-VPN-USER
Normally, when REMOTE-VPN-USER connected, that interface is running.
In the PPP profile we have the limit "Only One = yes" (because we do not want to have more than one VPN link established, we also do not want to have any dynamic OpenVPN interface created, because that is a Site to Site VPN between two offices)

-----------------------------------------------------------------------------------------------------

When we noticed the VPN lost the tunnel we do some actions:
On the client side: disabling/enabling VPN - does not help.

On the server side: I must disable the static VPN interface created manually for that specific user - and immediately the REMOTE-VPN-USER connected dynamically, but we do not want to have that Dynamic ovpn interface, I remove that Dynamic ovpn interface, then the REMOTE-VPN-USER reconnected to Static ovpn interface. If it does not help, then I disable/enable PPP secret (user account) and it reconnected immediately.

It looks like a bug on OpenVPN, we noticed it on any physical devices and CHR, tested on many different locations.
I am really tired to do that action every time to reconnect.

Any suggestion how to fix it?

(Please do not give me an advice to use another VPN type, we already do use different types of tunnels if we need)

Who is online

Users browsing this forum: Bing [Bot] and 31 guests