Page MenuHomeVyOS Platform

OpenVPN site-to-site: TLS tunnel takes ~10 min to recover after the peer restarts (was ~30-60 s)
Open, NormalPublicBUG

Description

A default site-to-site OpenVPN tunnel with TLS now needs about 10 minutes to pass traffic again after the other end reboots or its tunnel is reset. On 1.5.1 the same tunnel was back in 30-60 s.

Time until traffic passes again (3 runs each, default keep-alive settings):

                                   1.5.1 <-> 1.5.1    rolling <-> rolling
peer reboots                       32 s               573 s
reset openvpn interface on peer    62 s               602 s

A rolling router talking to a 1.5.1 peer behaves the same (~507-574 s). Shared-secret tunnels come back in 1-2 s in every case. A plain 90 s link loss without a restart is not affected (0.2 s).

What happens: the restarted end reconnects after its own 60 s timer, but the other end still holds the old session and refuses it. It only drops that session when its ping-restart fires, which is now 600 s, and then reconnects in ~4 s:

openvpn-vtun1: [rtps] Inactivity timeout (--ping-restart), restarting
openvpn-vtun1: Peer Connection Initiated with [AF_INET]10.0.1.2:1195
openvpn-vtun1: Timers: ping 10, ping-restart 600

Cause
T9363 (b6abe23ba, https://github.com/vyos/vyos-1x/pull/5512) changed site-to-site to render ping-restart as interval * failure-count, so the default went from 60 s to 600 s. The timer change is intended per the commit; the longer recovery after a peer restart is its side effect, and the docs still say "default 60" for failure-count.

Suggestion
Keep the effective site-to-site default at 60 s (e.g. default failure-count 6, or a migration that keeps the old value for existing configs), or document the new recovery time in the release notes.

Details

Version
rolling
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)