wKiom1jjFrCRyS0lAABK8Vh5KBA576.png-wh_50

linux客户端的安装和服务器端一样就是配置文件不一样

[root@***server liuhx]# wget http://www.oberhumer.com/opensource/lzo/download/lzo-2.06.tar.gz
--2017-04-02 15:42:36--  http://www.oberhumer.com/opensource/lzo/download/lzo-2.06.tar.gz
正在解析主机 www.oberhumer.com... 193.170.194.40
正在连接 www.oberhumer.com|193.170.194.40|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:583045 (569K) [application/x-gzip]
正在保存至: “lzo-2.06.tar.gz”
 
100%[=======================================================================================================================================================================>] 583,045      200K/s   in 2.8s    
 
2017-04-02 15:42:42 (200 KB/s) - 已保存 “lzo-2.06.tar.gz” [583045/583045])
 
[root@***server liuhx]# wget https://build.open***.net/downloads/releases/open***-2.2.2.tar.gz
--2017-04-02 15:42:54--  https://build.open***.net/downloads/releases/open***-2.2.2.tar.gz
正在解析主机 build.open***.net... 54.215.128.159
正在连接 build.open***.net|54.215.128.159|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:911158 (890K) [application/octet-stream]
正在保存至: “open***-2.2.2.tar.gz”
 
93% [============================================================================================================================================================>           ] 851,710      266K/s eta(英国中部时100%[=======================================================================================================================================================================>] 911,158      268K/s   in 3.3s    
 
2017-04-02 15:42:58 (268 KB/s) - 已保存 “open***-2.2.2.tar.gz” [911158/911158])
 
[root@***server liuhx]# ll
总用量 1464
-rw-r--r-- 1 root root 583045 8月  13 2011 lzo-2.06.tar.gz
-rw-r--r-- 1 root root 911158 5月   9 2013 open***-2.2.2.tar.gz
[root@***server liuhx]

2.安装依赖包

yum  -y install  openssl*
[root@***server yum.repos.d]# rpm -qa |grep openssl*
openssl098e-0.9.8e-20.el6.centos.1.x86_64
openssh-server-5.3p1-111.el6.x86_64  #要有
openssl-1.0.1e-48.el6_8.4.x86_64
openssl-devel-1.0.1e-48.el6_8.4.x86_64  #要有
openssl-perl-1.0.1e-48.el6_8.4.x86_64
openssh-clients-5.3p1-111.el6.x86_64
openssl-static-1.0.1e-48.el6_8.4.x86_64
openssh-5.3p1-111.el6.x86_64
[root@***server yum.repos.d]# 
cd  /home/liuhx/
tar zxf  lzo-2.06.tar.gz 
cd  lzo-2.06 
./configure&& make && make install

3.安装open***

[root@***server lzo-2.06]# cd  /home/liuhx/
[root@***server liuhx]# ll
总用量 1468
drwxr-xr-x 13 root root   4096 4月   2 15:44 lzo-2.06
-rw-r--r--  1 root root 583045 8月  13 2011 lzo-2.06.tar.gz
-rw-r--r--  1 root root 911158 5月   9 2013 open***-2.2.2.tar.gz
[root@***server liuhx]# tar xf open***-2.2.2.tar.gz 
[root@***server liuhx]# cd open***-2.2.2
[root@***server open***-2.2.2]# ./configure --with-lzo-headers=/usr/local/include --with-lzo-lib=/usr/local/lib
[root@***server open***-2.2.2]# make &&  make install 
[root@***server open***-2.2.2]# which  open*** 
/usr/local/sbin/open***
查看网卡可以看出多了一个tun网卡
[root@***client open***]# ifconfig 
eth0      Link encap:Ethernet  HWaddr 00:0C:29:A8:84:76  
          inet addr:10.0.0.29  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fea8:8476/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:21461 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12361 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:26250834 (25.0 MiB)  TX bytes:1137891 (1.0 MiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:200 (200.0 b)  TX bytes:200 (200.0 b)

tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:10.8.0.6  P-t-P:10.8.0.5  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:168 (168.0 b)  TX bytes:168 (168.0 b)

[root@***client open***]#

4.配置文件

wKioL1jjFzTgIIL8AACzVwoImaQ724.png-wh_50

[root@***client open***]# ll
总用量 16
-rw-r--r-- 1 root root 1306 4月   2 16:22 ca.crt
-rw-r--r-- 1 root root 3440 4月   3 13:13 sense.conf
-rw-r--r-- 1 root root 3870 4月   2 17:06 sense.crt
-rw-r--r-- 1 root root  916 4月   2 17:06 sense.key
[root@***client open***]# pwd
/etc/open***
[root@***client open***]#
[root@***client open***]# /usr/local/sbin/open***   --config   /etc/open***/sense.conf   &
[1] 11068
[root@***client open***]# Tue Apr  4 11:54:07 2017 Open××× 2.2.2 x86_64-unknown-linux-gnu [SSL] [LZO2] [EPOLL] [eurephia] built on Apr  4 2017
Tue Apr  4 11:54:07 2017 NOTE: Open××× 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Tue Apr  4 11:54:07 2017 WARNING: file 'sense.key' is group or others accessible
Tue Apr  4 11:54:07 2017 LZO compression initialized
Tue Apr  4 11:54:07 2017 Control Channel MTU parms [ L:1544 D:140 EF:40 EB:0 ET:0 EL:0 ]
Tue Apr  4 11:54:07 2017 Socket Buffers: R=[87380->131072] S=[16384->131072]
Tue Apr  4 11:54:07 2017 Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:0 EL:0 AF:3/1 ]
Tue Apr  4 11:54:07 2017 Local Options hash (VER=V4): '69109d17'
Tue Apr  4 11:54:07 2017 Expected Remote Options hash (VER=V4): 'c0103fa8'
Tue Apr  4 11:54:07 2017 Attempting to establish TCP connection with 10.0.0.28:52115 [nonblock]
Tue Apr  4 11:54:08 2017 TCP connection established with 10.0.0.28:52115
Tue Apr  4 11:54:08 2017 TCPv4_CLIENT link local: [undef]
Tue Apr  4 11:54:08 2017 TCPv4_CLIENT link remote: 10.0.0.28:52115
Tue Apr  4 11:54:08 2017 TLS: Initial packet from 10.0.0.28:52115, sid=4a60fbc1 111eb0e6
Tue Apr  4 11:54:08 2017 VERIFY OK: depth=1, /C=CN/ST=BJ/L=BeiJing/O=liuhx/OU=liuhx/CN=liuhx/name=liuhx/emailAddress=w673004708@163.com
Tue Apr  4 11:54:08 2017 VERIFY OK: nsCertType=SERVER
Tue Apr  4 11:54:08 2017 VERIFY OK: depth=0, /C=CN/ST=BJ/L=BeiJing/O=liuhx/OU=liuhx/CN=server/name=liuhx/emailAddress=w673004708@163.com
Tue Apr  4 11:54:09 2017 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Tue Apr  4 11:54:09 2017 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Tue Apr  4 11:54:09 2017 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Tue Apr  4 11:54:09 2017 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Tue Apr  4 11:54:09 2017 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 1024 bit RSA
Tue Apr  4 11:54:09 2017 [server] Peer Connection Initiated with 10.0.0.28:52115
Tue Apr  4 11:54:11 2017 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
Tue Apr  4 11:54:11 2017 PUSH: Received control message: 'PUSH_REPLY,route 172.16.1.0 255.255.255.0,route 10.8.0.1,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0.6 10.8.0.5'
Tue Apr  4 11:54:11 2017 OPTIONS IMPORT: timers and/or timeouts modified
Tue Apr  4 11:54:11 2017 OPTIONS IMPORT: --ifconfig/up options modified
Tue Apr  4 11:54:11 2017 OPTIONS IMPORT: route options modified
Tue Apr  4 11:54:11 2017 ROUTE default_gateway=10.0.0.254
Tue Apr  4 11:54:11 2017 TUN/TAP device tun0 opened
Tue Apr  4 11:54:11 2017 TUN/TAP TX queue length set to 100
Tue Apr  4 11:54:11 2017 /sbin/ifconfig tun0 10.8.0.6 pointopoint 10.8.0.5 mtu 1500
Tue Apr  4 11:54:11 2017 /sbin/route add -net 172.16.1.0 netmask 255.255.255.0 gw 10.8.0.5
Tue Apr  4 11:54:11 2017 /sbin/route add -net 10.8.0.1 netmask 255.255.255.255 gw 10.8.0.5
Tue Apr  4 11:54:11 2017 Initialization Sequence Completed

[root@***client open***]# 
[root@***client open***]# ping 172.16.1.17
PING 172.16.1.17 (172.16.1.17) 56(84) bytes of data.
64 bytes from 172.16.1.17: icmp_seq=1 ttl=63 time=0.897 ms
64 bytes from 172.16.1.17: icmp_seq=2 ttl=63 time=1.57 ms
^C
--- 172.16.1.17 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1434ms
rtt min/avg/max/mdev = 0.897/1.234/1.572/0.339 ms
[root@***client open***]#

可以看出可以成功访问了