#下面为Averina_Anastasia用户颁发证书的操作过程 root@xxxx:/etc/openvpn/easy-rsa# ./build-key Averina_Anastasia Generating a 2048 bit RSA private key ..........................+++ .................+++ writing new private key to 'Averina_Anastasia.key' ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [US]:US #国家简称 State or Province Name (full name) [CA]:Averina_Anastasia #所在省名 Locality Name (eg, city) [SanFrancisco]:Averina_Anastasia #所在市名 Organization Name (eg, company) [Fort-Funston]:Averina_Anastasia #公司名 Organizational Unit Name (eg, section) [MyOrganizationalUnit]:Averina_Anastasia #所在部门或者组织 Common Name (eg, your name or your server's hostname) [Averina_Anastasia]:Averina_Anastasia #主机名 Name [EasyRSA]: Email Address [me@myhost.mydomain]: #邮件地址 Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: An optional company name []: Using configuration from /etc/openvpn/easy-rsa/openssl-1.0.0.cnf Check that the request matches the signature Signature ok The Subject's Distinguished Name is as follows countryName :PRINTABLE:'US' stateOrProvinceName :T61STRING:'Averina_Anastasia' localityName :T61STRING:'Averina_Anastasia' organizationName :T61STRING:'Averina_Anastasia' organizationalUnitName:T61STRING:'Averina_Anastasia' commonName :T61STRING:'Averina_Anastasia' name :PRINTABLE:'EasyRSA' emailAddress :IA5STRING:'me@myhost.mydomain' Certificate is to be certified until Jul 13 06:10:41 2029 GMT (3650 days) Sign the certificate? [y/n]:y #确认签发证书
1 out of 1 certificate requests certified, commit? [y/n]y Write out database with 1 new entries Data Base Updated
root@localhost:~# telnet 127.0.0.1 12531 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. >INFO:OpenVPN Management Interface Version 1 -- type'help'for more info help#执行help命令查看可执行的命令选项 status #查看当前连接的客户端IP信息