当前位置:网站首页>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
边栏推荐
- 【云原生--Kubernetes】Pod重启策略
- drop database出现1010
- mysqlbinlog: unknown variable 'default-character-set=utf8'
- HCIP笔记整理 2022/7/20
- ArcEngine (six) use the tool tool to realize the zoom in, zoom out and translation of the pull box
- 23届微软秋招内推
- 分治法求解中位数
- consul理解
- 循环神经网络RNN基础《PyTorch深度学习实践》
- The use of the database table structure document generation tool screw
猜你喜欢
计算机网络常见面试题总结
pyspark---encode the suuid interval (based on the number of exposures and clicks)
请求与响应:响应
2022用户画像构建
《剑指Offer》刷题之打印从1到最大的n位数
redis AOF持久化个人理解
Detailed explanation of cause and effect diagram of test case design method
postman将接口返回结果生成csv文件到本地
Poke the myth of Web3?Poke the iron plate.
Shell运维开发基础(一)
随机推荐
mysql 8.0.12 安装配置方法并--设置修改密码
mysql服务器上的mysql这个实例中表的介绍
tolower函数
【图像边缘检测】基于matlab灰度图像的积累加权边缘检测【含Matlab源码 2010期】
《21天精通TypeScript-5》类型注解与原始类型
thop 使用心得
Oracle Rac Cluster File Directory Migration
品牌方发行NFT时,应如何考量实用性?
如何在安装GBase 8c数据库的时候,报错显示“Host ips belong to different cluster?
pyspark---encode the suuid interval (based on the number of exposures and clicks)
[Hello World] 二分查找笔记
Roson的Qt之旅#105 QML Image引用大尺寸图片
boot - SSE
Postman will return to results generated CSV file to the local interface
ArcEngine(五)用ICommand接口实现放大缩小
day12---接口和协议
升级
Detailed explanation of cause and effect diagram of test case design method
ArcEngine(三)通过MapControl控件实现放大缩小全图漫游
redis AOF持久化个人理解