1. Package Installation and Basic Setup
The first step in building an OpenVPN server is installing the required packages and preparing the environment for certificate generation.
1.1. Installing Packages
Use yum in the terminal to install OpenVPN and Easy-RSA.
sudo yum install -y openvpn easy-rsa # Install OpenVPN and Easy-RSA packages
1.2. Setting Easy-RSA Environment Variables
Edit the /etc/openvpn/easy-rsa/vars file to set certificate information.
/etc/openvpn/easy-rsa/vars
export KEY_COUNTRY="KR" # Country Code (South Korea)
export KEY_PROVINCE="G" # Province Code
export KEY_CITY="S" # City Name
export KEY_ORG="MyVPN" # Organization Name
export KEY_EMAIL="admin@example.com" # Admin Email
export KEY_OU="IT_Dept" # Organizational Unit Name
source ./vars # Apply changed environment variables