#下载
wget https://github.com/fatedier/frp/releases/download/v0.44.0/frp_0.44.0_linux_amd64.tar.gz
#解压
tar -zxvf frp_0.44.0_linux_amd64.tar.gz
#进入目录
cd frp_0.44.0_linux_amd64/
# 配置服务器端和客户端,及启动
vim frps.ini
[common]
bind_port = 7000
vhost_http_port = 8088
vhost_https_port = 8443
dashboard_port = 7500
dashboard_user = admin
dashboard_pwd = admin
token = 12345678
vim frpc.ini
[common]
server_addr = 192.168.5.12
server_port = 7000
token = 12345678
[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 6000
[web]
type = http
local_port = 80
custom_domains = xxx //绑定域名,注:配置http,必须需要域名,否则报错。如没有,可采用普通的tcp模式映射。
[ftp]
type = tcp
local_ip = 127.0.0.1
local_port = 21
remote_port = 1121
# 分别启动服务器端和客户端
nohup ./frps -c frps.ini > /var/log/frp.log 2>&1 &
nohup ./frpc -c frpc.ini > /var/log/frp.log 2>&1 &
# 测试访问
http://192.168.5.12:7500/
Linux安装系列:搭建FRP服务
最新推荐文章于 2024-09-09 11:41:05 发布