1

I have been reading on how to reverse tunnel and I am using this command:

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

To forward my Minecraft server. My other server can connect to my Minecraft server but clients cannot connect to it by using the IP: dns.mindfulhacker.tk:255565

How can I forward my tunnel so it works like this?

Both servers run Ubuntu Server 12.04 LTS and clients will be running Windows. (If the clients used Linux I would allow them to SSH Tunnel it back.)

jasonwryan
  • 73,126

1 Answers1

1

You need to enable the GatewayPorts feature in your sshd_config file.

excerpt from sshd_config man page:

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”.

Something like this needs to be added:

GatewayPorts yes

NOTE: Be sure to restart sshd after making this change.

See this previous post for more details & examples:

slm
  • 369,824
  • should say "enable" GatewayPorts and not "disable", right? I tried to edit, but edits must be at least 6 chars. – ash Sep 16 '13 at 03:20