frp 服务器搭建成功, ssh 链接到内网的时候拒绝连接 c

2021-11-24 12:15:09 +08:00
 chenjunqiang

1.防火墙上已经开放 10000 到 20000 的端口。

2.frp 服务器可以通过 web 访问,证明 frp 已经成功了。

3.内网的机子使用 frpc 已经启动成功,这个时候在 frp 后台是可以看到连接中。

4.连接到内网的时候,使用的命令是:ssh -oPort=10022 {xxx.xxx.xx.xx}

5.服务器的配置如下:

You Server IP : xxxxxxxxxx

Bind port : 10000

KCP support : true

vhost http port : 80

vhost https port : 443

Dashboard port : 10001

token : xxxxxxxxxx

tcp_mux : true

Max Pool count : 50

Log level : info

Log max days : 3

Log file : enable

6.内网机子的配置如下 frpc.ini

[common]

sever_addr = xxx.xx.xx.xx

server_port = 10000

token = xxxxxxxx

[ssh]

type = tcp

local_ip = 127.0.0.1

local_port = 22

remote_port = 10022

7.执行 ssh 命令的时候,内网的机子命令行下会提示 error dial tcp 127.0.0.1:22 connect:connction refuse.

1487 次点击
所在节点    服务器
3 条回复
commoccoom
2021-11-24 12:57:13 +08:00
感觉是 ssh 的问题,在内网里试试 ssh 能不能连上
hefish
2021-11-24 13:04:23 +08:00
感觉 sshd 没开在 22 端口或者 iptables 不允许连接 127.0.0.1:22
chenjunqiang
2021-11-24 14:43:42 +08:00
@commoccoom 对,ssh 安装好后就好了。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/817631

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX