当前位置:网站首页>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
其他
如有收获 欢迎点赞
如有作用 欢迎留言
如有问题 欢迎指出
边栏推荐
- MySQL24-索引的数据结构
- Windchill configure remote Oracle database connection
- Have you mastered the correct posture of golden three silver four job hopping?
- CSDN问答模块标题推荐任务(二) —— 效果优化
- MySQL27-索引優化與查詢優化
- Software test engineer development planning route
- Global and Chinese markets of static transfer switches (STS) 2022-2028: Research Report on technology, participants, trends, market size and share
- Pytorch RNN actual combat case_ MNIST handwriting font recognition
- Just remember Balabala
- CSDN question and answer module Title Recommendation task (I) -- Construction of basic framework
猜你喜欢

MySQL36-数据库备份与恢复

CSDN问答标签技能树(五) —— 云原生技能树

IDEA 导入导出 settings 设置文件

基于Pytorch的LSTM实战160万条评论情感分类

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

windows无法启动MYSQL服务(位于本地计算机)错误1067进程意外终止

用于实时端到端文本识别的自适应Bezier曲线网络

MySQL18-MySQL8其它新特性

ZABBIX introduction and installation

MySQL 29 other database tuning strategies
随机推荐
Emotional classification of 1.6 million comments on LSTM based on pytoch
Technology | diverse substrate formats
Navicat 导出表生成PDM文件
API learning of OpenGL (2003) gl_ TEXTURE_ WRAP_ S GL_ TEXTURE_ WRAP_ T
Mysql21 - gestion des utilisateurs et des droits
Just remember Balabala
Security design verification of API interface: ticket, signature, timestamp
Use of dataset of pytorch
基于Pytorch的LSTM实战160万条评论情感分类
MySQL34-其他数据库日志
Global and Chinese market of wafer processing robots 2022-2028: Research Report on technology, participants, trends, market size and share
Windchill configure remote Oracle database connection
The underlying logical architecture of MySQL
Time complexity (see which sentence is executed the most times)
Global and Chinese market for intravenous catheter sets and accessories 2022-2028: Research Report on technology, participants, trends, market size and share
MySQL21-用戶與權限管理
CSDN问答模块标题推荐任务(二) —— 效果优化
First blog
使用OVF Tool工具从Esxi 6.7中导出虚拟机
Kubesphere - deploy the actual combat with the deployment file (3)