sudo apt-get update
sudo apt-get upgrade
sudo apt-get install openvpn
#Generage certification and key
cp -r /usr/share/doc/openvpn/examples/easy-rsa/2.0 ~/
cd ~/2.0
source vars
./clean-all
./build-ca
./build-key-server <servername>
./build-key <clientname>
./build-dh
# add extra key
source vars
./build-key-server <servername>
or
./build-key <clientname>
# Config OpenVPN listen on port 443, and share port 443 with SSH
Example of config file:
Reference:
http://forum.ubuntu.org.cn/viewtopic.php?p=532825