frp 使用入门

一、下载安装对应系统版本nginx

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

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

 mv frp/ /usr/local

三、配置frpgithub

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:vim

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

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

[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
相关文章
相关标签/搜索