Skip to content

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 apt package manager must be available, and no other processes should be holding locks on dpkg or apt.

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:

  1. Script Acquisition: The installation script openvpn-install.sh is downloaded from the official repository to the /root/ directory.

  2. 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 using dpkg --configure -a.

  3. Automated Installation: The installation script is executed with the following parameters:

  4. AUTO_INSTALL="y": This flag enables unattended installation, bypassing interactive prompts.

  5. CLIENT="client_hk": Specifies the name for the initial client configuration.

  6. Execution Command:

    /root/openvpn-install.sh install
    

Access Rights and Security

  • Script Permissions: The installation script is assigned 0700 permissions, 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:

/root/openvpn-install.sh install

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.

question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×