Auto Connect OpenVPN Client Startup

2020-05-07 · Linux

How to have an OpenVPN client connect on system Startup. How to set up a persistant OpenVPN client connection.

Ensure *.conf file is located in /etc/openvpn/
*.ovpn files will not work, they will need to be renamed to *.conf.
Renaming a ovpen file to conf is ok and does work.

Edit /etc/default/openvpn

  • Ensure a similar line below exist.
  • Ensure the value does not have an extension.
  • Ensure the value matches the certificate name.

AUTOSTART=”ClientName”

Example: Lets say there is a client certificate called LocationB and the config/settings file is called LocationB.ovpn.
Copy LocationB.ovpn into /etc/openvpn/LocationB.conf
Then add a line into /etc/default/openvpn
AUTOSTART=”LocationB”

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.