当前位置:网站首页>搭建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访问:
边栏推荐
- First acquaintance with NK-RTU980 development board
- 【小程序项目开发-- 京东商城】uni-app之自定义搜索组件(中)-- 搜索建议
- ZCMU--1862: zbj的狼人杀
- Failure scenarios of @Transactional annotations
- sqli-labs(less-11)
- MySQL 5.7 安装教程(全步骤、保姆级教程)
- 【云原生与5G】微服务加持5G核心网
- 【黄啊码】MySQL入门—3、我用select ,老板直接赶我坐火车回家去,买的还是站票
- 如何使用mysql binlog 恢复数据
- SSM框架讲解(史上最详细的文章)
猜你喜欢

如何使用mysql binlog 恢复数据

LED flashing on CY7C68013A

如何在 Linux 上安装 MySQL
![[MySQL exercises] Chapter 3 Common data types in MySQL](/img/11/66b4908ed8f253d599942f35bde96a.png)
[MySQL exercises] Chapter 3 Common data types in MySQL

How on one machine (Windows) to install two MYSQL database

高并发高可用高性能的解决方案

《如何戒掉坏习惯》读书笔记

射频电路学习之滤波电路
![[Mini Program Project Development--Jingdong Mall] Custom Search Component of uni-app (Middle)--Search Suggestions](/img/ea/ee1ad50a497478b9d080bb5e4bdfb5.png)
[Mini Program Project Development--Jingdong Mall] Custom Search Component of uni-app (Middle)--Search Suggestions

【Unity】编辑器扩展-03-拓展Inspector视图
随机推荐
MySQL 5.7升级到8.0详细过程
C# 正则表达式汇总
【C#】说说 C# 9 新特性的实际运用
【idea 报错】 无效的目标发行版:17 的解决参考
mysql安装教程【安装版】
MySQL 排序
循环结构--for循环
TypeError The view function did not return a valid response. The function either returned None 的解决
The Spark run on Yarn Spark application
Unreal基础概念
mysql insert new field method
【小程序项目开发 -- 京东商城】uni-app 商品分类页面(下)
Ubuntu22.04安装mysql
使用MySQL如何查询一年中每月的记录数
[MySQL exercises] Chapter 4 · Explore operators in MySQL with kiko
[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
【小程序项目开发-- 京东商城】uni-app之自定义搜索组件(下) -- 搜索历史
LED flashing on CY7C68013A
【C#】判断字符串中是否包含指定字符或字符串(Contains/IndexOf)
高并发-高可用-高性能