Skip to content

Instantly share code, notes, and snippets.

What would you like to do?

install OpenVPN-3 client for Ubuntu 18.04

sudo apt-get install apt-transport-https -y
sudo apt-key add

export DISTRO='bionic'
wget -O /etc/apt/sources.list.d/openvpn3.list$DISTRO.list
sudo apt-get update -y
sudo apt-get install openvpn3 -y

Supported distributions:

Distribution Release Release name ($DISTRO)
Debian 9 stretch
Debian 10 buster
Ubuntu 16.04 xenial
Ubuntu 18.04 bionic
Ubuntu 19.10 eoan
Ubuntu 20.04 focal

OpenVPN alias config

Generate you OpenVPN configuration file OpenVPN-Config.ovpn and place it at /ovpn/OpenVPN-Config.ovpn.
Add alias to the ~/.bashrc file

echo 'alias ovpc="openvpn3 session-start --config /ovpn/OpenVPN-Config.ovpn"' >> ~/.bashrc
echo 'alias ovps="openvpn3 sessions-list"' >> ~/.bashrc
echo 'alias ovpd="openvpn3 session-manage --config /ovpn/OpenVPN-Config.ovpn --disconnect"' >> ~/.bashrc
  1. Connect to the VPN: ovpc
  2. List current active session: ovps
  3. Disconnect VPN: ovpd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment