一般在Windows系统上使用Open作为服务器的应该不是很多,相反,在Windows下用Open作为客户端接入的应该非常多,尤其是XP这种桌面系统或者Windows 2003 Server作为客户端 。应用也是非常多的 。
这里我仅仅做了在Windows 2003 Server上的Open客户端,其实要做成Server的话,也差不多 。
系统环境:Windows 2003 Server 。双路网卡,一路接192.168.0.0/24网段,此网段出局,网关为192.168.0.101 。另一路接192.168.1.0/24网段 。让此台Win2k3作为Client段接入之前交代过的Open Server 。Open Server的IP地址为123.123.123.233 。
在Windows下使用的是基于NT系统的安装包
open-2.0.9-gui-1.0.3-install.exe 下载地址: http://www.jb51.net/softs/120505.html
安装:双击+下一步+完成
1.首先通过找到安装的路径,并且查看下面有些什么东西 。可以通过资源浏览器或者Cmd,个人认为Cmd可能看的比较清楚 。
---------------------------------------------------------------
Microsoft Windows [Version 5.2.3790]
Copyright 1985-2003 Microsoft Corp.
切换工作目录到Open的默认安装路径下
C:\Documents and Settings\Administrator>cd C:\Program Files\Open
通过dir命令看看安装路径下面有些什么内容
C:\Program Files\Open>dir
Volume in drive C is system
Volume Serial Number is 785C-92D5
Directory of C:\Program Files\Open
2007-08-28 16:48 .
2007-08-28 16:48 ..
2007-08-28 16:34 bin
2007-08-27 14:09 1,233 ca.crt
2007-08-28 17:33 config
2007-08-28 16:34 driver
2007-08-28 16:34 easy-rsa
2006-10-01 20:37 83 INSTALL-win32.txt
2007-08-28 16:39 3,530 kc1.crt
2007-08-28 16:39 684 kc1.csr
2007-08-28 16:39 887 kc1.key
2005-04-21 17:54 28,387 license.txt
2007-08-28 16:45 log
2005-08-18 14:20 8,705 Open GUI ReadMe.txt
2004-05-16 15:30 766 open.ico
2007-08-28 16:34 sample-config
2007-08-27 14:09 636 ta.key
2007-08-28 16:35 72,907 Uninstall.exe
10 File 117,818 bytes
8 Dir 1,629,716,480 bytes free
------------------------------------------------------------------------
还记得在一套Open系统中一个Client需要从服务器那里得到些什么吗?
当然就是5个文件:
CA根证书文件
TA密钥文件
Client端的证书文件
Client端的密钥文件
Client端的SSL请求连接文件
还有一样东西就是根据自己的Server实际情况配置的:
Client主配置文件 。
所以基本上一共需要以上这6样东西 。
2.整备Client主配置文件
在Windows系统下,Open的主配置文件是放在安装目录下的一个叫config的目录中的 。
转到安装路径下的一个叫config的目录下,里面放的就是 Client端的配置文件 。
C:\Program Files\Open>cd config
查看整个文件下的内容
C:\Program Files\Open\config>dir
------------------------------------------------------------------------------------
Volume in drive C is system
Volume Serial Number is 785C-92D5
Directory of C:\Program Files\Open\config
2007-08-28 17:33 .
2007-08-28 17:33 ..
2007-08-28 17:33 383 client.o
2007-08-28 17:24 385 client.o.bak
2007-08-28 16:34 213 README.txt
3 File 981 bytes
2 Dir 1,638,834,176 bytes free
C:\Program Files\Open\config>
----------------------------------------------------------
3.编辑client.o这个主配置文件
----------------------------------------------------------
dev tun
dev-node
proto udp
remote 123.123.123.233 9988
resolv-retry infinite
nobind
#user nobody
#group nobody
persist-key
persist-tun
ca "C:\\Program Files\\Open\\ca.crt"
cert "C:\\Program Files\\Open\\kc1.crt"
key "C:\\Program Files\\Open\\kc1.key"
ns-cert-type server
tls-auth "C:\\Program Files\\Open\\ta.key" 1
comp-lzo
verb 3
;mute 20
---------------------------------------------
这里我偷懒,我直接把一些证书密钥直接丢安装路径下了,其实可以做的规范些,就是自己在安装路径下建立一个Key或者别的名字的目录,将证书密钥这些文件都统一整理到这个目录下,然后再在主配置文件中写明这些文件的位置,还是那句话,请严格仔细的核准主配置文件中的文件路径 。
4.未启动Open进程时先察看网络接口 。
这个是我这台主机上原有的网络接口信息 。安装好Open-GUI后会多出一张网络接口,不过默认是未连接的 。
------------------------------------------------------
Microsoft Windows [Version 5.2.3790]
Copyright 1985-2003 Microsoft Corp.
C:\Documents and Settings\Administrator>ipconfig/all
Windows IP Configuration
Host Name . . . . . . . . . . . . : kserver
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter :
Media State . . . . . . . . . . . : Media disconnected
Description . . . . . . . . . . . : TAP-Win32 Adapter V8
Physical Address. . . . . . . . . : 00-FF-6F-CB-56-CF
Ethernet adapter NET1:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Broadcom 440x 10/100 Integrated Controller
Physical Address. . . . . . . . . : 00-18-8B-82-52-1A
DHCP Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.1.102
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
DNS Servers . . . . . . . . . . . : 202.96.209.5
202.96.209.133
Ethernet adapter NET0:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : ADMtek AN983 10/100 PCI Adapter
Physical Address. . . . . . . . . : 00-E0-4C-B3-F3-43
DHCP Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.0.198
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
DNS Servers . . . . . . . . . . . : 192.168.0.201
202.96.209.133
C:\Documents and Settings\Administrator>
--------------------------------------------------
5.运行Open进程
运行方法很多:
可以通过图形界面的方式用鼠标点击操作 C:\Program Files\Open\bin\open-gui.exe
也可以在Cmd命令行里输入执行命令 open-gui --connect client.o
也可以用鼠标右击你的client.o主配置文件,然后在弹出的快捷菜单中选中“Start Open on this config file” 。
6.查看成功运行Open后的信息
显示
--------------------------------------------------------
Thu Aug 30 08:52:41 2007 Open 2.0.9 Win32-MinGW [SSL] [LZO] built on Oct 1 2
006
Thu Aug 30 08:52:41 2007 IMPORTANT: Open's default port number is now 1194, b
ased on an official port number assignment by IANA. Open 2.0-beta16 and earl
ier used 5000 as the default port.
Thu Aug 30 08:52:41 2007 Control Channel Authentication: using 'C:\Program Files
\Open\ta.key' as a Open static key file
Thu Aug 30 08:52:41 2007 Outgoing Control Channel Authentication: Using 160 bit
message hash 'SHA1' for HMAC authentication
Thu Aug 30 08:52:41 2007 Incoming Control Channel Authentication: Using 160 bit
message hash 'SHA1' for HMAC authentication
Thu Aug 30 08:52:41 2007 LZO compression initialized
Thu Aug 30 08:52:41 2007 Control Channel MTU parms [ L:1542 D:166 EF:66 EB:0 ET:
0 EL:0 ]
Thu Aug 30 08:52:41 2007 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:
0 EL:0 AF:3/1 ]
Thu Aug 30 08:52:41 2007 Local Options hash : '504e774e'
Thu Aug 30 08:52:41 2007 Expected Remote Options hash : '14168603'
Thu Aug 30 08:52:41 2007 UDPv4 link local: [undef]
Thu Aug 30 08:52:41 2007 UDPv4 link remote: 123.123.123.233:9988
Thu Aug 30 08:52:41 2007 TLS: Initial packet from 123.123.123.233:9988, sid=2080
0d3a 0b281635
Thu Aug 30 08:52:41 2007 VERIFY OK: depth=1, /C=CN/ST=Shanghai/L=Shanghai/O=Center/O
[email=U=Center/CN=01/emailAddress=kanecruisesisgod@hotmail.com]U=Center/CN=01/emailAddress=kanecruisesisgod@hotmail.com[/email]
Thu Aug 30 08:52:41 2007 VERIFY OK: nsCertType=SERVER
Thu Aug 30 08:52:41 2007 VERIFY OK: depth=0, /C=CN/ST=Shanghai/O=Center/OU=Center/CN=
[email=SRV01/emailAddress=kanecruisesisgod@hotmail.com]SRV01/emailAddress=kanecruisesisgod@hotmail.com[/email]
Thu Aug 30 08:52:42 2007 Data Channel Encrypt: Cipher 'BF-CBC' initialized with
128 bit key
Thu Aug 30 08:52:42 2007 Data Channel Encrypt: Using 160 bit message hash 'SHA1'
for HMAC authentication
Thu Aug 30 08:52:42 2007 Data Channel Decrypt: Cipher 'BF-CBC' initialized with
128 bit key
Thu Aug 30 08:52:42 2007 Data Channel Decrypt: Using 160 bit message hash 'SHA1'
for HMAC authentication
Thu Aug 30 08:52:42 2007 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES2
56-SHA, 1024 bit RSA
Thu Aug 30 08:52:42 2007 [SRV01] Peer Connection Initiated with 123.123.123.233:9988
Thu Aug 30 08:52:43 2007 SENT CONTROL [SRV01]: 'PUSH_REQUEST'
Thu Aug 30 08:52:43 2007 PUSH: Received control message: 'PUSH_REPLY,route 111.111.111.36 255.255.255.0,route 222.222.0.98 255.255.0.0,route 123.123.123.2
34 255.255.255.255,route 10.99.0.0 255.255.255.0,ping 10,ping-restart 120,ifconf
ig 10.99.0.10 10.99.0.9'
Thu Aug 30 08:52:43 2007 OPTIONS IMPORT: timers and/or timeouts modified
Thu Aug 30 08:52:43 2007 OPTIONS IMPORT: --ifconfig/up options modified
Thu Aug 30 08:52:43 2007 OPTIONS IMPORT: route options modified
Thu Aug 30 08:52:43 2007 TAP-WIN32 device [] opened: \\.\Global\{6FCB56CF-B12
5-4D24-91A3-822CE03972DD}.tap
Thu Aug 30 08:52:43 2007 TAP-Win32 Driver Version 8.4
Thu Aug 30 08:52:43 2007 TAP-Win32 MTU=1500
Thu Aug 30 08:52:43 2007 Notified TAP-Win32 driver to set a DHCP IP/netmask of 1
0.99.0.10/255.255.255.252 on interface {6FCB56CF-B125-4D24-91A3-822CE03972DD} [D
HCP-serv: 10.99.0.9, lease-time: 31536000]
Thu Aug 30 08:52:43 2007 Successful ARP Flush on interface [2] {6FCB56CF-B125-4D
24-91A3-822CE03972DD}
Thu Aug 30 08:52:43 2007 TEST ROUTES: 0/0 succeeded len=4 ret=0 a=0 u/d=down
Thu Aug 30 08:52:43 2007 Route: Waiting for TUN/TAP interface to come up...
Thu Aug 30 08:52:44 2007 TEST ROUTES: 0/0 succeeded len=4 ret=0 a=0 u/d=down
Thu Aug 30 08:52:44 2007 Route: Waiting for TUN/TAP interface to come up...
Thu Aug 30 08:52:45 2007 TEST ROUTES: 4/4 succeeded len=4 ret=1 a=0 u/d=up
Thu Aug 30 08:52:45 2007 route ADD 111.111.111.36 MASK 255.255.255.0 10.99.0.9
Thu Aug 30 08:52:45 2007 route ADD 222.222.0.98 MASK 255.255.0.0 10.99.0.9
Thu Aug 30 08:52:45 2007 route ADD 123.123.123.234 MASK 255.255.255.255 10.99.0.
9
Thu Aug 30 08:52:45 2007 Route addition via IPAPI succeeded
Thu Aug 30 08:52:45 2007 route ADD 10.99.0.0 MASK 255.255.255.0 10.99.0.9
Thu Aug 30 08:52:45 2007 Route addition via IPAPI succeeded
Thu Aug 30 08:52:45 2007 Initialization Sequence Completed
----------------------------------------------------------------------------
连接成功的话,你应该在桌面右下角的托盘当中看到一个小电脑它的小屏幕颜色从红-黄-绿这样的过程 。
再察看网络接口
-------------------------------------------------------------------------------
Microsoft Windows [Version 5.2.3790]
Copyright 1985-2003 Microsoft Corp.
C:\Documents and Settings\Administrator>ipconfig/all
Windows IP Configuration
Host Name . . . . . . . . . . . . : kserver
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter :
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : TAP-Win32 Adapter V8
Physical Address. . . . . . . . . : 00-FF-6F-CB-56-CF
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 10.99.0.10
Subnet Mask . . . . . . . . . . . : 255.255.255.252
Default Gateway . . . . . . . . . :
DHCP Server . . . . . . . . . . . : 10.99.0.9
Lease Obtained. . . . . . . . . . : 2007年8月30日 8:52:44
Lease Expires . . . . . . . . . . : 2008年8月29日 8:52:44
Ethernet adapter NET1:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Broadcom 440x 10/100 Integrated Controller
Physical Address. . . . . . . . . : 00-18-8B-82-52-1A
DHCP Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.1.102
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
DNS Servers . . . . . . . . . . . : 202.96.209.5
202.96.209.133
Ethernet adapter NET0:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : ADMtek AN983 10/100 PCI Adapter
Physical Address. . . . . . . . . : 00-E0-4C-B3-F3-43
DHCP Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.0.198
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
DNS Servers . . . . . . . . . . . : 192.168.0.201
202.96.209.133
C:\Documents and Settings\Administrator>
---------------------------------------------------------------------------
察看路由表
------------------------------------------------------------------------
C:\Documents and Settings\Administrator>route PRINT
IPv4 Route Table
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...00 ff 6f cb 56 cf ...... TAP-Win32 Adapter V8
0x10004 ...00 18 8b 82 52 1a ...... Broadcom 440x 10/100 Integrated Controller
0x10005 ...00 e0 4c b3 f3 43 ...... ADMtek AN983 10/100 PCI Adapter
===========================================================================
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.102 20
10.99.0.0 255.255.255.0 10.99.0.9 10.99.0.10 1
10.99.0.8 255.255.255.252 10.99.0.10 10.99.0.10 30
10.99.0.10 255.255.255.255 127.0.0.1 127.0.0.1 30
10.255.255.255 255.255.255.255 10.99.0.10 10.99.0.10 30
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
192.168.0.0 255.255.255.0 192.168.0.198 192.168.0.198 20
192.168.0.198 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.0.255 255.255.255.255 192.168.0.198 192.168.0.198 20
192.168.1.0 255.255.255.0 192.168.1.102 192.168.1.102 20
192.168.1.102 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.1.255 255.255.255.255 192.168.1.102 192.168.1.102 20
123.123.123.234 255.255.255.255 10.99.0.9 10.99.0.10 1
111.111.111.0 255.255.255.0 10.99.0.9 10.99.0.10 1
222.222.0.0 255.255.0.0 10.99.0.9 10.99.0.10 1
224.0.0.0 240.0.0.0 10.99.0.10 10.99.0.10 30
224.0.0.0 240.0.0.0 192.168.0.198 192.168.0.198 20
224.0.0.0 240.0.0.0 192.168.1.102 192.168.1.102 20
255.255.255.255 255.255.255.255 10.99.0.10 10.99.0.10 1
255.255.255.255 255.255.255.255 192.168.0.198 192.168.0.198 1
255.255.255.255 255.255.255.255 192.168.1.102 192.168.1.102 1
Default Gateway: 192.168.1.1
===========================================================================
Persistent Routes:
None
C:\Documents and Settings\Administrator>
--------------------------------------------------------------------------
这里10.99.0.0网段出现,还有其他的一些新增路由如111.111.111.0/24和222.222.0.0/16这些路由,这些都是由Server那里Push过来的 。并且他们的Metric是1,因此他们是优先匹配这些路由出局的 。
ping远端 Server主机虚拟地址
C:\Documents and Settings\Administrator>ping 10.99.0.1
Pinging 10.99.0.1 with 32 bytes of data:
Reply from 10.99.0.1: bytes=32 time=22ms TTL=64
Reply from 10.99.0.1: bytes=32 time=22ms TTL=64
Reply from 10.99.0.1: bytes=32 time=22ms TTL=64
Reply from 10.99.0.1: bytes=32 time=21ms TTL=64
Ping statistics for 10.99.0.1:
Packets: Sent = 4, Received = 4, Lost = 0 ,
Approximate round trip times in milli-seconds:
Minimum = 21ms, Maximum = 22ms, Average = 21ms
C:\Documents and Settings\Administrator>
【windows下的open函数,windows怎么安装openjdk】连接成功
- 春季老年人吃什么养肝?土豆、米饭换着吃
- 三八妇女节节日祝福分享 三八妇女节节日语录
- 老人谨慎!选好你的“第三只脚”
- 校方进行了深刻的反思 青岛一大学生坠亡校方整改校规
- 脸皮厚的人长寿!有这特征的老人最长寿
- 长寿秘诀:记住这10大妙招 100%增寿
- 春季老年人心血管病高发 3条保命要诀
- 眼睛花不花要看四十八 老年人怎样延缓老花眼
- 香槟然能防治老年痴呆症? 一天三杯它人到90不痴呆
- 老人手抖的原因 为什么老人手会抖
