How to connect OpenVPN client in Ubuntu 22
In linux, Open VPN client is connected using the configuration file.
First, Install the open vpn3 client.
#apt install apt-transport-https curl#mkdir -p /etc/apt/keyrings#curl -sSfL https://packages.openvpn.net/packages-repo.gpg >/etc/apt/keyrings/openvpn.asc#echo "deb [signed-by=/etc/apt/keyrings/openvpn.asc] https://packages.openvpn.net/openvpn3/debian DISTRIBUTION main" >>/etc/apt/sources.list.d/openvpn3.listReplace the DISTRIBUTION in the above command with yours. For me mine is "jammy"#apt update#apt install openvpn3Now you have installed openvpn3 in your ubuntu machine.Type openvpn3 --help you will see bunch of commands.Second, we need to generate the configuration file from the open vpn server
Login to your openvpn Admin UIUnder User Management, select User ProfilesClick on the "New Profile" for the user which you want to connectGenerate the profileDownload the profile fileThird, connect the VPN client
# openvpn3 session-start --config {path to the above configuration file}Enter your username (only username no need for username@IP)Enter passwordIt connects, please make sure don't close this terminal. If you need you can run as a background process.