当前位置:网站首页>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
边栏推荐
猜你喜欢

循环神经网络RNN基础《PyTorch深度学习实践》

学习Glide 常用场景的写法 +

@Async注解的坑,小心

9月考,如何选择靠谱正规的培训机构?

DSP Trick:向量长度估算

How to choose a reliable and formal training institution for the exam in September?

WordPress主题-B2美化通用子主题商业运营版

"Swordsman Offer" brush questions print from 1 to the largest n digits

【图像去雾】基于matlab暗通道和非均值滤波图像去雾【含Matlab源码 2011期】

Roson的Qt之旅#104 QML Image控件
随机推荐
2022用户画像构建
How to choose a reliable and formal training institution for the exam in September?
VR全景市场拓展技巧之“拓客宝典”
计算机网络常见面试题总结
Golang协程goroutine的调度与状态变迁分析
Data warehouse buried point system and attribution practice
Neo4j 4.X:导入OWL文件
pyspark---encode the suuid interval (based on the number of exposures and clicks)
智能客服,还有多少AI泡沫?
【图像去噪】基于matlab稀疏表示KSVD图像去噪【含Matlab源码 2016期】
ArcEngine (2) loading the map document
工控机防勒索病毒浅析
ArcEngine(六)用tool工具实现拉框放大缩小和平移
Karatsuba大数乘法的Verilog实现
如何在安装GBase 8c数据库的时候,报错显示“Host ips belong to different cluster?
推荐系统-排序层-模型:Wide&Deep
mysql备份时的快照原理
推荐系统-排序层-精排模型:LR、GBDT、Wide&Deep、DCN、DIN、DIEN、MMOE、PLE
requests库
Oracle Rac Cluster File Directory Migration