Ubuntu 配置OpenVPN

环境:

  • 系统版本 12.04
  • OpenVPN 2.2.1

服务器安装

sudo apt-get install openvpn

生成Public key Infrastructure

sudo mkdir /etc/openvpn/easy-rsa/
sudo cp -r /usr/share/doc/openvpn/examples/easy-rsa/2.0/* /etc/openvpn/easy-rsa/

编辑/etc/openvpn/easy-rsa/vars

export KEY_COUNTRY="CN"
export KEY_PROVINCE="BJ"
export KEY_CITY="Beijing"
export ...
more ...