企业实战(18)一文搞懂轻量级开源堡垒机Teleport的部署(1)

简介: 企业实战(18)一文搞懂轻量级开源堡垒机Teleport的部署(1)

介绍:


Teleport是一款简单易用的开源堡垒机系统,具有小巧、易用的特点,支持 RDP/SSH/SFTP/Telnet 协议的远程连接和审计管理。


Teleport由两大部分构成:


  • 跳板核心服务


  • WEB操作界面


Teleport非常小巧且极易安装部署:仅需一分钟,就可以安装部署一套您自己的堡垒机系统!


因为Teleport内建了所需的脚本引擎、WEB服务等模块,因此不需要额外安装其他的库或者模块,整个系统的安装与部署非常方便。


特点:


- 极易部署


  简洁设计,小巧灵活,无额外依赖,确保您可以在5分钟内完成安装部署,开始使用。


- 安全增强


  配置远程主机为仅被您的teleport服务器连接,可有效降低嗅探、扫描、暴力破解等攻击风险。


- 单点登录


  只需登录您的teleport服务器,即可一键连接您的任意远程主机,无需记忆每台远程主机的密码了。


- 按需授权


  可以随时授权指定运维人员访问指定的远程主机,也可随时回收授权。仅仅需要几次点击!


- 运维审计


  对远程主机的操作均有详细记录,支持操作记录录像、回放,审计工作无负担。


环境:


CentOS 7.5


Teleport 3.2.2


部署:


Teleport的安装部署非常简单,只需一分钟就可以完成。您需要先下载二进制安装包。


Teleport下载:https://tp4a.com/download


Teleport在线文档:https://docs.tp4a.com/


1.下载Teleport服务端安装包


[root@localhost ~]# mkdir teleport


[root@localhost ~]# cd teleport


[root@localhost teleport]# wget https://tp4a.com/static/download/teleport-server-linux-x64-3.2.2.tar.gz //下载Teleport服务端安装包


--2020-08-25 20:26:43-- https://tp4a.com/static/download/teleport-server-linux-x64-3.2.2.tar.gz

正在解析主机 tp4a.com (tp4a.com)... 39.97.125.170


正在连接 tp4a.com (tp4a.com)|39.97.125.170|:443... 已连接。


已发出 HTTP 请求,正在等待回应... 200 OK


长度:23137304 (22M) [application/octet-stream]


正在保存至: “teleport-server-linux-x64-3.2.2.tar.gz”


100%[============================================================>] 23,137,304 1.34MB/s 用时 19s


2020-08-25 20:27:03 (1.17 MB/s) - 已保存 “teleport-server-linux-x64-3.2.2.tar.gz” [23137304/23137304])


[root@localhost teleport]# ll


总用量 22596


-rw-r--r-- 1 root root 23137304 1月 23 2019 teleport-server-linux-x64-3.2.2.tar.gz


2.关闭防火墙


[root@localhost ~]# systemctl stop firewalld


[root@localhost ~]# sed -i 's/enforcing/disabled/' /etc/selinux/config


[root@localhost ~]# cat /etc/selinux/config


# This file controls the state of SELinux on the system.


# SELINUX= can take one of these three values:


#     disabled - SELinux security policy is enforced.


#     permissive - SELinux prints warnings instead of disabled.


#     disabled - No SELinux policy is loaded.


SELINUX=disabled         //永久关闭


# SELINUXTYPE= can take one of three two values:


#     targeted - Targeted processes are protected,


#     minimum - Modification of targeted policy. Only selected processes are protected.


#     mls - Multi Level Security protection.


SELINUXTYPE=targeted


[root@localhost ~]# iptables -F     //最好是把iptables规则也清空


3.解压Teleport服务端安装包


[root@localhost teleport]# tar -zvxf teleport-server-linux-x64-3.2.2.tar.gz


teleport-server-linux-x64-3.2.2/


teleport-server-linux-x64-3.2.2/data/


teleport-server-linux-x64-3.2.2/data/www/


teleport-server-linux-x64-3.2.2/data/www/teleport/


teleport-server-linux-x64-3.2.2/data/www/teleport/app_bootstrap.py


teleport-server-linux-x64-3.2.2/data/www/teleport/res/


teleport-server-linux-x64-3.2.2/data/www/teleport/res/fonts/


teleport-server-linux-x64-3.2.2/data/www/teleport/res/fonts/001.ttf


teleport-server-linux-x64-3.2.2/data/www/teleport/static/


teleport-server-linux-x64-3.2.2/data/www/teleport/static/css/


teleport-server-linux-x64-3.2.2/data/www/teleport/static/css/login.css


teleport-server-linux-x64-3.2.2/data/www/teleport/static/css/single.css


teleport-server-linux-x64-3.2.2/data/www/teleport/static/css/style.css


teleport-server-linux-x64-3.2.2/data/www/teleport/static/css/dashboard.css


4.查看并执行Teleport安装脚本


  安装时需要指定安装路径,可以使用默认的安装路径/usr/local/teleport(直接回车即可),也可以指定别的路径。注意路径中不要含有中文字符或空格,以避免出现不可预知的错误。


  默认的录像回放文件位于/usr/local/teleport/data/replay目录下,会占用/usr的空间,因此建议安装完成后配置录像回放文件的存储路径。


[root@localhost teleport]# ll


总用量 22596


drwxrwxr-x 5 1000 1000       62 1月 23 2019 teleport-server-linux-x64-3.2.2


-rw-r--r-- 1 root root 23137304 1月 23 2019 teleport-server-linux-x64-3.2.2.tar.gz


[root@localhost teleport]# cd teleport-server-linux-x64-3.2.2


[root@localhost teleport-server-linux-x64-3.2.2]# ll


总用量 4


drwxrwxr-x 2 1000 1000 80 9月 17 2018 daemon


drwxrwxr-x 5 1000 1000 39 1月 23 2019 data


drwxrwxr-x 3 1000 1000 33 1月 10 2019 script


-rwxrwxr-x 1 1000 1000 320 1月 23 2019 setup.sh


[root@localhost teleport-server-linux-x64-3.2.2]# ./setup.sh   //执行安装脚本


[]===========================================================================[]


| Teleport Server Installation  

                                          |

|===========================================================================|


|   ver: 3.2.2                                                             |


| author: apex.liu@qq.com                                                   |


[]===========================================================================[]


Welcome to install Teleport Server!


NOTICE: There are a few steps need you enter information or make choice,


     if you want to use the DEFAULT choice, just press `Enter` key.


     Otherwise you need enter the highlight character to make choice.


Prepare installation...


- check local installation ... [not exists]


Set installation path [/usr/local/teleport]:                   //默认的安装路径(回车)


- copy [/root/teleport/teleport-server-linux-x64-3.2.2/data/bin]


   -> [/usr/local/teleport/bin]


- copy [/root/teleport/teleport-server-linux-x64-3.2.2/data/www]


   -> [/usr/local/teleport/www]


- copy [/root/teleport/teleport-server-linux-x64-3.2.2/data/tmp/etc]

   -> [/usr/local/teleport/data/etc]


process [daemon.in] to [/etc/init.d/teleport]


process [start.sh.in] to [/usr/local/teleport/start.sh]


process [stop.sh.in] to [/usr/local/teleport/stop.sh]


process [status.sh.in] to [/usr/local/teleport/status.sh]


start services...


starting teleport web ... [done]


starting teleport core server ... [done]


check services status...


teleport web server is running.


teleport core server is running.


--==[ ALL DONE ]==--


5.访问进行初始化配置


  初次安装完成后,可以访问 http://你的teleport服务器IP:7190/进行初始化设置。


[root@localhost ~]# ss -antulp | grep :7190


tcp   LISTEN     0     128       *:7190                 *:*                   users:(("tp_web",pid=2917,fd=5))


初始化设置时,需要确定使用的数据库类型。Teleport默认使用内建的sqlite3数据库,因此无需额外安装数据库服务即可开始使用堡垒机的各项功能。如果您希望使用MySQL数据库,请在初始化之前进行MySQL数据库配置。

2.png

需要在这里设置系统管理员的账号和密码,此账号具有系统的最高权限,请牢记密码。设置完成后,点击“开始配置”按钮即可完成初始配置工作了:

3.png4.png5.png

服务控制:


Teleport 有两个服务:核心服务 core 和网页服务 web。两个服务可以同时启动、停止、重启,也可单独操作其中的一个。


操作完整的 teleport 服务:


  • 启动:/etc/init.d/teleport start


  • 停止:/etc/init.d/teleport stop


  • 重启:/etc/init.d/teleport restart


  • 查看运行状态:/etc/init.d/teleport status

仅操作核心服务 core:


  • 启动:/etc/init.d/teleport start core


  • 停止:/etc/init.d/teleport stop core


  • 重启:/etc/init.d/teleport restart core


仅操作网页服务 web:


  • 启动:/etc/init.d/teleport start web


  • 停止:/etc/init.d/teleport stop web


  • 重启:/etc/init.d/teleport restart web
目录
打赏
0
0
0
0
12
分享
相关文章
Jumpserver堡垒机部署和基本使用
Jumpserver堡垒机部署和基本使用
1225 2
【Docker项目实战】使用Docker部署OneTerm堡垒机
【8月更文挑战第6天】使用Docker部署OneTerm堡垒机
175 7
【Docker项目实战】使用Docker部署OneTerm堡垒机
推荐3个开源好用的堡垒机
【7月更文挑战第11天】
2192 0
推荐3个开源好用的堡垒机
如何在CentOS部署JumpServer堡垒机并实现无公网ip环境远程访问
如何在CentOS部署JumpServer堡垒机并实现无公网ip环境远程访问
280 0
堡垒机是什么:如何帮助企业提高网络安全防护
堡垒机是什么:如何帮助企业提高网络安全防护
如何在Linux部署JumpServer堡垒机并实现远程访问本地服务
如何在Linux部署JumpServer堡垒机并实现远程访问本地服务
269 0
开源堡垒机JumpServer本地安装并配置公网访问地址
开源堡垒机JumpServer本地安装并配置公网访问地址
754 0
企业实战(18)两步搞定轻量级开源堡垒机Teleport服务的数据备份与升级(3)
企业实战(18)两步搞定轻量级开源堡垒机Teleport服务的数据备份与升级(3)
138 0
企业实战(18)超简单实现轻量级开源堡垒机Teleport管理Linux/Windows主机(2)
企业实战(18)超简单实现轻量级开源堡垒机Teleport管理Linux/Windows主机(2)
177 0
实现远程访问Linux堡垒机:通过JumpServer系统进行安全的服务器管理
实现远程访问Linux堡垒机:通过JumpServer系统进行安全的服务器管理