Setting up OpenVPN Server on Ubuntu 20.04 LTS

Windows Articles

How to access System in Windows 10

Perhaps the title of this post is misleading. In previous versions of Windows, it was enough to enter the Control Panel and from there,...

Microsoft reduces the fragmentation of Windows 10

Windows 10 20H2 has been released as a minor operating system update. As a result, it has managed to reduce platform errors. In addition,...

How to install Nginx and PHP on FreeBSD?

Hello, friends. FreeBSD is a secure system even more than Linux, that's why it's used as the main server. And a server has to...

How to enable local port forwarding using Ubuntu 20.04 and ssh

SSH, a very popular tool found almost with every IT guy. Commonly, when we talk about the insecure network for data, ssh is the...

How to use CHKDSK in Windows 10

Hello! It is very important to ensure the integrity of the hard disk in the computer. Since it is an essential element for the...

So, in this post, you will learn How to set an OpenVPN server on Ubuntu 20.04.

VPN or virtual private network is a set of technologies that allows a network to connect through a protected tunnel with other networks. VPNs are uses by an organization to provide remote access of their protected resource maybe access to some files, software access, or some client communication. A VPN Create private communication between two devices. Devices can be similar or different, I can be a mobile, router, or a computer, it allows remote access while protecting traffic/communication as well.

How a VPN works?

“Private” in VPN refers to network topology instead of privacy. VPN work based on routing, bridging, and encapsulation. Layer 3 VPN creates a new route for virtual network adopter while in bridging VPN method (or Layer 2) method like connected devices are on the same physical network.

Encapsulation means traveling information is wrapped inside packets, these encapsulated packets travel through a secure VPN tunnel between server and client. A VPN server will be only visible to clients. VPN or virtual private network is a set of technologies that allows a network to connect through a protected tunnel with other networks. VPNs are uses by an organization to provide remote access of their protected resource maybe access to some files, software access, or some client communication. A VPN Create private communication between two devices.

So, Devices can be similar or different, I can be a mobile, router, or a computer, it allows remote access while protecting traffic/communication as well.

Configure OpenVPN    

Pre requisites:

  1. Ubuntu 20.04 LST
  2. Internet connection
  3. A mobile/remote device to test your OpenVPN services.

Install required packaged:

So, open a browser and go to the OpenVPN main site

Click on Get OpenVPN visible on upper left corner of the site.

Then, click on the Ubuntu icon.

After that, Install required packages are per instructions provided on website.

# apt update && apt -y install ca-certificates wget net-tools gnupg
wget -qO - https://as-repository.openvpn.net/as-repo-public.gpg | apt-key add -
# echo "deb http://as-repository.openvpn.net/as/debian focal main">/etc/apt/sources.list.d/openvpn-as-repo.list 

When installation process is over you will be able to see following message, where VPN server is accessible on port number 943.

Let’s access admin portal first, assign password to OpenVPN user.

# passwd OpenVPN

Then, open URL https://ip-addr:943/admin, provide user id and password created in previous step:

Then, Click on user management and go to user permissions

Create a new user (demouser in our example scenario), click on more settings, define password and save settings.

Here you have created a VPN client user which can be accessed via remote.

To check if creds are working properly or not, open https://ip-addr:943 in another browser. Provide user id and password created in above step (demouser).

After providing credential, a window something like below will appear. Here you can save your VPN profiles by click on user-locked profile.

To run a OpenVPN client on MS Windows®, download application and install.

When setup is done, open MS Windows VPN client application and provide credentials.

Enable OpenVPN connection, we can see successfully connected VPN connection on MS Windows® client.  

So, let’s try with android device as well. Download OpenVPN application on your mobile device.

Provide credentials and connect OpenVPN connection, steps are exactly as were for Desktop.  

Now both of the devices (Desktop and Android) are connected, lets see if connections are visible on OpenVPN server or not.

Open https://ip-addr:943/admin

We can see 02 active connections up and running.

Conclusion

OpenVPN is one of the most reputed VPN authentication services getting used globally. Also, OpenVPN is a standardized open-source protocol, where a maximum of the devices supports OpenVPN and can connect via that protocol.

So, the application is very easy to set up and robust platform which can be used for corporate, educational, or government organization for secure tunneled communications.

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

How to access System in Windows 10

Perhaps the title of this post is misleading. In previous versions of Windows, it was enough to enter the Control Panel and from there,...

Microsoft reduces the fragmentation of Windows 10

Windows 10 20H2 has been released as a minor operating system update. As a result, it has managed to reduce platform errors. In addition,...

How to install Nginx and PHP on FreeBSD?

Hello, friends. FreeBSD is a secure system even more than Linux, that's why it's used as the main server. And a server has to...

How to enable local port forwarding using Ubuntu 20.04 and ssh

SSH, a very popular tool found almost with every IT guy. Commonly, when we talk about the insecure network for data, ssh is the...

How to use CHKDSK in Windows 10

Hello! It is very important to ensure the integrity of the hard disk in the computer. Since it is an essential element for the...
x