77范文网 - 专业文章范例文档资料分享平台

RouterOS配置OpenVPN Server方法

来源:网络收集 时间:2020-04-17 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:或QQ: 处理(尽可能给您提供完整文档),感谢您的支持与谅解。点击这里给我发消息

RouterOS配置OpenVPN Server方法

一、OpenVPN证书制作

1、 1.1 下载Open VPN 并安装 安装Open VPN

Open VPN 安装完成。

安装完成后生成一个新网卡。

2、 制作证书

2.1 修改D:\\OpenVPN\\easy-rsa\\vars.bat.sample的以下部分 set HOME=%ProgramFiles%\\OpenVPN\\easy-rsa set KEY_COUNTRY=US set KEY_PROVINCE=CA

set KEY_CITY=SanFrancisco set KEY_ORG=FortFunston

set KEY_EMAIL=mail@host.domain

请根据自身情况修改改为: set KEY_COUNTRY=CN

set KEY_PROVINCE=Home911 set KEY_CITY=ChangChun set KEY_ORG=QCC

set KEY_EMAIL=mynetmail@foxmail.com

(注:修改vars.bat.sample文件用写字板)

2.2 Open VPN安全模式:

Open VPN 有两种安全模式。

一种基于使用 RSA 证书和密钥的 SSL/TLS。 一种使用预先分享的静态密钥。 本文采用SSL/TLS 模式。

TLS模式的优点是安全,而且便于管理用户。

默认情况下证书和用户是一对一的,多个用户使用同一证书会被踢出。 2.3 制作证书:

开始-->运行...-->键入cmd,回车,进入命令提示符-->进入D:\\OpenVPN\\easy-rsa目录 D:\\OpenVPN\\easy-rsa> 执行如下命令: init-config

D:\\OpenVPN\\easy-rsa>init-config <回车>

D:\\OpenVPN\\easy-rsa>copy vars.bat.sample vars.bat 已复制 1 个文件。

D:\\OpenVPN\\easy-rsa>copy openssl.cnf.sample openssl.cnf 已复制 1 个文件。 vars

D:\\OpenVPN\\easy-rsa>vars <回车> clean-all

D:\\OpenVPN\\easy-rsa>clean-all <回车> 系统找不到指定的文件。 已复制 1 个文件。 已复制 1 个文件。 Vars

D:\\OpenVPN\\easy-rsa>vars <回车> build-ca

D:\\OpenVPN\\easy-rsa>build-ca <回车> #生成根证书 Loading 'screen' into random state - done Generating a 1024 bit RSA private key ............++++++ ...++++++

writing new private key to 'keys\\ca.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) [Office911]: <回车> Locality Name (eg, city) [ChangChun]: <回车> Organization Name (eg, company) [QCQ]: <回车>

Organizational Unit Name (eg, section) []:QCLZ <回车>

Common Name (eg, your name or your server's hostname) []:OVPN_IN One <回车> Email Address [mynetmail@foxmail.com]: Vars

D:\\OpenVPN\\easy-rsa>vars <回车> build-dh

D:\\OpenVPN\\easy-rsa>build-dh <回车> #这个有点慢,估计要半分钟 Loading 'screen' into random state - done

Generating DH parameters, 1024 bit long safe prime, generator 2 This is going to take a long time

...............+...................................+........+................... .......+...+......................+.........+................................... ...................................................+............................ ......................+......................................................... .......+......................++*++*++* Vars

D:\\OpenVPN\\easy-rsa>vars <回车> build-key-server server

D:\\OpenVPN\\easy-rsa>build-key-server server <回车> #生成服务器端的密钥 Server 为服务器端文件名

Loading 'screen' into random state - done Generating a 1024 bit RSA private key .......................++++++

..................................................................++++++ writing new private key to 'keys\\server.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) [Office911]: Locality Name (eg, city) [ChangChun]: Organization Name (eg, company) [QCQ]:

Organizational Unit Name (eg, section) []:QCLZ

Common Name (eg, your name or your server's hostname) []:OVPN_IN One Email Address [mynetmail@foxmail.com]:

Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []:1124 An optional company name []:

Using configuration from openssl.cnf

Loading 'screen' into random state - done Check that the request matches the signature Signature ok

The Subject's Distinguished Name is as follows countryName :PRINTABLE:'CN'

stateOrProvinceName :PRINTABLE:'Office911' localityName :PRINTABLE:'ChangChun' organizationName :PRINTABLE:'QCQ' organizationalUnitName:PRINTABLE:'QCLZ'

commonName :T61STRING:'OVPN_IN One'

emailAddress :IA5STRING:'mynetmail@foxmail.com'

百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库RouterOS配置OpenVPN Server方法在线全文阅读。

RouterOS配置OpenVPN Server方法.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印 下载失败或者文档不完整,请联系客服人员解决!
本文链接:https://www.77cn.com.cn/wenku/zonghe/979874.html(转载请注明文章来源)
Copyright © 2008-2022 免费范文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ: 邮箱:tiandhx2@hotmail.com
苏ICP备16052595号-18
× 注册会员免费下载(下载后可以自由复制和排版)
注册会员下载
全站内容免费自由复制
注册会员下载
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: