Guidance on usage: VPN Server on Amazon Linux 2023

VPN Server on Amazon Linux 2023 delivers a secure and efficient VPN solution for private and encrypted connections. It’s perfect for cloud-based deployments and modern networking needs.

Built for efficiency, optimized for your needs — get started instantly.

Configuration and Connection to the VPN Server on Amazon Linux 2023

Connecting to the Server and Creating a User

After purchasing and starting the VM you should know its IP address. You can find it in your Amazon personal account.

To work, you should have TCP port 22 and UDP port 1194 open in the Amazon firewall network properties 

Before connecting to the server, you must generate a “Private Key” in advance. This can be done by following the instructions in the guide, “Guidance on usage: Key Pair Setup for Seamless VM Access” (be sure to select the “.ppk” option in step 3).

  1. Connecting to the VM using the PuTTY application. You can download it at the following link – Download
    • Go to section SSH on the left panel, and then to Auth
  • In the “Auth” section, click “Browse” and specify the path to the .ppk file you received earlier.
  • Return to the “Session” home page, enter the IP address of the VM, and click “Open.”
  • In the opened console you will need to enter the login ec2-user.
  1. Next, you should enter the following commands:

> sudo vpnusers

  1. To create a new user, type “1” and press Enter
  1. Write a username and press Enter
  1. The last line will tell you where the config file is available (testuser.ovpn in this case). 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 4

  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

Creating a VPN Connection Using OpenVPN Client

  1. Run OpenVPN Connect. If you don’t have OpenVPN installed, you can download it here
  1. In the OpenVPN Connect window, specify the path to the file you unpacked from the archive and click “OK”.
  1. Click Connect
  1. If the connection is successful, a confirmation window will be displayed.
  1. You can verify your IP address has changed by visiting What Is My IP both before and after connecting to OpenVPN.

            Now you can use the secure and fast OpenVPN solution