当前位置:网站首页>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
其他
如有收获 欢迎点赞
如有作用 欢迎留言
如有问题 欢迎指出
边栏推荐
- How to change php INI file supports PDO abstraction layer
- Chrome浏览器端跨域不能访问问题处理办法
- pytorch的Dataset的使用
- A necessary soft skill for Software Test Engineers: structured thinking
- Transactions have four characteristics?
- What is the current situation of the game industry in the Internet world?
- Mysql22 logical architecture
- CSDN问答模块标题推荐任务(一) —— 基本框架的搭建
- Mysql27 index optimization and query optimization
- Installation and use of MySQL under MySQL 19 Linux
猜你喜欢
Mysql25 index creation and design principles
Typescript入门教程(B站黑马程序员)
35 is not a stumbling block in the career of programmers
Mysql34 other database logs
CSDN question and answer tag skill tree (I) -- Construction of basic framework
Navicat 导出表生成PDM文件
Introduction tutorial of typescript (dark horse programmer of station B)
Mysql28 database design specification
MySQL32-锁
UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xd0 in position 0成功解决
随机推荐
UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xd0 in position 0成功解决
MySQL combat optimization expert 02 in order to execute SQL statements, do you know what kind of architectural design MySQL uses?
windows无法启动MYSQL服务(位于本地计算机)错误1067进程意外终止
Global and Chinese market for intravenous catheter sets and accessories 2022-2028: Research Report on technology, participants, trends, market size and share
Set shell script execution error to exit automatically
CSDN question and answer tag skill tree (II) -- effect optimization
Global and Chinese market of transfer switches 2022-2028: Research Report on technology, participants, trends, market size and share
CSDN blog summary (I) -- a simple first edition implementation
高并发系统的限流方案研究,其实限流实现也不复杂
API learning of OpenGL (2001) gltexgen
Windchill configure remote Oracle database connection
[BMZCTF-pwn] 11-pwn111111
CSDN问答模块标题推荐任务(一) —— 基本框架的搭建
PyTorch RNN 实战案例_MNIST手写字体识别
C语言标准的发展
MySQL32-锁
Complete web login process through filter
CSDN问答标签技能树(五) —— 云原生技能树
Mysql34 other database logs
Development of C language standard