Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Install OpenVPN on a Linux VPN Server
#1


How to Install OpenVPN on a Linux VPN Server



we will demonstrate how to set up OpenVPN software on a Linux VPS and how to connect it to Windows, Android, and other operating systems. To learn more about the OpenVPN protocol, check out their documentation.


Prerequisites:

  • An account with root access or sudo privileges.
  • Configure the firewall to allow TCP traffic over port 943 and UDP traffic over port 1194.

After meeting the above prerequisites, proceed with the VPN server installation.


Pro Tip: Consider Hostinger’s KVM VPS plans for setting up a different VPN server. They are compatible with various VPN solutions in the market, providing flexibility and options for your needs.


1. Set Up a Linux VPN Server With OpenVPN Access Server


Ubuntu and Debian


Open the command line interface.

Update the indexes using the following Linux command:


sudo apt update

A net-tools package is needed to install OpenVPN successfully. If you don’t have it installed yet, enter the following command:


sudo apt -y install ca-certificates wget net-tools gnupg

Download the client from the OpenVPN website. Copy the package link and download it using the wget command. A sample wget command for Ubuntu would look like this:


wget -qO - https://as-repository.openvpn.net/as-repo-public.gpg | apt-key add -

Proceed with the command below:


echo "deb http://as-repository.openvpn.net/as/debian focal main">/etc/apt/sources.list.d/openvpn-as-repo.list

Lastly, install the OpenVPN Access Server with the following command:


sudo apt update && apt -y install openvpn-as

CentOS


OpenVPN installation for CentOS is much simpler because it only consists of two commands:


yum -y install https://as-repository.openvpn.net/as-repo-centos7.rpm
yum -y install openvpn-as

Once the installation is complete, you will see the Admin UI and the Client UI details. Remember the password since you will use it to log in.




Follow these steps to complete the setup process:


Open the admin URL to log in and finish the installation process. Normally, the admin URL is the VPS IP address with 943 port and /admin subdomain at the end. It will look similar to https://185.185.185.185:943/admin.

On the login page, enter 'openvpn' as the username. Then, enter the password that was shown before. Click 'Sign in'.




Once logged in, you will see a Terms and Conditions page. Read it and press the 'Agree' button to proceed. The next page will provide the OpenVPN configuration details and the server status.




The next important step before starting the VPN server is to enable the TUN/TAP Adapter on your VPS.


Wait for the process to finish and log in to the OpenVPN admin panel again. The VPN service will be ON.




The default OpenVPN settings are decent and allow macOS, Linux, Windows, Android, and iOS to connect to the Linux VPN server. However, if you want to modify any settings, click 'Apply' and 'Update Running Server' to enable the changes.








Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)