当前位置:网站首页>frp: open source intranet penetration tool
frp: open source intranet penetration tool
2022-08-03 08:04:00 【Brother Mu Yao】
前言
frp 是一个专注于内网穿透的高性能的反向代理应用,支持 TCP、UDP、HTTP、HTTPS 等多种协议.可以将内网服务以安全、便捷的方式通过具有公网 IP 节点的中转暴露到公网.
官网GitHub:https://github.com/fatedier/frp
官网文档:https://gofrp.org/docs/
下载与安装
安装包:https://github.com/fatedier/frp/releases
以Ubuntu为例,执行命令下载:
wget https://github.com/fatedier/frp/releases/download/v0.44.0/frp_0.44.0_linux_amd64.tar.gz
执行命令解压:
tar -zxvf frp_0.44.0_linux_amd64.tar.gz
客户端(公网IP设备):保留文件 frps
和 frps.ini
服务端(局域网设备):保留文件 frpc
和 frpc.ini
服务端配置
[common]
bind_port = 8888
token = this_is_your_token
dashboard_port = 10000
dashboard_user = username
dashboard_pwd = password
vhost_http_port = 12888
配置完成后,The server does these things:
- 配置了 frp 服务监听端口 8888
- The access key is configured as “this_is_your_token”
- 配置了 dashboard 的 port、用户名、密码,访问公网IP:10000,Enter the username and password to log in to the background
- monitoring is configured 12888 端口代理 http 请求
Quickly start the server,执行:
./frps -c ./frps.ini
更多配置,详见:https://gofrp.org/docs/reference/server-configures/
客户端配置
[common]
# 公网IPand the server listening port,and the connection key
server_addr = 188.188.188.188
server_port = 8888
token = this_is_your_token
[ssh_local]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 10099
[static_file]
type = tcp
remote_port = 11099
plugin = static_file
# 要对外暴露的文件目录
plugin_local_path = /home/xxxx/xxx/share
# 用户访问 URL 中会被去除的前缀,保留的内容即为要访问的文件路径
plugin_strip_prefix = static
plugin_http_user = uuuuuuusername
plugin_http_passwd = ppppppppassword
[web_01]
type = http
local_port = 12888
custom_domains = www.fuck.cn
配置完成后,The server does these things:
- common:把服务端的IP、The listening port tells the client,Then configure the secret key to connect smoothly
- ssh_local:ssh连接,访问公网IP:10099 It can be forwarded to the intranet machine22端口
- static_file:公开文件,访问公网IP:11099 输入user和passwordto access shared files
- web_01:http映射,访问www.fuck.cn:12888 Intranet can be initiatedIP:12888 的HTTP请求
Quick start client,执行:
./frpc -c ./frpc.ini
注意:The firewall should be configured to allow the above ports to pass.
开机自启
使用 systemd
来控制 frps,需要先安装 systemd
,然后在 /etc/systemd/system
目录下创建一个 frps.service
文件,写入以下内容:
[Unit]
# 服务名称,可自定义
Description = frp server
After = network.target syslog.target
Wants = network.target
[Service]
Type = simple
# 启动frps的命令,需修改为您的frps的安装路径
ExecStart = /path/to/frps -c /path/to/frps.ini
[Install]
WantedBy = multi-user.target
管理frp服务:
# 启动frp
systemctl start frps
# 停止frp
systemctl stop frps
# 重启frp
systemctl restart frps
# 查看frp状态
systemctl status frps
配置 frps 开机自启:
systemctl enable frps
边栏推荐
- Nanny level explains Transformer
- 数据仓库指标体系实践
- boot - SSE
- How does Mysql query two data tables for the same fields in two tables at the same time
- 使用pipreqs导出项目所需的requirements.txt(而非整个环境)
- Pop Harmony Basics Big Notes
- ArcEngine (2) loading the map document
- Roson的Qt之旅#106 QML在图片上方放置按钮并实现点击按钮切换图片
- JS作用对象API技巧
- mysql的innodb存储引擎和myisam存储引擎的区别
猜你喜欢
Docker启动mysql
Haisi project summary
How does Mysql query two data tables for the same fields in two tables at the same time
Golang协程goroutine的调度与状态变迁分析
加速FinOps实践,为企业降本增效
2022年 SQL 优化大全总结详解
sqlite 日期字段加一天
Detailed explanation of cause and effect diagram of test case design method
智能客服,还有多少AI泡沫?
9月考,如何选择靠谱正规的培训机构?
随机推荐
HCIP笔记整理 2022/7/18
品牌方发行NFT时,应如何考量实用性?
"Swordsman Offer" brush questions print from 1 to the largest n digits
9月考,如何选择靠谱正规的培训机构?
【图像去噪】基于matlab稀疏表示KSVD图像去噪【含Matlab源码 2016期】
JS作用对象API技巧
postman将接口返回结果生成json文件到本地
Roson的Qt之旅#103 QML之标签导航控件TabBar
控制bean的加载
积分商城系统设计
Arduino框架下对ESP32 NVS非易失性存储解读以及应用示例
Pop Harmony Basics Big Notes
ArcEngine(五)用ICommand接口实现放大缩小
The use of the database table structure document generation tool screw
information_schema
22-08-02 西安 尚医通(02)Vscode、ES6、nodejs、npm、Bable转码器
JS函数获取本月的第一天和最后一天
AI mid-stage sequence labeling task: three data set construction process records
计算机网络常见面试题总结
STL - string