sudo apt-get install openvpn easy-rsa
Make an easy-rsa directory inside /etc/openvpn:
cd /etc/openvpn/ sudo mkdir easy-rsa
Use the following command to copy the default easy-rsa into /etc/openvpn/easy-rsa for setting up Certificate Authority (CA), certificates and keys generation for OpenVPN server and clients:
cp -r /usr/share/easy-rsa/* /etc/openvpn/easy-rsa/
Edit /etc/openvpn/easy-rsa/vars:
cd /etc/openvpn/easy-rsa/ vi vars
Edit these parameters according to your need:
export KEY_COUNTRY="US" export KEY_PROVINCE="NC" export KEY_CITY="Winston-Salem" export KEY_ORG="Example Company" export KEY_EMAIL="
该E-mail地址已受到防止垃圾邮件机器人的保护,您必须启用浏览器的Java Script才能看到。
"
Run the clean-all command:
source vars ./clean-all
Now, generate the CA certificate: