下载openvpn :sudo apt-get install openvpn
在下载openvpn的时候会提示 :建议
安装软件包 :resolvconf
安装完 openvpn 后再 安装resolvconf
(若没有安装 resolvconf 在启动 openvpn的时候提示 /usr/sbin/openssl-vulnkey: not found)
把 client的密钥匙cp到 /etc/openvpn
运行 :openvpn --config /etc/openvpn/client.conf
提示 :hzh@hzh:~/桌面$ openvpn --config /etc/openvpn/client.conf
Tue May 27 20:16:49
2008 OpenVPN 2.1_rc7 i486-pc-linux-gnu [SSL] [LZO2] [EPOLL] built on May 14 2008
Tue May 27 20:16:49 2008 WARNING: No
server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info.
Tue May 27 20:16:49 2008 Cannot load certificate file client.crt: error:02001002:system library:fopen:No such file or directory: error:20074002:BIO routines:FILE_CTRL:system lib: error:140AD002:SSL routines:SSL_CTX_use_certificate_file:system lib
Tue May 27 20:16:49 2008 Exiting
没权限以root运行提示 :root@hzh:/etc/openvpn# openvpn --config client.conf
Tue May 27 20:10:38 2008 OpenVPN 2.1_rc7 i486-pc-linux-gnu [SSL] [LZO2] [EPOLL] built on May 14 2008
Tue May 27 20:10:38 2008 WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info.
Tue May 27 20:10:38 2008 /usr/sbin/openssl-vulnkey -q client.key
Tue May 27 20:10:38 2008 Control Channel Authentication: using 'ta.key' as a OpenVPN static key file
Tue May 27 20:10:38 2008 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Tue May 27 20:10:38 2008 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Tue May 27 20:10:38 2008 Control Channel MTU parms [ L:1543 D:168 EF:68 EB:0 ET:0 EL:0 ]
Tue May 27 20:10:38 2008 Data Channel MTU parms [ L:1543 D:1450 EF:43 EB:4 ET:0 EL:0 ]
Tue May 27 20:10:38 2008 Local Options hash (VER=V4): 'd8421bb0'
Tue May 27 20:10:38 2008 Expected Remote Options hash (VER=V4): 'c413e92e'
Tue May 27 20:10:38 2008 failed to find GID for group nobody
Tue May 27 20:10:38 2008 Exiting
没有添加 nobody添加 nobodyroot@hzh:/etc/openvpn# groupadd nobody
再运行root@hzh:/etc/openvpn# openvpn --config client.conf
.......
......
......
Tue May 27 20:10:55 2008 GID set to nobody
Tue May 27 20:10:55 2008 UID set to nobody
Tue May 27 20:10:55 2008 Initialization Sequence Completed
大功告成启动方式 sudo /etc/init.d/openvpn start