1,三个包
open***-2.1-0.29.rc15.el5.i386.rpm
lzo-2.02-2.el5.1.i386.rpm
lzo-devel-2.02-2.el5.1.i386.rpm
[root@xxw src]# find / -name open***
/etc/open*** (空的)
/etc/rc.d/init.d/open***
/usr/share/open*** (示例文件)
/usr/share/logwatch/scripts/services/open***
/usr/lib/open***
/usr/sbin/open***
/var/run/open***
[root@xxw easy-rsa]# ll /usr/share/open***/easy-rsa
total 8
drwxr-xr-x 2 root root 4096 Jun 5 13:02 1.0
drwxr-xr-x 2 root root 4096 Jun 5 13:02 2.0
cp 2.0/* /etc/open***
vi /etc/open***/vars 最后几行改好
export KEY_COUNTRY="CN"
export KEY_PROVINCE="BJ"
export KEY_CITY="BJ"
export KEY_ORG="XXW"
export KEY_EMAIL="[email protected]"
# . ./vars
NOTE: If you run ./clean-all, I will be doing a rm -rf on /etc/open***/keys (提示,不必理会)
#./clean-all
#./build-ca
最后的命令build-ca将认证CA证书,这些密匙跟openssl紧密结合.
服务端的:
#./build-key-server server
建立客户端证书:
#./build-key client1
#./build-key client2
#./build-key client3
如果你想保护你的客户端密匙,请运行build-key-pass脚本.
为了区分每个客户端,必须用适当的名称命名”Common Name”, 比如. "client1", "client2", or "client3". 通常是为每个客户端指定唯一的”common name”.
open***服务必须创建Diffe Hellman:
#./build-dh
#mkdir conf
#vi conf/server.conf
proto tcp
dev tun
ca /etc/open***/keys/ca.crt
cert /etc/open***/keys/server.crt
key /etc/open***/keys/server.key # This file should be kept secret
dh /etc/open***/keys/dh1024.pem
server 172.16.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
#push "route 172.16.0.0 255.255.255.0"
#push "route 172.16.0.0 255.255.255.0"
#client-config-dir /etc/open***/ccd
#route 172.16.0.0 255.255.255.0
client-to-client
keepalive 10 120
comp-lzo
user nobody
group nobody
persist-key
persist-tun
status open***-status.log
verb 3
open*** --config /etc/open***/conf/server.conf
;dev tap
dev tun
;dev-node MyTap
proto tcp
;proto udp
remote 192.168.13.211 1194
;remote my-server-2 1194
;remote-random
resolv-retry infinite
nobind
user nobody
group nobody
persist-key
persist-tun
;http-proxy-retry # retry on connection failures
;http-proxy [proxy server] [proxy port #]
;mute-replay-warnings
ca /etc/open***/keys/ca.crt
cert /etc/open***/keys/lin.crt
key /etc/open***/keys/lin.key
;ns-cert-type server
;tls-auth ta.key 1
;cipher x
comp-lzo
verb 3