Martineau
Part of the Furniture
My VPN connection had problems three times overnight, and the VPN_Failover script /vpnclient1-route-pre-down / vpnclient1--route-up handled it perfectly. I only know by checking the log and not finding everything offline this morning.
Code:May 16 03:57:27 RT-AC86U-4608 (VPN_Failover.sh): 6965 VPN Client Monitor: Checking VPN Client 1 connection status.... May 16 03:57:33 RT-AC86U-4608 (VPN_Failover.sh): 6965 **VPN Client Monitor: Switching VPN Client 1 to VPN Client 2 (Reason: VPN Client 1 STATE=2;Connected but SLOW!) May 16 03:57:33 RT-AC86U-4608 (VPN_Failover.sh): 6965 **VPN Client Monitor: Terminating VPN Client 1 May 16 03:57:33 RT-AC86U-4608 (VPN_Failover.sh): 6965 Waiting for VPN Client 1 (VPN Unlimited Stream 1) to disconnect..... May 16 03:57:35 RT-AC86U-4608 (VPN_Failover.sh): 6965 VPN Client 1 (VPN Unlimited Stream 1) disconnect'd in 1 secs May 16 03:57:35 RT-AC86U-4608 (VPN_Failover.sh): 6965 *Warning VPN Client 2 not configured? - auto IGNORED/SKIPPED May 16 03:57:35 RT-AC86U-4608 (VPN_Failover.sh): 6965 VPN Client Monitor: Checking VPN Client 2 connection status.... May 16 03:57:35 RT-AC86U-4608 (VPN_Failover.sh): 6965 **VPN Client Monitor: Switching VPN Client 2 to VPN Client 3 (Reason: VPN Client 2 STATE=0;Disconnected) May 16 03:57:35 RT-AC86U-4608 (VPN_Failover.sh): 6965 *Warning VPN Client 3 not configured? - auto IGNORED/SKIPPED May 16 03:57:35 RT-AC86U-4608 (VPN_Failover.sh): 6965 VPN Client Monitor: Checking VPN Client 3 connection status.... May 16 03:57:35 RT-AC86U-4608 (VPN_Failover.sh): 6965 **VPN Client Monitor: Switching VPN Client 3 to VPN Client 4 (Reason: VPN Client 3 STATE=0;Disconnected) May 16 03:57:35 RT-AC86U-4608 (VPN_Failover.sh): 6965 *Warning VPN Client 4 not configured? - auto IGNORED/SKIPPED May 16 03:57:35 RT-AC86U-4608 (VPN_Failover.sh): 6965 VPN Client Monitor: Checking VPN Client 4 connection status.... May 16 03:57:35 RT-AC86U-4608 (VPN_Failover.sh): 6965 **VPN Client Monitor: Switching VPN Client 4 to VPN Client 5 (Reason: VPN Client 4 STATE=0;Disconnected) May 16 03:57:35 RT-AC86U-4608 (VPN_Failover.sh): 6965 *Warning VPN Client 5 not configured? - auto IGNORED/SKIPPED May 16 03:57:35 RT-AC86U-4608 (VPN_Failover.sh): 6965 VPN Client Monitor: Checking VPN Client 5 connection status.... May 16 03:57:35 RT-AC86U-4608 (VPN_Failover.sh): 6965 **VPN Client Monitor: Switching VPN Client 5 to VPN Client 1 (Reason: VPN Client 5 STATE=0;Disconnected) May 16 03:57:35 RT-AC86U-4608 (VPN_Failover.sh): 6965 Waiting for VPN Client 1 (VPN Unlimited Stream 1) to connect..... May 16 03:57:55 RT-AC86U-4608 (VPN_Failover.sh): 14860 v1.15 1 delay=60 May 16 03:57:55 RT-AC86U-4608 (VPN_Failover.sh): 6965 VPN Client 1 (VPN Unlimited Stream 1) connect'd in 18 secs
Nice to know my shoddy coding skills work on occasion!
I suppose I should rewrite the logic to better handle the 'noise' such as
Code:
*Warning VPN Client 2 not configured? - auto IGNORED/SKIPPED
Also, whilst VPN_Failover.sh does "what it says on the tin", it should ultimately become redundant if the reason for the restart was formally identified
i.e. is reduced performance/throughput truly the reason?
Code:
**VPN Client Monitor: Switching VPN Client 1 to VPN Client 2 (Reason: VPN Client 1 STATE=2;Connected but SLOW!)
Last edited: