Hi,
I can get this to work until I want to turn GatewayPorts on.
If I setup an SSHClient with Channel and set the Remote property to True I get the reverse tunnel.
To see what ports the SSHServer is listening on I can see;
sshd 7599 adminuser 10u IPv4 207296262 0t0 TCP 127.0.0.1:10075 (LISTEN)
When I set GatewayPorts to True nothing changes and I cannot connect to the forwarded ports from a remote host.
Checking what the server is listening on I see;
sshd 7599 adminuser 10u IPv4 207296262 0t0 TCP 127.0.0.1:10075 (LISTEN)
If remote hosts were able to use these ports should I not be seeing the following?
sshd 7599 adminuser 10u IPv4 207296262 0t0 TCP *:10075 (LISTEN)
How do I allow remote hosts to use the forwarded ports?
Remote port-forwarding with GatewayPorts
Re: Remote port-forwarding with GatewayPorts
GatewayPorts works only for local port forwarding. For remote port forwarding, we pass 0.0.0.0; however, most servers only support localhost connections. If you manage to configure the server the way you need it using any other client, please let us know the details.
Re: Remote port-forwarding with GatewayPorts
Hi Viktor,
Thank you. Can I ask how I achieve the remote port-forwarding that you detail in your SecureBridge SSH-tunnel principles document then please?
I want to create a tunnel between an SSH Client and an SSH Server and for Sn computers on the SSH Server side to be able to communicate with a port on the SSH Server that is connected to the SSH Client end.
I use the "SSH Client", "SSH Server" and "Sn" terminology because this is what is used on your document.
Specifically I am looking to access MySQL on an SSHClient from Sn computers at the SSH Server end.
Thank you. Can I ask how I achieve the remote port-forwarding that you detail in your SecureBridge SSH-tunnel principles document then please?
I want to create a tunnel between an SSH Client and an SSH Server and for Sn computers on the SSH Server side to be able to communicate with a port on the SSH Server that is connected to the SSH Client end.
I use the "SSH Client", "SSH Server" and "Sn" terminology because this is what is used on your document.
Specifically I am looking to access MySQL on an SSHClient from Sn computers at the SSH Server end.
Re: Remote port-forwarding with GatewayPorts
Hi Viktor,
I tried this using a Windows Server as the SSH Server and the SSH Server software on there was your sample of a simple SSH Server. The reverse tunnels work and I can connect from computers Sn on the SSH Server side network.
So the issue above seems to be with Linux allowing the remote connections or something similar. I'm not sure but clearly the issue is not the code and probably not your components!
I tried this using a Windows Server as the SSH Server and the SSH Server software on there was your sample of a simple SSH Server. The reverse tunnels work and I can connect from computers Sn on the SSH Server side network.
So the issue above seems to be with Linux allowing the remote connections or something similar. I'm not sure but clearly the issue is not the code and probably not your components!
Re: Remote port-forwarding with GatewayPorts
Thank you for your interest in our product.
Yes, such behavior is mostly likely caused by the settings of the SSH server or remote machine.
Feel free to contact us if you have any further questions about our products.
Yes, such behavior is mostly likely caused by the settings of the SSH server or remote machine.
Feel free to contact us if you have any further questions about our products.