iis服务器助手广告广告
返回顶部
首页 > 资讯 > 后端开发 > Python >open***2.3.12安装与easy
  • 266
分享到

open***2.3.12安装与easy

openeasy 2023-01-31 07:01:08 266人浏览 泡泡鱼

Python 官方文档:入门教程 => 点击学习

摘要

 最近公司要求在内网部署一套open***使用,上网查了一下才发现open***版本已经升级到2.3.12了,其中最主要的改动是源码包里不再包含easy-rsa,如今部署open***要去GitHub上面下载easy-rsa程序,并且eas

 最近公司要求在内网部署一套open***使用,上网查了一下才发现open***版本已经升级到2.3.12了,其中最主要的改动是源码包里不再包含easy-rsa,如今部署open***要去GitHub上面下载easy-rsa程序,并且easy-rsa也已经升级到了第三个版本(以往easy-rsa2居多),所以决定重新整理一下新版本的open***部署,以及easy-rsa3的使用。


部署open***:

一:yum源安装相关的包:

# yum -y install openssl.x86_64 pam-devel.x86_64


二:安装lzo包,lzo包需源码包编译安装,不然编译open***时会报"lzo missing"的错误:

# tar -zxvf lzo-2.03.tar.gz
# cd lzo-2.03
# ./configure --prefix=/usr/local
# make && make install


三:编译安装open***:

# tar -zxvf open***-2.3.12.tar.gz
# cd open***-2.3.12
# ./configure --prefix=/opt/apps/open***
# make && make install


四:获取easy-rsa3应用:

 创建etc目录,从https://github.com/Open×××/easy-rsa下载easy-rsa3程序包:

# mkdir /opt/apps/open***/etc && cd /opt/apps/open***/etc
# unzip easy-rsa-master.zip
# cd easy-rsa-master && mv ../easyrsa3 && cd ..

 以上,就获取到了easyrsa3程序,easyrsa目录结构如下:

# tree easyrsa3/
easyrsa3/
├── easyrsa
├── openssl-1.0.cnf
├── vars.example
└── x509-types
    ├── ca
    ├── client
    ├── COMMON
    └── server

 可以看到easy-rsa3中,少了2版本中的许多执行文件,只剩下easyrsa一个执行文件,使用这个文件,就可以创建各种所需的密钥文件。



五:创建服务端与客户端密钥:

 服务端:(这里采用无密码方式创建相关文件,避免后期输入pam密码的各种麻烦)

# cp -rp easyrsa3 key_server
# cd key_server


----var文件-----------
# mv vars.example vars


----初始化pki目录------
# ./easyrsa init-pki
Note: using Easy-RSA configuration from: ./vars
init-pki complete; you may now create a CA or requests.
Your newly created PKI dir is: /opt/apps/open***/etc/key_server/pki


----以无密码方式,创建服务器ca文件-----
# ./easyrsa build-ca nopass
Note: using Easy-RSA configuration from: ./vars
Generating a 2048 bit RSA private key
................................................................+++
......................+++
writing new private key to '/opt/apps/open***/etc/key_server/pki/private/ca.key.xyvUlxOV9t'
-----
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.
-----
Common Name (eg: your user, host, or server name) [Easy-RSA CA]:
CA creation complete and you may now import and sign cert requests.
Your new CA certificate file for publishing is at:
/opt/apps/open***/etc/key_server/pki/ca.crt


----创建服务端key文件--------
# ./easyrsa gen-req cmhserver nopass
Note: using Easy-RSA configuration from: ./vars
Generating a 2048 bit RSA private key
...................................+++
...................................................+++
writing new private key to '/opt/apps/open***/etc/key_server/pki/private/cmhserver.key.0S1X7d4NCP'
-----
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.
-----
Common Name (eg: your user, host, or server name) [cmhserver]:
Keypair and certificate request completed. Your files are:
req: /opt/apps/open***/etc/key_server/pki/reqs/cmhserver.req
key: /opt/apps/open***/etc/key_server/pki/private/cmhserver.key


----注册服务端CN名,生产服务端crt文件------
# ./easyrsa sign server cmhserver
Note: using Easy-RSA configuration from: ./vars
You are about to sign the following certificate.
Please check over the details shown below for accuracy. Note that this request
has not been cryptographically verified. Please be sure it came from a trusted
source or that you have verified the request checksum with the sender.
Request subject, to be signed as a server certificate for 3650 days:
subject=
    commonName                = cmhserver
Type the Word 'yes' to continue, or any other input to abort.
  Confirm request details: yes
Using configuration from /opt/apps/open***/etc/key_server/openssl-1.0.cnf
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
commonName            :PRINTABLE:'cmhserver'
Certificate is to be certified until Oct 29 03:51:14 2026 GMT (3650 days)
Write out database with 1 new entries
Data Base Updated
Certificate created at: /opt/apps/open***/etc/key_server/pki/issued/cmhserver.crt


------dh.pem文件生产-------
# ./easyrsa gen-dh
Note: using Easy-RSA configuration from: ./vars
Generating DH parameters, 2048 bit long safe prime, generator 2
This is Going to take a long time
.................................................................................................................................................................+.................................................................................................................+................+..........................................................................................................................................+..........................................................................+.........+..............+..+..............................................................................................................................................................+...............................................................+.............................................+..................................................................................................................+..................................................+.................................................................................+..........+................................................................................................................+............................................................+..+...........+..................................................................+..............+..........................................................................+.+........+........................................................................................................................................................+..................++*++*
DH parameters of size 2048 created at /opt/apps/open***/etc/key_server/pki/dh.pem

 

 客户端:

# cd /opt/apps/open***/etc
# cp -rp easyrsa3 key_client
# cd key_client

----var文件-----------
# mv vars.example vars


----初始化pki目录------
# ./easyrsa init-pki
Note: using Easy-RSA configuration from: ./vars
init-pki complete; you may now create a CA or requests.
Your newly created PKI dir is: /opt/apps/open***/etc/key_server/pki


----以无密码方式,创建客户端key文件-----
# ./easyrsa gen-req cmhclient nopass

Note: using Easy-RSA configuration from: ./vars
Generating a 2048 bit RSA private key
...............+++
..........................+++
writing new private key to '/opt/apps/open***/etc/key_client/pki/private/cmhclient.key.RM36zZRxnc'
-----
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.
-----
Common Name (eg: your user, host, or server name) [cmhclient]:

Keypair and certificate request completed. Your files are:
req: /opt/apps/open***/etc/key_client/pki/reqs/cmhclient.req
key: /opt/apps/open***/etc/key_client/pki/private/cmhclient.key


-----进入服务端key目录,关联客户端req,使之向服务端注册----
# cd ../key_server/
# ./easyrsa import-req /opt/apps/open***/etc/key_client/pki/reqs/cmhclient.req cmhclient

Note: using Easy-RSA configuration from: ./vars

The request has been successfully imported with a short name of: cmhclient
You may now use this name to perform signing operations on this request.


-----注册客户端CN名,生产客户端key文件-------
# ./easyrsa sign client cmhclient

Note: using Easy-RSA configuration from: ./vars


You are about to sign the following certificate.
Please check over the details shown below for accuracy. Note that this request
has not been cryptographically verified. Please be sure it came from a trusted
source or that you have verified the request checksum with the sender.

Request subject, to be signed as a client certificate for 3650 days:

subject=
    commonName                = cmhclient


Type the word 'yes' to continue, or any other input to abort.
  Confirm request details: yes
Using configuration from /opt/apps/open***/etc/key_server/openssl-1.0.cnf
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
commonName            :PRINTABLE:'cmhclient'
Certificate is to be certified until Oct 29 03:54:56 2026 GMT (3650 days)

Write out database with 1 new entries
Data Base Updated

Certificate created at: /opt/apps/open***/etc/key_server/pki/issued/cmhclient.crt

 

六:服务端配置,指定相关ca、crt、key文件,打开服务器路由转发以及防火墙转发:

# cp /opt/src/open***-2.3.12/sample/sample-config-files/server.conf /opt/apps/open***/etc/
# grep -v "^#" server.conf | grep -v "^;" | grep -v "^$"
local 192.168.52.135
port 1194
proto tcp
dev tun
ca /opt/apps/open***/etc/key_server/pki/ca.crt
cert /opt/apps/open***/etc/key_server/pki/issued/cmhserver.crt
key /opt/apps/open***/etc/key_server/pki/private/cmhserver.key
dh /opt/apps/open***/etc/key_server/pki/dh.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
client-to-client
keepalive 10 120
comp-lzo
persist-key
persist-tun
status open***-status.log
verb 3

打开服务器的ip路由转发功能,并生效;

# grep ipv4 /etc/sysctl.conf
net.ipv4.ip_forward= 1
# sysctl -p
net.ipv4.ip_forward= 1
# iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -jMASQUERADE


七:开启服务以及客户端配置:

# /opt/apps/open***/sbin/open*** --daemon --config /opt/apps/open***/etc/server.conf


客户端下载如下文件,并应用,即可使用密钥使用×××:(各系统的客户端配置不一,故这里不赘述客户端配置)

/opt/apps/open***/etc/key_server/pki/ca.crt

/opt/apps/open***/etc/key_client/pki/private/cmhclient.key

/opt/apps/open***/etc/key_server/pki/issued/cmhclient.crt






--结束END--

本文标题: open***2.3.12安装与easy

本文链接: https://www.lsjlt.com/news/191311.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • open***2.3.12安装与easy
     最近公司要求在内网部署一套open***使用,上网查了一下才发现open***版本已经升级到2.3.12了,其中最主要的改动是源码包里不再包含easy-rsa,如今部署open***要去github上面下载easy-rsa程序,并且eas...
    99+
    2023-01-31
    open easy
  • MacOS M1安装easy connect
    现象 如果使用chrome下载的easyconnect, 会提示版本与服务器不一致 解决办法 使用Safari浏览器下载的安装包,安装之后,可以正常使用 来源地址:https://blog....
    99+
    2023-09-20
    编辑器 easyconnect macos m1
  • BackTrack R3 安装 Open
    1、按照BackTrack Cook 5 安装步骤出现问题 报错 在执行 /pentest/misc/openvas/openvas-check-setup.sh时报错 Make sure OpenVAS Scanner is runni...
    99+
    2023-01-31
    BackTrack Open
  • Open SUSE如何安装OpenFOAM
    这篇文章给大家分享的是有关Open SUSE如何安装OpenFOAM的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。安装Open SUSE 在网上下载一个Open SUSE(***刻成盘)直接用图形界面安装。在软件...
    99+
    2023-06-17
  • vmware下如何安装Open Suse
    这篇文章主要为大家展示了“vmware下如何安装Open Suse”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“vmware下如何安装Open Suse”这篇文章吧。最近在自己的机器上安装了虚拟...
    99+
    2023-06-17
  • Open SUSE中Jdk和mysql的安装方法
    本篇内容介绍了“Open SUSE中Jdk和mysql的安装方法”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!一.MySQL最基本的要下载两...
    99+
    2023-06-17
  • Open SUSE11.x都有哪些安装技巧
    这篇文章给大家介绍Open SUSE11.x都有哪些安装技巧,内容非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能有所帮助。LINUX.经过长时间的发展,很多用户都很了解LINUX了,当今世界最绚丽的操作系统OpenSUSE。这里我发表...
    99+
    2023-06-17
  • Open Suse如何安装nVIDIA显卡驱动
    这篇文章主要介绍Open Suse如何安装nVIDIA显卡驱动,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!软硬件环境:1.CPU:AMD Athlon64 X2 5000+ AM2(65纳米)2.显卡:影驰8500...
    99+
    2023-06-17
  • linux中如何安装使用open-falcon agent
    这篇文章将为大家详细讲解有关linux中如何安装使用open-falcon agent,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。open-falcon agent项目之前是一个独立项目名字叫falco...
    99+
    2023-06-27
  • Linux安装Mysql报错:libtinfo.so.5: cannot open shared object file
            我在Linux上安装Mysql 8.0,准备启动的时候遇到了如标题所示的错误: mysql: error while loading shared libraries: libtinfo.so.5: cannot open ...
    99+
    2023-08-31
    linux mysql
  • Open Suse11.0.NTFS分区硬盘安装的示例分析
    这篇文章主要介绍了Open Suse11.0.NTFS分区硬盘安装的示例分析,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。示例环境如下:硬件环境: lenovo thinkp...
    99+
    2023-06-16
  • windows系统下安装Cypress及cypress open报错解决
    目录安装cypress一、操作系统二、安装依赖1.node.js2.linux三、安装四、安装完成,打开cypress解决报错安装cypress 一、操作系统 先确认下你的系统,是否...
    99+
    2024-04-02
  • yum安装与源码安装比较
    跟做运维的朋友聊天,谈到了,yum安装和源码安装哪个好的问题。真没想到,关于这个问题,分歧还挺大的。有的人认为,不用源码安装就不是好的运维,不是好的系统管理员。这帽子扣的有点大了。在此我想说一说我的看法,经常看我博客的,也许知道,前期我写关...
    99+
    2023-06-05
  • 安装与配置
    Python 下载网址 Welcome to Python.org 按照对应的操作系统选择 3、下滑找到3.10.0版本根据电脑配置选择64位或者32位. 注意,有embeddable package和windows installer两...
    99+
    2023-09-01
    python
  • Python requests 安装与
    Requests 是用Python语言编写HTTP客户端库,跟urllib、urllib2类似,基于 urllib,但比 urllib 更加方便,可以节约我们大量的工作,完全满足 HTTP 测试需求,编写爬虫和测试服务器响应数据时经常会用...
    99+
    2023-01-31
    Python requests
  • python setuptools安装与
    Python本身自带了一套工具distutils ,用于发布 Python 应用程序。但 distutils 没有提供定义其它依赖包的功能,setuptools 的真正优点并不在于实现distutils 所能实现的功能——尽管它的确增强了d...
    99+
    2023-01-31
    python setuptools
  • OpenEuler系统安装与MySQL数据安装
    使用工具及镜像: 虚拟机:VMware16 openeuler镜像:openEuler-22.03-LTS-x86_64 mysql版本:mysql-5.7.40-1.el7.x86_64.rpm-bundle 一、系统安装(多图)...
    99+
    2023-09-12
    linux 数据库 mysql Powered by 金山文档
  • windows系统下安装Cypress及cypress open报错怎么解决
    这篇文章主要介绍“windows系统下安装Cypress及cypress open报错怎么解决”的相关知识,小编通过实际案例向大家展示操作过程,操作方法简单快捷,实用性强,希望这篇“windows系统下安装Cypress及cypr...
    99+
    2023-06-30
  • Nginx安装步骤——离线安装与在线安装详解
    目录 Linux环境下Nginx的离线安装与在线安装详细步骤一、离线安装1.安装环境2.安装nginx 二、在线安装1.安装相关依赖2.安装nginx nginx相关命令1、查看n...
    99+
    2023-09-10
    nginx linux 后端
  • Node.js安装与配置
    ✅作者简介:CSDN一位小博主,正在学习前端,欢迎大家一起来交流学习🏆 📃个人主页:白月光777的CSDN博客 🔥系列专栏:Vue从入门到进阶 &#...
    99+
    2023-09-07
    vue.js node.js 前端
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作