Install and setup openvpn in Ubuntu 22.10

Install and setup openvpn in Ubuntu 22.10

Hello friends, welcome to the inet70  blog. Today I can guide you on how to install and set up the openvpn in ubuntu. Try this vpn server in your Ubuntu server then manage your private network access from your any device.

What is VPN?

VPN is known as a “Virtual Private Network”. This type of network is used on the secondary device for access and managing any network services from another device using a VPN client. This type of network is used for access to our ip address or network remotely.

For example, you can go out of the country for a few days. In your personal phone or laptop one of the software is available. This software you can also use using your private ip address/network. In this case you have connected to an out of country network then you cannot open this software at this time. In this case you can install the vpn server in your local network and access it remotely.

How to install openvpn in Ubuntu 22.10?

Need the Ubuntu 22.10 server for installing the openvpn. First you can connect to the Ubuntu SSH Server. If you don’t have a server then purchase now from the vps server provider at a cheapest price. After connect to the SSH server you need update and upgrade all ubuntu packages by following command:

sudo apt update && sudo apt upgrade -y

Download and install the ca-certificates for the net-tools

sudo apt install ca-certificates wget net-tools gnupg

Now, download the gpg key for the openvpn

sudo wget -qO - | sudo apt-key add -

Add the openvpn repository in ubuntu server by following command:

sudo apt-add-repository 'deb buster main'

All the required steps are completed. Now download and install openvpn

sudo apt install openvpn-as

Now create the strong password for openvpn

sudo passwd openvpn

Create and verify your openvpn password. Here our openvpn server is ready to use but one of the biggest problems is we cannot access this server as a client view. Then we need to allow the firewall permissions to the client to access this vpn server remotely.

sudo ufw allow 943/tcp

Allow this firewall rule then now our server is ready. Put the following in your browser.


Put your openvpn server ip at “YOUR_SERVERIP” in your browser. You can redirect to vpn server client view in your browser. Put your username is openvpn and password you can create for the openvpn. Complete login then you can select your operating system and download openvpn client app for your system.

Try the openvpn web admin dashboard by using the following way.


You can login in the openvpn admin panel. Here you can manage and control all the vpn and network settings from the browser. You can add and remove the vpn server user accounts from the browser.

You can use the openvpn as a network tunnel for accessing the server internet connection to the mobile network.

How to access openvpn client from smartphone?

Now try the openvpn client in the smartphone by using the app. If you can use android then download the app from the play store. If you can use ios then download the app from the apple store.

Open the openvpn app on your phone. Put your server ip address in the given space. Put your username and password then login in your server.