首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >SSH反向隧道后向其他计算机广播端口

SSH反向隧道后向其他计算机广播端口
EN

Unix & Linux用户
提问于 2013-09-15 15:01:31
回答 1查看 1.9K关注 0票数 1

我一直在阅读关于如何逆转隧道的文章,我正在使用以下命令:

ssh -f -N -T -R25565:localhost:25565 dns.mindfulhacker.tk

转发我的“我的”服务器。我的另一台服务器可以连接到我的“我的机器”服务器,但是客户端不能使用IP:dns.mindfulhacker.tk:255565连接到它。

我怎么才能把我的隧道推进成这样工作呢?

这两台服务器都运行UbuntuServer12.04LTS,客户端将运行Windows。(如果客户端使用Linux,我将允许他们通过SSH隧道返回。)

EN

回答 1

Unix & Linux用户

发布于 2013-09-15 15:31:26

您需要在您的GatewayPorts文件中启用sshd_config特性。

摘录自sshd_配置手册页:

代码语言:javascript
复制
GatewayPorts
        Specifies whether remote hosts are allowed to connect to ports 
        forwarded for the client.  By default, sshd(8) binds remote port 
        forwardings to the loopback address.  This prevents other remote 
        hosts from connecting to forwarded ports.  GatewayPorts can be used to 
        specify that sshd should allow remote port forwardings to bind to 
        non-loopback addresses, thus allowing other hosts to connect.  The 
        argument may be “no” to force remote port forwardings to be
        available to the local host only, “yes” to force remote port 
        forwardings to bind to the wildcard address, or “clientspecified” 
        to allow the client to select the address to which the forwarding 
        is bound.  The default is “no”.

需要添加这样的内容:

代码语言:javascript
复制
GatewayPorts yes

注意:在进行此更改后,一定要重新启动sshd

有关更多细节和示例,请参阅上一篇文章:

票数 1
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/90767

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档