当前位置:网站首页>搭建frp进行内网穿透
搭建frp进行内网穿透
2022-07-31 08:21:00 【CAFEBABE 34】
一、服务器端
拥有公网ip的服务器!!!
- 下载 frp
wget https://github.com/fatedier/frp/releases/download/v0.38.0/frp_0.38.0_linux_amd64.tar.gz
- 解压重命名
tar -zxvf frp_0.38.0_linux_amd64.tar.gz
cp -r frp_0.38.0_linux_amd64.tar.gz frp
- 删掉不用的frpc
rm frpc
rm frpc.ini
rm frpc_full.ini
- 配置frps.ini
# vim frps.ini
[common]
bind_port = 8080 #与客户端绑定的端口
vhost_http_port = 8081 #对外提供的http端口
- 启动服务端
nohup ./frps -c frps.ini &
6. 设置安全组开放 8080,8081端口
7. 关闭防火墙
二、客户端
内网主机,需要穿透的主机
- 下载frp, 删除与frps相关的文件
- 配置frpc.ini
# vim frpc.ini
[common]
server_addr = 公网ip
server_port = 8080
[web]
type = http
local_port = 80
custom_domains = 与公网ip绑定的域名(没有就写公网ip)
- 启动frpc
- 测试访问
本地访问:
使用公网ip访问:
边栏推荐
- SQL语句知识大全
- 【小程序专栏】总结uniapp开发小程序的开发规范
- 【云原生】微服务之Feign的介绍与使用
- sqlmap使用教程大全命令大全(图文)
- New in Visual Studio: Low Priority Builds
- 【Unity】编辑器扩展-04-拓展Scene视图
- Job hunting product manager [9] How to write a good resume in job hunting season?
- 如何在 Linux 上安装 MySQL
- 【idea 报错】 无效的目标发行版:17 的解决参考
- Which strings will be parsed as null by FastJson?
猜你喜欢
随机推荐
科目三:左转弯
SQL连接表(内连接、左连接、右连接、交叉连接、全外连接)
[Yellow ah code] Introduction to MySQL - 3. I use select, the boss directly drives me to take the train home, and I still buy a station ticket
A, MySQL principle of master-slave replication
"The C language games" mine clearance
模块化规范
XSS详解
【MySQL功法】第2话 · 数据库与数据表的基本操作
高并发高可用高性能的解决方案
Ubuntu安装Mysql5.7
科目三:前方路口直行
Flutter Paystack implements all options
C# 正则表达式汇总
PHP中 比较 0、false、null,‘‘ “
sqli-labs(less-11)
Practical Bioinformatics 2: Multi-omics data integration and mining
How on one machine (Windows) to install two MYSQL database
vscode输出中文乱码问题
【问题记录】TypeError: eval() arg 1 must be a string, bytes or code object
The Spark run on Yarn Spark application