OpenVPN Windows auto-restart: Difference between revisions

From EnigmaGuy Wiki
Jump to navigation Jump to search
(Created page with "= Installation = == Creating a task in a task scheduler == # File:Snap1.png # File:Snap2.png # File:Snap3.png # File:Snap4.png # File:Snap5.png # File:Sn...")
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
= About script / Usage =
Sometimes OpenVPN daemon on Windows or even Linux get stuck. One of the not so clean but working solution is to automatically restart the OpenVPN daemon so it will be indefinitely connected. I know that normally OpenVPN daemon tries to automatically reconnect but as I said it does not always works as expected minimally from my own experience.
This documentation is split to two parts. On second part (Script code) you will find a script itself (saved on GitHub) and on the first installation part there are screenshots how to configure it using Windows Scheduler to run script automatically every hour.
= Installation =
= Installation =
== Creating a task in a task scheduler ==
== Creating a task in a task scheduler ==
Line 10: Line 15:


== Script code ==
== Script code ==
[https://github.com/koss822/misc/blob/master/openvpn/restart/win/OpenVPNAutoRestart.ps1 OpenVPNAutoRestart.ps1 on GitHub.com]
[https://github.com/koss822/misc/blob/master/Linux/Projects/openvpn/restart/win/OpenVPNAutoRestart.ps1 OpenVPNAutoRestart.ps1 on GitHub.com]

Latest revision as of 07:06, 17 September 2019

About script / Usage

Sometimes OpenVPN daemon on Windows or even Linux get stuck. One of the not so clean but working solution is to automatically restart the OpenVPN daemon so it will be indefinitely connected. I know that normally OpenVPN daemon tries to automatically reconnect but as I said it does not always works as expected minimally from my own experience.

This documentation is split to two parts. On second part (Script code) you will find a script itself (saved on GitHub) and on the first installation part there are screenshots how to configure it using Windows Scheduler to run script automatically every hour.

Installation

Creating a task in a task scheduler

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  

Script code

OpenVPNAutoRestart.ps1 on GitHub.com