How to Auto Start OpenVPN Client on Ubuntu Bionic
Launch OpenVPN client as a daemon.
Here I assume you already have your own cert file: filename.ovpn
. 🙂
Modify its file extension to a conf
file like so:
|
|
Move the file inside /etc/openvpn
directory like so:
|
|
OpenVPN client service name would be openvpn@filename
.
Well, you might already know what to do to launch the service.
Reload the system daemons.
|
|
That’s it. 🙂
If you have username
and password
for the certfile, you need this step
Make a credential file like so:
|
|
Enter the following into the file.
Open your certfile to edit.
|
|
Add this line or edit it if it already exists.
|
|
If you want to launch it manually each time, I recommend a shell script
Write a shell script with the following contents.
You can now use the script file whenever you need it, even on startup.
Happy networking! 🙂