当前位置:网站首页>Using FRP to achieve intranet penetration
Using FRP to achieve intranet penetration
2022-07-23 19:18:00 【blainet】
Write it at the front : At home Tencent cloud and Aliyun server You need to configure the security group , Restart the machine \color{red}{ Restart the machine } Restart the machine Make configuration effective !!!
One 、 Cloud server
Aliyun server ( recommend )
First login requires a password , At this time, you can reset root Password resolution .
Tencent cloud server
- Free trial of cloud products _ Cloud service free experience _ Free cloud product trial - Tencent cloud
- The server - Lightweight application servers - Console
- Tencent cloud - Console ~ Configure security group information
After testing , At present, Tencent cloud Experience the server for a month Unable to associate security group instances . Therefore, it cannot be configured !!!
By default, an ordinary user will be assigned , Switch to root Use :
su -i
passwd # modify root Account password
Two 、 Use frp Achieve intranet penetration
Official download link :Releases · fatedier/frp, The configuration process is as follows :
1. Upload frp
Will download okay frp The compressed packets are transmitted to Cloud server and Linux The server ( Target agent machine , That is, the machine we want to represent ). Among them, ECS serves as frps(frp Server side ), Target agent machine As frpc(frp client ). The compressed package also contains frps & frpc, Therefore, there is no need to download separately .
2. Perform the installation separately
2.1 stay Cloud server Perform installation on
tar -zxvf frp_0.38.0_linux_386.tar.gz -C target_dir # Extract to the specified directory
# Delete useless files ( client )
rm -f frpc* systemd/frpc*
# Run the test ( Boot up , Background operation, etc. will be put behind as an upgrade scheme )
./frps -c frps.ini
2.2 stay Target agent machine Perform installation on
tar -zxvf frp_0.38.0_linux_386.tar.gz -C target_dir # Extract to the specified directory
# Delete useless files ( Server side )
rm -f frps* systemd/frps*
# Modify the configuration file ( At present, only The address of the ECS , Other settings are used as subsequent improvements )
server_addr = 120.79.173.220
Save and exit .
3. to ECS host To configure Security Group Policy
3.1 Alibaba cloud


After the modification is completed , Restart the machine !!! Make configuration effective .
3.2 Tencent cloud


After testing , At present, Tencent cloud Experience the server for a month Unable to associate security group instances . Therefore, it cannot be configured .
Run the test ( Boot up , Background operation, etc. will be put behind as an upgrade scheme )
./frpc -c frpc.ini
Optimize upgrade
(1) Server side
modify frps.service,
[Unit]
Description=Frp Server Service
After=network.target
[Service]
Type=simple
# If there's only one root user , Must be specified as root, Otherwise, use the default nobody that will do
# User=nobody Report errors :code=exited, status=203/EXEC frp
User=root
Restart=on-failure
RestartSec=5s
# Path modification
ExecStart=/root/env/frp/frps -c /root/env/frp/frps.ini
LimitNOFILE=1048576
[Install]
WantedBy=multi-user.target
Reference link :frp Server side program frps Self start error -Bluesky’s blog Thank you very much to the author !!!
Add the modified file to the system file ( Registration service ?):
cp systemd/frps.service /etc/systemd/system/
systemctl start frps.service
systemctl status frps.service
systemctl enable frps.service # Boot up
ps -ef | grep frps
Delete frp service ( For example, there is an error in the installation file , To reinstall ):
systemctl stop frps.service
systemctl disable frps.service
rm -f /etc/systemd/system/frps.service
systemctl daemon-reload
systemctl reset-failed
systemctl status frps.service
Reference link :CentOS Use systemctl Remove service completely | Rego's blog
(2) client
frpc.service Configuration file modification ,
[Unit]
Description=Frp Client Service
After=network.target
[Service]
Type=simple
# Because there are multiple users , Therefore, there is no need to specify a unique user name
User=nobody
Restart=on-failure
RestartSec=5s
ExecStart=/home/guest/xxx/env/frp/frpc -c /home/guest/xxx/env/frp/frpc.ini
ExecReload=/home/guest/xxx/env/frp/frpc reload -c /home/guest/xxx/env/frp/frpc.ini
LimitNOFILE=1048576
[Install]
WantedBy=multi-user.target
Install registration frpc service , Start the service at the same time as the system starts , Run the script file ,
sudo cp systemd/frpc.service /etc/systemd/system/
sudo systemctl start frpc.service
sudo systemctl status frpc.service
sudo systemctl enable frpc.service # Boot up
ps -ef | grep frps
Reference link
- Alibaba cloud server penetration (frp The way )_Ray Mond The blog of -CSDN Blog
- Alibaba cloud server implements frp Intranet through ( Full tutorial )_Forizon The blog of -CSDN Blog _frp Cloud server
- Alibaba cloud server implements frp Intranet through _ Cao Huihui's blog -CSDN Blog
- FRP Intranet penetration technology realizes remote access to campus network computers _ Dapeng wants Gao Fei's blog -CSDN Blog
- Tencent cloud cannot do frps The problem of · Issue #905 · fatedier/frp
- ubuntu How to open ports ?- Cloud community - Hua Wei Yun
Optimize ( Registration service , Boot up …)
边栏推荐
- Time2Vec 的理解与简单实现
- Storage structure and method of graph (II)
- 微信小程序自己实现一个全局事件总线
- mBio | 海洋所孙超岷组在深海原位验证了微生物介导的单质硫形成新通路
- [2020] [paper notes] Based on Rydberg atom——
- How can zero foundation self-study software testing? Ten year test Laoniao's strongest software test learning Roadmap
- 基于FPGA的SPI通讯协议实现
- Notes of benthos
- Know two things: how does redis realize inventory deduction and prevent oversold?
- Four principles of interface design
猜你喜欢
![[2018] [paper notes] graphene FET and [2] - Preparation and transfer of graphene](/img/32/c6e4af95baf322adf06bd8ee741b67.png)
[2018] [paper notes] graphene FET and [2] - Preparation and transfer of graphene

mBio | 海洋所孙超岷组在深海原位验证了微生物介导的单质硫形成新通路

Alibaba最新神作!耗时187天肝出来1015页分布式全栈手册太香了

LM393 low power dual voltage comparator parameters, pins, application details

FPGA implementation of IIC bus of IIC protocol (II) (single read / write drive)

基于FPGA的SPI通讯协议实现
![二叉树高度 [log2n]+1与log2(n+1)是否相等](/img/64/381376190218d5b2cdfd8b1197e8f6.png)
二叉树高度 [log2n]+1与log2(n+1)是否相等

Conception de l'interface UART basée sur la FPGA
.net core implements background tasks (scheduled tasks) longbow Tasks component (III)

Elk note 25 - expérience rapide APM
随机推荐
多线程&高并发(全网最新:面试题+导图+笔记)面试手稳心不慌
VB connecting access database customization
Access intranet rds+mysql through SSH
CTF misc learning summary "suggestions collection"
ZigBee集成开发环境IAR安装
人脸识别系统技术方案
Weights & Biases (一)
C#Split的用法,Split分割字符串
总结一些最近见到的 TRICK
.NET Core 实现后台任务(定时任务)Longbow.Tasks 组件(三)
398. Random number index hash table method
LeetCode刷题:回文数
基于FPGA的SPI通讯协议实现
[onnx] the problem of dynamic input size (multi output / multi input)
还在用Xshell?你out了,推荐一个更现代的终端连接工具
An SQL question about grouping query
SQL 语句练习
UPC 2022 summer personal training game 12 (number of combinations b)
Detailed explanation of TCL scripting language (1)
moxa串口服务器型号,moxa串口服务器产品配置说明