frp 使用入门

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

 

posted @ 2019-01-04 15:32  破冰Lab-Cookun  阅读(1271)  评论(0编辑  收藏  举报