Install OpenVPN with Angristan Script

Ubuntu: Install OpenVPN with Angristan Script

The Angristan OpenVPN Install Script is a widely used automation tool that sets up a secure OpenVPN server in minutes. It supports Ubuntu, Debian, CentOS, Fedora, Arch Linux, and more. This guide explains how to install and configure OpenVPN on Ubuntu using this script.


Step 1: Download the Script

curl -O https://raw.githubusercontent.com/angristan/openvpn-install/master/openvpn-install.sh

chmod +x openvpn-install.sh


Step 2: Run the Script (Interactive Mode)

sudo ./openvpn-install.sh

The interactive menu will guide you through installation, asking for:

  • Protocol (UDP or TCP)
  • Port (default 1194)
  • DNS provider (Cloudflare, Google, Quad9, etc.)
  • Encryption settings
  • Client name for initial configuration

Step 3: Generate Client Configuration Files

After installation, the script creates .ovpn files in your home directory. These files are used by clients to connect.

Example to add a new client:

sudo ./openvpn-install.sh client add alice


Step 4: Manage Clients

List all clients:

sudo ./openvpn-install.sh client list

Revoke a client:

sudo ./openvpn-install.sh client revoke alice

Renew a client certificate:

sudo ./openvpn-install.sh client renew bob --cert-days 365


Step 5: Server Management

Check connected clients:

sudo ./openvpn-install.sh server status

Renew server certificate:

sudo ./openvpn-install.sh server renew

Uninstall OpenVPN:

sudo ./openvpn-install.sh uninstall


Step 6: Connect from Client

Transfer the .ovpn file to your client device and connect using the official OpenVPN client:

sudo openvpn --config alice.ovpn


Best Practices

  • Use UDP on port 1194 for best performance
  • Always generate unique certificates for each client
  • Enable firewall rules to allow VPN traffic
  • Use tls-crypt-v2 for enhanced security
  • Regularly rotate keys and monitor logs in /var/log/openvpn.log

Note: HostPalace offers managed VPN hosting solutions with OpenVPN pre-configured for secure client access.