Deployment Overview of OpenVPN on Server¶
Prerequisites and Basic Requirements¶
To ensure a successful deployment, the following requirements must be met:
-
Operating System: Ubuntu.
-
Privileges: Root or sudo access is required to execute installation scripts and manage system packages.
-
Network Access: The server must have outbound internet access to download the installation script from GitHub.
-
Package Management: The
aptpackage manager must be available, and no other processes should be holding locks ondpkgorapt.
FQDN of the final panel on the hostkey.in domain¶
| Parameter | Value |
|---|---|
| Prefix | OpenVPN |
| Domain | hostkey.in |
| Full template | OpenVPN{Server_ID_from_Invapi}.hostkey.in |
Application installation process¶
The application is installed using a specialized shell script that automates the configuration of the OpenVPN service and client credentials. The process follows these steps:
-
Script Acquisition: The installation script
openvpn-install.shis downloaded from the official repository to the/root/directory. -
System Readiness: The system checks for any active package management locks (
dpkg,apt) and waits for them to be released to prevent conflicts. It also ensures that any interrupted package configurations are finalized usingdpkg --configure -a. -
Automated Installation: The installation script is executed with the following parameters:
-
AUTO_INSTALL="y": This flag enables unattended installation, bypassing interactive prompts. -
CLIENT="client_hk": Specifies the name for the initial client configuration. -
Execution Command:
Access Rights and Security¶
-
Script Permissions: The installation script is assigned
0700permissions, ensuring it can only be executed by the root user. -
Firewall: The installation process configures necessary network rules to allow VPN traffic through the designated OpenVPN ports.
Custom Scripts and Additional Setup¶
The deployment includes an initial setup script used for environment configuration:
-
Location of script:
/root/openvpn-install.sh -
Purpose: This script handles the downloading of dependencies, installation of the OpenVPN service, generation of Certificate Authority (CA) files, and creation of client certificates and configuration profiles.
Application Update Instructions¶
To update the OpenVPN application, you must re-run the installation script to ensure all components and security patches are current:
Location of configuration files and data¶
The following paths are used for core application components:
-
Installation Script:
/root/openvpn-install.sh -
Configuration and Certificates: Managed by the OpenVPN service (typically located in
/etc/openvpn/).
Available ports for connection¶
The specific port is determined during the execution of the installation script, but it is typically used for UDP traffic to facilitate VPN tunneling.