当前位置:网站首页>frp内网穿透那些事
frp内网穿透那些事
2022-07-06 09:13:00 【hyh123a】
一、前言
好久没写了 ,这里把一些写过的发一下。
注意博客时间,如果不再适用请留言,或者参考官网教程自行改正。
_ 2021年7月16日 测试可用
场景需求
将内网一台服务器可以被其他人访问,这时候需要内网穿透
内网穿透的几个工具:frp,nps, rrty rrtys,这里只是讲述一下frp。
达成目的
用户可通过ssh访问内网服务器
二、frp详细介绍
官网参考文献: https://gofrp.org/docs/examples/
环境配置
| 主机 | 用户名 | IP |
|---|---|---|
| 服务器端 | usera | 123.123.123.1(云服务器的外网IP,这里随便写的) |
| 客户端(也就是本地电脑) | userb | 127.12.12.1(建议固定IP,这里随便写的) |
目的:使任何一台主机可以连接到内网的本地电脑
1、下载
https://github.com/fatedier/frp/releases
客户端
# 下载 当前版本最新为v37.0 __2021年07月16日
wegt https://github.com/fatedier/frp/releases/download/v0.37.0/frp_0.37.0_linux_amd64.tar.gz
tar zxvf frp_0.37.0_linux_amd64.tar.gz
cd frp_0.37.0_linux_amd64
服务器端
# 下载 当前版本最新为v37.0 __2021年07月16日
wegt https://github.com/fatedier/frp/releases/download/v0.37.0/frp_0.37.0_linux_amd64.tar.gz
tar zxvf frp_0.37.0_linux_amd64.tar.gz
cd frp_0.37.0_linux_amd64
2、服务器端开启 (也就是拥有外网的服务器,阿里云 腾讯云之类的) 这里假定服务器IP: 123.123.123.1
# 后台开启 点击回车
./frps -c frps.ini &
3、客户端开启
# 编辑配置 frpc.ini
nano frpc.ini
# 配置信息如下
[common]
server_addr = 123.123.123.1 # 修改这个为远程服务器IP
server_port = 7000
[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 6000
# 后台开启 点击回车
./frpc -c frpc.ini &
4、任意笔记本 通过ssh连接 客户端即可
ssh -p 6000 [email protected]
# ssh -p 6000 客户端用户名@服务器端外网IP
# 用户名为客户端的用户名 也就是userb而不是usera !
# 6000 端口 是有 frpc.ini决定的,可以自行设置
5、关闭
ps -aux|grep frp
lsof -i:7000
jobs -l
sudo kill -9 pid
其他工具
rrty rrtys
教程:https://github.com/zhaojh329/rtty/blob/master/README_ZH.md
其他
如有收获 欢迎点赞
如有作用 欢迎留言
如有问题 欢迎指出
边栏推荐
- 高并发系统的限流方案研究,其实限流实现也不复杂
- MySQL 29 other database tuning strategies
- [programmers' English growth path] English learning serial one (verb general tense)
- Mysql32 lock
- Isn't there anyone who doesn't know how to write mine sweeping games in C language
- 使用OVF Tool工具从Esxi 6.7中导出虚拟机
- PyTorch RNN 实战案例_MNIST手写字体识别
- MySQL30-事务基础知识
- [paper reading notes] - cryptographic analysis of short RSA secret exponents
- CSDN question and answer module Title Recommendation task (I) -- Construction of basic framework
猜你喜欢

CSDN question and answer module Title Recommendation task (II) -- effect optimization

Implement sending post request with form data parameter

ZABBIX introduction and installation

MySQL21-用户与权限管理

Valentine's Day is coming, are you still worried about eating dog food? Teach you to make a confession wall hand in hand. Express your love to the person you want

Csdn-nlp: difficulty level classification of blog posts based on skill tree and weak supervised learning (I)

35 is not a stumbling block in the career of programmers

What is the current situation of the game industry in the Internet world?

CSDN question and answer module Title Recommendation task (I) -- Construction of basic framework

Adaptive Bezier curve network for real-time end-to-end text recognition
随机推荐
The underlying logical architecture of MySQL
【C语言】深度剖析数据存储的底层原理
Mysql24 index data structure
In fact, the implementation of current limiting is not complicated
Yum prompt another app is currently holding the yum lock; waiting for it to exit...
Mysql22 logical architecture
用于实时端到端文本识别的自适应Bezier曲线网络
Why is MySQL still slow to query when indexing is used?
MySQL30-事务基础知识
Adaptive Bezier curve network for real-time end-to-end text recognition
MySQL35-主从复制
MySQL22-逻辑架构
MySQL26-性能分析工具的使用
[leectode 2022.2.13] maximum number of "balloons"
API learning of OpenGL (2002) smooth flat of glsl
API learning of OpenGL (2003) gl_ TEXTURE_ WRAP_ S GL_ TEXTURE_ WRAP_ T
February 13, 2022-3-middle order traversal of binary tree
MySQL21-用户与权限管理
35 is not a stumbling block in the career of programmers
How to find the number of daffodils with simple and rough methods in C language