Skip to content

Instantly share code, notes, and snippets.

@imneonizer
Last active October 27, 2020 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imneonizer/2c0bab3a560a3b74e1bd839804ebe13b to your computer and use it in GitHub Desktop.
Save imneonizer/2c0bab3a560a3b74e1bd839804ebe13b to your computer and use it in GitHub Desktop.

install OpenVPN-3 client for Ubuntu 18.04

sudo apt-get install apt-transport-https -y
wget https://swupdate.openvpn.net/repos/openvpn-repo-pkg-key.pub
sudo apt-key add openvpn-repo-pkg-key.pub

export DISTRO='bionic'
wget -O /etc/apt/sources.list.d/openvpn3.list https://swupdate.openvpn.net/community/openvpn3/repos/openvpn3-$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