Hi,
I'm trying to do a remote port forward, and the remote hosts only listens to 127.0.0.1 on the forwarded port.
[ugob@server ~]$ netstat -ln Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 127.0.0.1:5500 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN tcp 0 0 ::1:5500 :::* LISTEN tcp 0 0 :::22 :::* LISTEN
(I'm trying to tunnel a vnc client connection.
From putty's logs, you can see that the tunnel is requested:
2007-06-12 17:34:15 Opened channel for session 2007-06-12 17:34:15 Requesting remote port 5500 forward to 10.0.0.1:5500 2007-06-12 17:34:15 Remote port forwarding from 5500 enabled
(I changed the real IP address to 10.0.0.1).
In putty, the "Local ports accept connections from other hosts" and "Remote ports do the same" are checked.
Any ideas?
Regards,
ugo
In article f4n424$j1n$1@sea.gmane.org, Ugo Bellavance ugob@lubik.ca wrote:
Hi,
I'm trying to do a remote port forward, and the remote hosts only listens to 127.0.0.1 on the forwarded port.
You can't control that from the client end, as it could be a security risk for the remote installation.
If the remote host is under your control and is running sshd from OpenSSH, you can add the following directive to /etc/ssh/sshd_config on that system:
GatewayPorts yes
That will tell the sshd to make forwarded ports listen on 0.0.0.0 instead of on 127.0.0.1
Don't forget "service sshd restart" after making the change.
Cheers Tony
Tony Mountifield wrote:
In article f4n424$j1n$1@sea.gmane.org, Ugo Bellavance ugob@lubik.ca wrote:
Hi,
I'm trying to do a remote port forward, and the remote hosts only listens to 127.0.0.1 on the forwarded port.
You can't control that from the client end, as it could be a security risk for the remote installation.
Makes sense.
If the remote host is under your control and is running sshd from OpenSSH, you can add the following directive to /etc/ssh/sshd_config on that system:
GatewayPorts yes
That will tell the sshd to make forwarded ports listen on 0.0.0.0 instead of on 127.0.0.1
Excellent, thanks for the help it now works ! :).
Ugo