Install and Setup OpenVPN Server on Linux

Exported on 23-Aug-2021 15:31:03

Parameters

Name Type Script Reference Default Value Comment
s1 Linux / Unix Server s1
s1c Linux OS Credential s1c

1 - Upload OpenVPN Installer Script

Uploads an OpenVPN installer script written in Bash

The connection details have changed from the last step.

Login as user on node

Connect via SSH
ssh user@hostname
Deploy archive openvpn-installer.sh.zip to remote path attune_uploads
  1. Locate Files archive "openvpn-installer.sh.zip", This can be downloaded from Attune
  2. Copy the Files archive to the server
  3. Extract the root of the Files archive to attune_uploads, relative to the home directory
  4. Check that the files are in the correct location

2 - Make Installer File Executable

Makes the installer file executable.

Login as user on node

Connect via SSH
ssh user@hostname
This is a Bash Script make sure you run it with bash -l from a terminal session
chmod +x ~/attune_uploads/openvpn-install.sh

3 - Run OpenVPN Server Installer

Runs the installer to setup a OpenVPN server on the target machine.

Once done, you can download the client configuration file using scp, sftp or transfer.sh

To download the OpenVPN configuration file quickly with transfer.sh run the following command:

curl --upload-file ~/client.ovpn https://transfer.sh

Once downloaded, use this configuration file with your favourite VPN client to connect to the VPN server.

Login as user on node

Connect via SSH
ssh user@hostname
This is a Bash Script make sure you run it with bash -l from a terminal session
sudo AUTO_INSTALL=y ~/attune_uploads/openvpn-install.sh