客户端配置
下载安装客户端
分32位和64位版本
下载地址: https://openvpn.net/index.php/open-source/downloads.html

配置客户端
安装完成后,把客户端证书文件和客户端配置文件放到安装路径\openvpn\conf\下面。
客户端配置文件在服务器安装目录下:
[root@ln-slave sample-config-files]# pwd
/root/tools/openvpn-2.0.9/sample-config-files
[root@ln-slave sample-config-files]# ll
总计 72
-rw-r--r-- 1 root root 3427 2005-11-01 client.conf
[root@ln-slave sample-config-files]# egrep -v "^#|^$|;" client.conf
client
dev tun
proto udp
remote my-server-1 1194 #=>openvpn服务器地址及端口号,端口映射环境即为映射后公网的地址
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt #=>CA证书名称,一般不用动
cert client.crt #=>客户端证书名称
key client.key #=>客户端私钥名称
comp-lzo
verb 3
客户端配置文件说明:
象服务端配置文件一样,首先编辑ca、cert和key 参数使之指向你在上一节PKI生成的文件。每一个客户端有自己的cert/key对。只有ca文件在服务端和所有客户端之间是通用的。
下一步,编辑remote指令使之指向服务端的主机名/IP地址和端口号。 (如果OpenVPN服务端运行在firewall/NAT-gateway之后的一台单网卡机子上,则使用网关的公用IP地址,和你在网关上配置的向OpenVPN服务端转发的端口)。 (if your OpenVPN server will be running on a single-NIC machine behind a firewall/NAT- gateway, use the public IP address of the gateway, and a port number which you have configured the gateway to forward to the OpenVPN server).
最后,确保客户端配置文件和服务端配置文件中指令的的一致性。主要检查的是 dev(tun/tap)和proto(udp/tcp)。还有comp-lzo和 fragment(如果使用了)则在客户端和服务端的配置文件中都必须提供。
重要:修改完配置文件后,把配置文件后缀名为ovpn
最后应有以下内容文件

启动客户端并连接
以管理员身份运行客户端,(不用管理员运行连接到vpn后,可能会ping不通通内网地址)

在通知区域打到openvpn图标并右击,点击连接,图标变绿后即代表连接成功。

CentOS6搭建OpenVPN服务器 http://www.linuxidc.com/Linux/2014-11/109588.htm
Ubuntu下OpenVPN客户端配置教程 http://www.linuxidc.com/Linux/2013-06/86562.htm
Ubuntu 10.04搭建OpenVPN http://www.linuxidc.com/Linux/2012-11/74790.htm
Ubuntu 13.04 VPN (OpenVPN) 配置和连接不能同时访问内外网的问题 http://www.linuxidc.com/Linux/2013-07/86899.htm
如何在Linux上用OpenVPN搭建安全的远程网络架构 http://www.linuxidc.com/Linux/2013-11/92646.htm
Ubuntu Server 14.04搭建OpenVPN服务器保护你的隐私生活 http://www.linuxidc.com/Linux/2014-08/105925.htm
CentOS 6.3下利用OpenVPN部署远程VPN服务 http://www.linuxidc.com/Linux/2013-06/86118.htm
本文永久更新链接地址:http://www.linuxidc.com/Linux/2015-02/112691.htm
