OpenVPN Windows auto-restart

From EnigmaGuy Wiki
Revision as of 07:06, 17 September 2019 by Enigmaguy (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

Script code

OpenVPNAutoRestart.ps1 on GitHub.com