1、下载安装对应系统版本

https://github.com/fatedier/frp/releases/

2、将下载的frp移动到系统软件目录

 mv frp/ /usr/local

3、配置frp

vim /etc/systemd/system/frps.service
[Unit]  
Description=frps Daemon  
After=syslog.target network.target  
Wants=network.target  

[Service]  
Type=simple  
ExecStart=/usr/local/frp/frps -c /etc/frps.ini
Restart=always  
RestartSec=1min  
ExecStop=/usr/bin/killall frps  

[Install]  
WantedBy=multi-user.target  

配置/etc/frps.ini:

[common]
bind_addr = 0.0.0.0
bind_port = 7000
systemctl enable frps.service
systemctl start frps.service  

配置/etc/frpc.ini,转发ssh到公网6000端口:

[common]
server_addr = x.x.x.x
server_port = 7000

[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 2222
./frpc -c frpc.ini

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-01
  • 2022-12-23
  • 2021-08-26
  • 2022-01-20
  • 2022-12-23
猜你喜欢
  • 2021-12-08
  • 2021-05-31
  • 2021-06-22
  • 2021-07-19
  • 2021-06-19
  • 2022-12-23
  • 2021-11-04
相关资源
相似解决方案