我一直在阅读关于如何逆转隧道的文章,我正在使用以下命令:
ssh -f -N -T -R25565:localhost:25565 dns.mindfulhacker.tk
转发我的“我的”服务器。我的另一台服务器可以连接到我的“我的机器”服务器,但是客户端不能使用IP:dns.mindfulhacker.tk:255565连接到它。
我怎么才能把我的隧道推进成这样工作呢?
这两台服务器都运行UbuntuServer12.04LTS,客户端将运行Windows。(如果客户端使用Linux,我将允许他们通过SSH隧道返回。)
发布于 2013-09-15 15:31:26
您需要在您的GatewayPorts文件中启用sshd_config特性。
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”.需要添加这样的内容:
GatewayPorts yes注意:在进行此更改后,一定要重新启动sshd。
有关更多细节和示例,请参阅上一篇文章:
https://unix.stackexchange.com/questions/90767
复制相似问题