Guidance on usage: OpenVPN on Linux Redhat 8.6 Minimal

Connection to the OpenVPN on Linux Redhat 8.6 Minimal

  1. First, to connect to VPN Server, you should open port 1194 UDP in the network properties on Azure Firewall
  1. To manage with an OpenVPN you should connect to a VM.
    1. With OpenSSH

In the Windows 10 operating system (starting with version 1809 ), an OpenSSH client is available, with which you can connect to Linux servers via SSH. If Windows 10 is suitable and the OpenSSH client is installed, you can start connecting via SSH. To do this, launch a normal Windows command prompt and enter the command ” ssh user@*vm_ip*”. 

Where “user” is the username that was specified while creating the virtual machine and “*vm_ip*” is the VM IP address.

In the opened console it is necessary to enter a password that was specified while creating the virtual machine.

  1. With the PuTTy application 

To do this you need the PuTTy application to connect via ssh. You can download it at the following link – Download

Run Putty, enter the VM address in the “Host” field and click “Open” to connect.

In the opened console you will need to enter a username and password that were specified while the VM was being created (you’ll not see the password in the console while entering it). 

  1. Next, you should enter the following commands:

> sudo vpnusers

  1. To create a new user type “1” and press Enter
  1. Write a user name and press Enter
  1. The last line will tell you where the config file is available (exampleuser.ovpn in this case) 
  1. You need to copy the contents of this file. To do this, display the contents of the file on the screen with the following command:

> cat /etc/openvpn/clientconfigs/”exampleuser”.ovpn 

Don’t forget to replace “exampleuser” with the username that was created in step 5

  1. Copy the entire contents of the file by selecting it and pressing Ctrl + C
  1. Open Notepad or any other text editor and paste the contents of the file into a blank document
  1. Save the file with the extension .ovpn
  1. Then restart the VM
  1. Run OpenVPN Connect. If you don’t have OpenVPN installed you can download it here
  1. In the window that is open specify the path to the file that you unpacked from the archive and click “OK”.
  1. Click Connect
  1. If the connection is successful, the following window is displayed

You can check the change in your IP on What Is My IP by going to it before connecting to OpenVPN and after connecting.