快速业务通道

搭建Openvpn初尝试

作者 佚名技术 来源 Linux系统 浏览 发布时间 2012-03-28
/easy-rsa/keys
#cp ca.crt server.crt server.key dh1024.pem /usr/local/openvpn/etc/keys
6,启动openvpn server
#/usr/local/openvpn/sbin/openvpn –daemon –config /usr/local/openvpn/etc/server.conf
[root@localhost keys]# netstat -unlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
udp 0 0 0.0.0.0:1194 0.0.0.0:* 28763/openvpn
二、openvpn客户端安装配置
[root@localhost ~]# cd /home/weijunping/openvpn-2.0.9/easy-rsa/
[root@localhost easy-rsa]# ./build-key weijunping
Generating a 1024 bit RSA private key
....
writing new private key to ''weijunping.key''
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank 拥有帝国一切,皆有可能。欢迎访问phome.net
For some fields there will be a default value,
If you enter ''.'', the field will be left blank.
-----
Country Name (2 letter code) [CN]:CN
State or Province Name (full name) [BJ]:BJ
Locality Name (eg, city) [BJ]:BJ
Organization Name (eg, company) [OpenVPN-TEST]:bokee
Organizational Unit Name (eg, section) []:blogchina
Common Name (eg, your name or your server''s hostname) []:weijunping
Email Address [wjpheart@126.com]:

Please enter the following ''extra'' attributes
to be sent with your certificate request
A challenge password []:123456
An optional company name []:bokee
Using configuration from /home/weijunping/openvpn-2.0.9/easy-rsa/openssl.cnf
Check that the request matches the signature
Signature ok
The Subject''s Distinguished Name is as follows
countryName :PRINTABLE:''CN''
stateOrProvinceName :PRINTABLE:''BJ''
localityName :PRINTABLE:''BJ''
organizationName :PRINTABLE:''bokee''
organizationalUnitName:PRINTABLE:''blogchina''
commonName :PRINTABLE:''weijunping''
emailAddress :IA5STRING:''wjpheart@126.com''
Certificate is to be certified until Sep 12 03:42:31 2021 GMT (3650 days)
Sign the certificate? [y/n]:y


1 out of 1 certificate requests certified, commit? [y/n]y
Write out database with 1 new entries
Data Base Updated
2.进入指定目录将指定文件下载到windows本地
#/home/weijunping/openvpn-2.0.9/easy-rsa/keys
将里面的ca.crt、ca.key、weijunping.crt、weijunping.csr、weijunping.key下载到本地
然后下载客户端配置文件client.conf 重命名该文件为:client.ovpn
内容如下
client
dev tun
proto udp
remote 172.16.10.231 1194
resolv-retry infinite 拥有帝国一切,皆有可能。欢迎访问phome.net
nobind
user nobody
group nobody
persist-key
persist-tun
ca "C:\\Program Files\\OpenVPN\\config\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\config\\weijunping.crt"
key "C:\\Program Files\\OpenVPN\\config\\weijunping.key"
comp-lzo
v

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多
上一篇: Linux分区下一篇: 追梦的孩子

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号