


Now, you can choose the DNS resolver to use this is another optional choice. In this step, you can type a different port to use or hit ENTER to use the default port, 1194. OpenVPN works best over UDP protocol you can check their developer’s statement What port should OpenVPN listen to? You can choose the protocol you like, but UDP protocol is preferred.

Welcome to this OpenVPN road warrior installer! Now, the OpenVPN installation will start, and you will be prompted with a few questions. Let’s make the file executable then run it. The installation script is downloaded and saved as /opt/openvpn-install.sh. To start this, we need to download the bash script from GitHub. In this step, we will show you how to install the OpenVPN server using a bash script. But, configuring the service to run properly through the command line interface is a little tricky, especially for those who do not have enough experience in maintaining an Ubuntu server. Installing an OpenVPN server on Ubuntu from its default repository is fairly easy. You can do this by executing the following commands: # apt update -y Step 3. Update the systemīefore starting, we need to make sure that all Ubuntu 22.04 packages installed on the server are up to date. You should get this as the output: No LSB modules are available.Ĭodename: jammy Step 2. Next, let’s make sure that we’re on Ubuntu 22.04. Additionally, replace “IP_Address” and “Port_Number” with your server’s respective IP address and SSH port number. Replace “root” with a user that has sudo privileges or root if necessary. SSH root access or regular user with root privilegesįirst, log in to your Ubuntu 22.04 VPS through SSH as the root user: ssh -p Port_number.
