Introduction

OpenVPN is an open-source software application that allows you to create secure point-to-point or site-to-site connections in routed or bridged configurations and remote access facilities. It ensures secure browsing over the internet and protected access to private networks.

 

All Commands :

 00:31 cat /etc/os-release

 00:45 yum install epel-release

 01:40 curl ifconfig.me

 02:08 wget https://raw.githubusercontent.com/Angristan/openvpn-install/master/openvpn-install.sh

 02:23 ll

 02:34 chmod +x openvpn-install.sh

 02:46 ll

 03:01 ./openvpn-install.sh

 05:11 systemctl enable openvpn-server@server.service

 05:20 systemctl start openvpn-server@server.service

 05:33 systemctl status openvpn-server@server.service

(Article Inspired by Linuxhelp.)

Installation Steps

Step 1: Check OS Version

First, verify the OS version:

cat /etc/os-release

Expected output:

NAME="Rocky Linux" VERSION="9.2 (Blue Onyx)" ...

Step 2: Install EPEL Repository

Install the EPEL (Extra Packages for Enterprise Linux) repository package:

dnf install epel-release

Approve the installation when prompted by entering y.

Step 3: Verify Public IP Address

Before proceeding, check your server's public IP:

curl ifconfig.me

This will output your server’s public IP address.

Step 4: Download OpenVPN Installer Script

Now, download the OpenVPN auto-install script:

wget https://raw.githubusercontent.com/Angristan/openvpn-install/master/openvpn-install.sh

You should see a message showing the script has been downloaded.

Step 5: View the Downloaded Files

List the files to confirm the script has been downloaded:

ll

Look for the openvpn-install.sh file in the list.

Step 6: Make the Installer Script Executable

Give executable permissions to the script:

chmod +x openvpn-install.sh

You can confirm the permission changes by listing the files again:

ll

The openvpn-install.sh file should now have x (executable) permission.

Step 7: Run the Installer Script

Execute the installation script:

./openvpn-install.sh

Follow the interactive setup as it asks questions regarding server configuration, protocol selection (UDP/TCP), and port number.

Step 8: Enable and Start OpenVPN Server

After the setup, enable the OpenVPN server service:

systemctl enable openvpn-server@server.service

Then start the OpenVPN server:

systemctl start openvpn-server@server.service

Finally, verify the service status:

systemctl status openvpn-server@server.service

It should show that the service is active (running).


Conclusion:
Following these steps, you will have a fully operational OpenVPN server on your Rocky Linux 9.2 system, allowing secure remote access and browsing.

Je li Vam ovaj odgovor pomogao? 1 Korisnici koji smatraju članak korisnim (1 Glasovi)