Install and Setup OpenVPN Server on Linux

Exported on 22-Sep-2021 14:43:23

Installs OpenVPN Server On Linux Servers With AttuneOps

This Blueprint Installs OpenVPN VPN Server On Linux Servers

OpenVPN provides flexible VPN solutions for businesses to secure all data communications and extend private network services while maintaining security.

Attune makes it easy with this blueprint to launch a OpenVPN server in few clicks on any Linux server.

Pre-Blueprint Attune setup
  1. On the Inputs tab, create a Linux node for the host you wish to install the stack on.
  2. On the Inputs tab, create Linux credentials to connect to the host you wish to install the stack on.
Steps Involved
  • Upload a bash script to install OpenVPN
  • Configure and install the OpenVPN server

Parameters

Name Type Script Reference Default Value Comment
Linux Node Linux / Unix Server linuxNode
Linux User Linux OS Credential linuxUser

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.

Then 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