FRP部署学习

根据不同的系统下载源码安装

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

一、云服务器 (有公网ip)

部署frps,修改配置

[common]
bind_port = 7000
dashboard_port = 7500
vhost_http_port = 10080
tls_enable = true
vhost_https_port = 10443

进入到frp目录里,执行 nohup ./frps -c ./frps.ini &

二、客户端A (被访问的机器)

部署frpc,修改配置

[common]
tls_enable = true
server_addr = [公网ip]
server_port = 7000
[ssh]
type = tcp
local_ip = 192.168.20.27
local_port = 22
remote_port = 6000

进入到frp目录里,执行./frpc -c frpc.ini

三、客户端B (远程访问A的机器)

ssh -p [remote_port]  [username]@[server_addr],

例如ssh -p 6000 carlos@[公网ip]

 

问题:

  1. frpc启动失败,可能是服务端和客户端的配置里没有加tls_enable = true;

  2. ssh连接失败,可能是被访问的机器没有开启远程登录功能,比如mac需要在【共享】里开启【远程登录】;

 
posted @ 2022-04-27 17:13  绝尘之驹  阅读(165)  评论(0)    收藏  举报