![Linux为企业搭建稳固的SSL VPN服务_第1页](http://file4.renrendoc.com/view/df82574f6d970859550664d35f1d4e66/df82574f6d970859550664d35f1d4e661.gif)
![Linux为企业搭建稳固的SSL VPN服务_第2页](http://file4.renrendoc.com/view/df82574f6d970859550664d35f1d4e66/df82574f6d970859550664d35f1d4e662.gif)
![Linux为企业搭建稳固的SSL VPN服务_第3页](http://file4.renrendoc.com/view/df82574f6d970859550664d35f1d4e66/df82574f6d970859550664d35f1d4e663.gif)
![Linux为企业搭建稳固的SSL VPN服务_第4页](http://file4.renrendoc.com/view/df82574f6d970859550664d35f1d4e66/df82574f6d970859550664d35f1d4e664.gif)
![Linux为企业搭建稳固的SSL VPN服务_第5页](http://file4.renrendoc.com/view/df82574f6d970859550664d35f1d4e66/df82574f6d970859550664d35f1d4e665.gif)
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Linux为企业搭建稳固的SSL VPN服务Linux为企业搭建稳固的SSL VPN服务Linux为企业搭建稳固的SSL VPN服务资料仅供参考文件编号:2022年4月Linux为企业搭建稳固的SSL VPN服务版本号: A修改号: 1页 次: 1.0 审 核: 批 准: 发布日期: Linux为企业搭建稳固的SSL VPN服务作者:佚名出处:论坛2013-05-16 06:55一、OpenVPN是靠虚拟的TUN/TAP设备实现SSL VPN的,因此内核必须支持TUN/TAP设备模块,这个配置选项在内核中,位于Device Drivers -Network device support 菜单中
2、,全称是Universal TUN/TAP device driver support ,通常在标准内核 中,会以模块方式提供,在Open VPN启动时,它会自动加载此模块,因此不需要手工加载此模块。rootdic172 pwd/usr/src/kernels/rootdic172 make menuconfig #打开内核菜单Device Drivers Network device support Universal TUN/TAP device driver support #即表示以模块化加载到内核中二、在安装OpenVPN之前,还需要安装一些支持包,包括OpenSSL开发库和LZO压
3、缩开发库1、可使用yum安装OpenSSL开发库,但需要手工下载并安装LZO开发包。rootdic172 /# yum install opensslrootdic172 /# yum install openssl-devel2、可到 下载LZOrootdic172 src# tar zxvf rootdic172 src# cd rootdic172 # ./configurerootdic172 # makerootdic172 # make install三、配置SSL VPN服务1、到 release/ 下载并安装rootdic172 src# tar zxvf rootdic172
4、 src# cd rootdic172 ./configurerootdic172 makerootdic172 make installrootdic172 cp -p sample-scripts/ /etc/openvpnrootdic172 chkconfig -add openvpnrootdic172 service openvpn status #查看服务状态openvpn: service not startedrootdic172 chkconfig -level 235 openvpn onrootdic172 chkconfig -list openvpnopenvpn
5、0:off 1:off 2:on 3:on 4:on 5:on 6:off2、开启IP转发功能rootdic172 vi /etc/ = 1rootdic172 sysctl -p3、定义OpenVPN的配置目录为/etc/openvpn,把服务器配置文件定义为/etc/openvpn/OpenVPN是一个SSL VPN实现,因此,认证中最重要的是服务器和客户端的SSL证书管理,如果管理员之前没有SSL证书发布机制,那么可以使用OpenVPN附带的一组工具来完成所有的工作。在/usr/src/中,有一个easy-rsa目录,这下面就是一些一成和管理SSL证书的工具,以下为生成证书操作。root
6、dic172 mkdir -p /etc/openvpnrootdic172 cp -p sample-config-files/ /etc/openvpn/ #将样本配置文件复制到/etc/openvpn/,后面再做修改4、修改vars文件变量,设置国家代码、省份、地市、机构名单、单位名称邮件等rootdic172 cd easy-rsa/rootdic172 easy-rsa# grep -v # varsexport D=pwdexport KEY_CONFIG=$D/export KEY_DIR=$D/keysecho NOTE: when you run ./clean-all, I
7、 will be doing a rm -rf on $KEY_DIRexport KEY_SIZE=1024export KEY_COUNTRY=CNexport KEY_PROVINCE=GDexport KEY_CITY=SZexport KEY_ORG=DICexport KEY_EMAIL=rootdic172 easy-rsa# source varsNOTE: when you run ./clean-all, I will be doing a rm -rf on /usr/src/ #提示可使用./clean-all清除所有包括CA在内的所有证书5、使用clean-all脚本
8、清除包括CA在内的所有证书,再创建CA证书。rootdic172 easy-rsa# ./clean-all #先清除证书,再创建证书rootdic172 easy-rsa# ./build-ca #创建CA证书Generating a 1024 bit RSA private key+writing new private key to You are about to be asked to enter information that will be incorporatedinto your certificate request.What you are about to enter
9、 is what is called a Distinguished Name or a DN.There are quite a few fields but you can leave some blankFor 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) GD:Locality Name (eg, city) SZ:Organi
10、zation Name (eg, company) DIC:Organizational Unit Name (eg, section) :Common Name (eg, your name or your servers hostname) :dic172 #服务器主机名Email Address:6、创建服务器密钥。rootdic172 easy-rsa# ./build-key-server server #创建服务器端密钥Generating a 1024 bit RSA private key+writing new private key to You are about to
11、be asked to enter information that will be incorporatedinto 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 blankFor some fields there will be a default value,If you enter ., the field will be lef
12、t blank.Country Name (2 letter code) CN:State or Province Name (full name) GD:Locality Name (eg, city) SZ:Organization Name (eg, company) DIC:Organizational Unit Name (eg, section) :Common Name (eg, your name or your servers hostname) :dic172 #服务器主机名Email Address:Please enter the following extra att
13、ributesto be sent with your certificate requestA challenge password :dic172An optional company name :dic172Using configuration from /usr/src/Check that the request matches the signatureSignature okThe Subjects Distinguished Name is as followscountryName :PRINTABLE:CNstateOrProvinceName :PRINTABLE:GD
14、localityName :PRINTABLE:SZorganizationName :PRINTABLE:DICcommonName :PRINTABLE:dic172emailAddress :IA5STRING:Certificate is to be certified until Jul 16 05:51:08 2021 GMT (3650 days)Sign the certificate y/n:y1 out of 1 certificate requests certified, commit y/nyWrite out database with 1 new entriesD
15、ata Base UpdatedNextPage7、创建客户端密钥,客户端密钥名可随意命名。rootdic172 easy-rsa# ./build-key clientGenerating a 1024 bit RSA private key+writing new private key to You are about to be asked to enter information that will be incorporatedinto your certificate request.What you are about to enter is what is called a
16、Distinguished Name or a DN.There are quite a few fields but you can leave some blankFor 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) GD:Locality Name (eg, city) SZ:Organization Name (eg, comp
17、any) DIC:Organizational Unit Name (eg, section) :Common Name (eg, your name or your servers hostname) :tgh #不同客户端,命名绝不能一样Email Address:Please enter the following extra attributesto be sent with your certificate requestA challenge password :dic172An optional company name :dic172Using configuration fr
18、om /usr/src/Check that the request matches the signatureSignature okThe Subjects Distinguished Name is as followscountryName :PRINTABLE:CNstateOrProvinceName :PRINTABLE:GDlocalityName :PRINTABLE:SZorganizationName :PRINTABLE:DICcommonName :PRINTABLE:tghemailAddress :IA5STRING:Certificate is to be ce
19、rtified until Jul 16 05:52:27 2021 GMT (3650 days)Sign the certificate y/n:y1 out of 1 certificate requests certified, commit y/nyWrite out database with 1 new entriesData Base Updated8、创建dhDiffie-Hellman )密钥算法文件rootdic172 easy-rsa# ./build-dhGenerating DH parameters, 1024 bit long safe prime, gener
20、ator 2This is going to take a long time.+.+*+*+*9、生成 tls-auth 密钥 ,tls-auth密钥可以为点对点的VPN连接提供了进一步的安全验证,如果选择使用这一方式,服务器端和客户端都必须拥有该密钥文件。rootdic172 easy-rsa# openvpn -genkey -secret keys/rootdic172 easy-rsa# cp -rp keys/ /etc/openvpn/ #将证书文件复制到/etc/openvpn/10、修改配置文件rootdic172 openvpn# grep -v # local #服务器所使用的IPport 1194 #使用1194端口proto udp #使用UDP协议dev tun #使用tun设备ca /etc/openvpn/keys/ #指定CA证书文件路径cert /etc/openvpn/keys/dh /etc/openvpn/keys/tls-auth /etc/openvpn/keys/ 0server #VPN客户端拨入后,所获得的IP地址池ifconfig-pool-persist push dhcp-op
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年观火孔行业深度研究分析报告
- 户口被注销申请书
- 2025年城市地下空间开发劳务承包合同样本
- 2025年度宅基地使用权入股合作开发合同
- 2025年度农村住房安全保障农民住房建设合同
- 就业帮扶申请书
- 2025年度城市公共交通车辆租赁及运营管理合同
- 2025年度事业单位业务合同数据安全与隐私保护合同
- 2025年度专业图书馆特色学科图书采购合同
- 大学退社团申请书
- 矿山生态修复工程不稳定斜坡治理工程设计
- 2024年江西省高考物理试卷(含答案解析)
- 颈部瘢痕挛缩畸形治疗
- 贵州省贵阳市2023-2024学年五年级上学期语文期末试卷(含答案)
- 规划课题申报范例:俄罗斯教育改革研究(附可修改技术路线图)
- 运输企业安全事故报告调查处理制度(简单版5篇)
- SAP导出科目余额表和凭证表操作说明及截图可编辑范本
- 仓库货物安全管理
- 端午做香囊课件
- 2024年部编版九年级语文上册电子课本(高清版)
- 墨香里的年味儿(2023年辽宁沈阳中考语文试卷记叙文阅读题及答案)
评论
0/150
提交评论