服务器端
首先安装
wget https://github.com/fatedier/frp/releases/download/v0.46.0/frp_0.46.0_linux_amd64.tar.gz
tar -xzf frp_0.46.0_linux_amd64.tar.gz
cd frp_0.46.0_linux_amd64
编辑 frps.ini
[common]
server_addr = 127.0.0.1
server_port = 7000
[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 6000
nohup ./frps -c ./frps.ini > frps.log 2>&1 &
客户端
再次安装
wget https://github.com/fatedier/frp/releases/download/v0.46.0/frp_0.46.0_linux_amd64.tar.gz
tar -xzf frp_0.46.0_linux_amd64.tar.gz
cd frp_0.46.0_linux_amd64
编辑 frpc.ini
[common]
server_addr = 49.113.111.206
server_port = 7000
[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 6000
[web]
type = tcp
local_ip = 127.0.0.1
local_port = 80
remote_port = 8080
[web1]
type = tcp
local_ip = 127.0.0.1
local_port = 3000
remote_port = 8081
nohup ./frpc -c ./frpc.ini > frpc.log 2>&1 &
查看日志tail -f frpc.log