快速业务通道

基于Linux的 OpenVPN网络之网络架构应用实例(三)

作者 佚名技术 来源 Linux系统 浏览 发布时间 2012-04-14

配置“GW1 <----> PC1”隧道连接

本小节主要描述如何创建第 2 条 SSL VPN 隧道,用于在 GW1、PC1 之间建立点到点的安全连接,以便 Windows XP 客户端能够从 Internet 中安全的接入总部的 VPN 网络,进一步访问两地的局域网络.

第一步、配置主服务器(GW1)——北京

1. 创建 PC1 用户端密钥

在 GW1 服务器上为 PC1 网管机建立单独的密钥文件,注意 Common Name 不要和其他密钥重复.生成的密钥文件必需放置到/etc/openvpn/keys/目录中(可以直接调整 KEY_DIR 变量).

[root@gw1 ~]# cd /soft_dir/openvpn-2.0.9/easy-rsa/

[root@gw1 easy-rsa]# source vars

NOTE: when you run ./clean-all, I will be doing a rm -rf on /soft_dir/openvpn-2.0.9/easy-rsa/keys

[root@gw1 easy-rsa]# export KEY_DIR=/etc/openvpn/keys/

[root@gw1 easy-rsa]# ./build-key client-pc1

Generating a 1024 bit RSA private key

.........

...............

writing new private key to ''client-pc1.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

For some fields there will be a default value,

If you enter ''.'', the field will be left blank.

-----

Country Name (2 letter code) [CN]:

State or Province Name (full name) [BeiJing]:

Locality Name (eg, city) [BISHKEK]:

Organization Name (eg, company) [BENET.Inc]:

Organizational Unit Name (eg, section) []:

Common Name (eg, your name or your server''s hostname) []:client-pc1.benet.com

Email Address [vpnadm@benet.com]:

Please enter the following ''extra'' attributes

to be sent with your certificate request

A challenge password []:

An optional company name []:

Using configuration from /soft_dir/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:''BeiJing''

localityName :PRINTABLE:''BISHKEK''

organizationName :PRINTABLE:''BENET.Inc''

commonName :PRINTABLE:''client-pc1.benet.com''

emailAddress :IA5STRING:''vpnadm@benet.com''

Certificate is to be certified until Jul 12 06:10:23 2020 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

Empire CMS,phome.net

2. 创建第 2 个服务配置文件

该配置文件用于

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

分享到: 更多

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号