V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
chenjunqiang
V2EX  ›  服务器

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

  •  
  •   chenjunqiang · 2021-11-24 12:15:09 +08:00 · 1458 次点击
    这是一个创建于 855 天前的主题,其中的信息可能已经有所发展或是发生改变。

    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.

    3 条回复    2021-11-24 14:43:42 +08:00
    commoccoom
        1
    commoccoom  
       2021-11-24 12:57:13 +08:00
    感觉是 ssh 的问题,在内网里试试 ssh 能不能连上
    hefish
        2
    hefish  
       2021-11-24 13:04:23 +08:00
    感觉 sshd 没开在 22 端口或者 iptables 不允许连接 127.0.0.1:22
    chenjunqiang
        3
    chenjunqiang  
    OP
       2021-11-24 14:43:42 +08:00
    @commoccoom 对,ssh 安装好后就好了。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3006 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 14:58 · PVG 22:58 · LAX 07:58 · JFK 10:58
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.