This issue we have is that our Identity provider (Okta) has a hard retry limit for push notifications and the OpenVPN client will retry those push notifications indefinitely with no way that I can find to disable or limit the retry. As discussed in the support ticket, the --connect-retry-max behaviour is exactly what is wanted (to say if the user hasn't acknowledged after x attempts then stop) but doesn't apply to this case as the connection has already been established.
So where we currently get the following, where if no push reply is found, the client process restarts and tries again:
Jun 08 16:59:12 openvpn[29543]: [{vpn-host}] Peer Connection Initiated with [AF_INET]{vpn-ip}:1194
Jun 08 16:59:13 openvpn[29543]: SENT CONTROL [{vpn-host}]: 'PUSH_REQUEST' (status=1)
Jun 08 16:59:18 openvpn[29543]: SENT CONTROL [{vpn-host}]: 'PUSH_REQUEST' (status=1)
Jun 08 16:59:24 openvpn[29543]: SENT CONTROL [{vpn-host}]: 'PUSH_REQUEST' (status=1)
Jun 08 16:59:29 openvpn[29543]: SENT CONTROL [{vpn-host}]: 'PUSH_REQUEST' (status=1)
Jun 08 16:59:34 openvpn[29543]: SENT CONTROL [{vpn-host}]: 'PUSH_REQUEST' (status=1)
Jun 08 16:59:39 openvpn[29543]: SENT CONTROL [{vpn-host}]: 'PUSH_REQUEST' (status=1)
Jun 08 16:59:44 openvpn[29543]: SENT CONTROL [{vpn-host}]: 'PUSH_REQUEST' (status=1)
Jun 08 16:59:50 openvpn[29543]: SENT CONTROL [{vpn-host}]: 'PUSH_REQUEST' (status=1)
Jun 08 16:59:55 openvpn[29543]: SENT CONTROL [{vpn-host}]: 'PUSH_REQUEST' (status=1)
Jun 08 17:00:00 openvpn[29543]: SENT CONTROL [{vpn-host}]: 'PUSH_REQUEST' (status=1)
Jun 08 17:00:05 openvpn[29543]: SENT CONTROL [{vpn-host}]: 'PUSH_REQUEST' (status=1)
Jun 08 17:00:10 openvpn[29543]: SENT CONTROL [{vpn-host}]: 'PUSH_REQUEST' (status=1)
Jun 08 17:00:16 openvpn[29543]: No reply from server after sending 12 push requests
Jun 08 17:00:16 openvpn[29543]: SIGUSR1[soft,no-push-reply] received, process restarting
Jun 08 17:00:16 openvpn[29543]: Restart pause, 5 second(s)
Jun 08 17:00:21 openvpn[29543]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Jun 08 17:00:21 openvpn[29543]: TCP/UDP: Preserving recently used remote address: [AF_INET]{vpn-ip}:1194
Jun 08 17:00:21 openvpn[29543]: Socket Buffers: R=[212992->212992] S=[212992->212992]
Jun 08 17:00:21 openvpn[29543]: UDP link local: (not bound)
Jun 08 17:00:21 openvpn[29543]: UDP link remote: [AF_INET]{vpn-ip}:1194
Jun 08 17:00:21 openvpn[29543]: TLS: Initial packet from [AF_INET]{vpn-ip}:1194, sid=1b24aaa3 232fcdc3
Jun 08 17:00:21 openvpn[29543]: VERIFY OK: depth=2, {cert-info}
Jun 08 17:00:21 openvpn[29543]: VERIFY OK: depth=1, {cert-info}
Jun 08 17:00:21 openvpn[29543]: VERIFY KU OK
Jun 08 17:00:21 openvpn[29543]: Validating certificate extended key usage
Jun 08 17:00:21 openvpn[29543]: ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
Jun 08 17:00:21 openvpn[29543]: VERIFY EKU OK
Jun 08 17:00:21 openvpn[29543]: VERIFY X509NAME OK: {cert-info}
Jun 08 17:00:21 openvpn[29543]: VERIFY OK: depth=0, {cert-info}
Jun 08 17:00:21 openvpn[29543]: Control Channel: TLSv1.2, cipher TLSv1.2 ECDHE-ECDSA-AES256-GCM-SHA384, 384 bit EC, curve: secp384r1
Jun 08 17:00:21 openvpn[29543]: [{vpn-host}] Peer Connection Initiated with [AF_INET]{vpn-ip}:1194
Jun 08 17:00:22 openvpn[29543]: SENT CONTROL [{vpn-host}]: 'PUSH_REQUEST' (status=1)
I would ideally like to be able limit the OpenVPN client process restarting after receiving SIGUSR1[soft,no-push-reply]. To clarify we are not getting 12 push notifications sent as implied:
No reply from server after sending 12 push requests
The user is sent 1 and the client seems to poll to see if that notification has been accepted and gives up after 12. Then the process restarts, user gets another push notification, etc, and those restarts continue indefinitely.
I thought the OpenVPN community support forum might have some suggestions if there's any way to configure the OpenVPN client in such a way. Maybe someone else had had a similar issue with push notifications.