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:
Expected output:
Step 2: Install EPEL Repository
Install the EPEL (Extra Packages for Enterprise Linux) repository package:
Approve the installation when prompted by entering y.
Step 3: Verify Public IP Address
Before proceeding, check your server's public IP:
This will output your server’s public IP address.
Step 4: Download OpenVPN Installer Script
Now, download the OpenVPN auto-install script:
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:
Look for the openvpn-install.sh file in the list.
Step 6: Make the Installer Script Executable
Give executable permissions to the script:
You can confirm the permission changes by listing the files again:
The openvpn-install.sh file should now have x (executable) permission.
Step 7: Run the Installer Script
Execute the installation script:
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:
Then start the OpenVPN server:
Finally, verify the service status:
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.
