OpenVPN disconnects from the raspberry pi after after 1 day to 7 days

@zach Hey Zach, this will be my last. You have been a great help with me these past couple of messages.

I don’t know if this forum would be helpful but when using Pritunl’s openvpn profiles to be used on the openvpn.client daemon, it connects to the Pritunl server and works; however, there are times after 1 to 7 days that it disconnects randomly where the raspberry pi is still on. Here’s the kicker, the openvpn.client daemon still has the ip oftun01 interface when running ifconfig. I’m wondering if this is an issue on Pritunl’s side or OpenVPN side. We are considering having a ping to automatically reconnect for the time being until we can move to pritunl-client but this is not very helpful for the long run.

Logs from Pritunl server show nothing out of the ordinary so I’m unsure Pritunl would be causing the issue:

[thawing-waters-3697] 2025-11-12 13:28:06 97.235.208.102:53995 [68f0f0c9e42fae28fc1a8680] Peer Connection Initiated with [AF_INET6]::ffff:97.235.208.102:53995
[thawing-waters-3697] 2025-11-12 13:28:06 68f0f0c9e42fae28fc1a8680/97.235.208.102:53995 MULTI_sva: pool returned IPv4=10.40.0.2, IPv6=(Not enabled)
[thawing-waters-3697] 2025-11-12 13:28:06 68f0f0c9e42fae28fc1a8680/97.235.208.102:53995 AEAD Decrypt error: bad packet ID (may be a replay): [ #27 ] – see the man page entry for --no-replay and --replay-window for more info or silence this warning with --mute-replay-warnings
[thawing-waters-3697] 2025-11-12 13:28:40 68f0f0c9e42fae28fc1a8680/97.235.208.102:53995 NOTE: --mute triggered…
[thawing-meadow-8615] 2025-11-12 13:43:14 55 variation(s) on previous 3 message(s) suppressed by --mute
[thawing-meadow-8615] 2025-11-12 13:43:14 TLS Error: cannot locate HMAC in incoming packet from [AF_INET6]::ffff:20.64.104.177:37815
[thawing-meadow-8615] 2025-11-12 13:43:32 68e819d8e42fae28fc0d9314/97.235.208.102:64066 AEAD Decrypt error: bad packet ID (may be a replay): [ #573 ] – see the man page entry for --no-replay and --replay-window for more info or silence this warning with --mute-replay-warnings
[thawing-meadow-8615] 2025-11-12 13:44:13 68e819d8e42fae28fc0d9314/97.235.208.102:64066 NOTE: --mute triggered…
[thawing-waters-3697] 2025-11-12 14:22:13 68f0f0c9e42fae28fc1a8680/97.235.208.102:53995 96 variation(s) on previous 3 message(s) suppressed by --mute
[thawing-waters-3697] 2025-11-12 14:22:13 User disconnected user_id=68f0f0c9e42fae28fc1a8680
[thawing-waters-3697] 2025-11-12 14:22:13 68f0f0c9e42fae28fc1a8680/97.235.208.102:53995 [68f0f0c9e42fae28fc1a8680] Inactivity timeout (–ping-restart), restarting

Would like any help on why this occurs.

That warning suggests some network disruption occurred. It’s only a warning that alone won’t cause the connection to end. The network disruption likely continued causing the connection to eventually end. Even without the Pritunl Client you should be able to configure OpenVPN with a systemd unit and set Restart=always to automatically reconnect.