Problems with port forwarding on Suse Linux 9.0

Gert Doering gert at greenie.muc.de
Mon Dec 1 21:20:28 EST 2003


Hi,

On Sun, Nov 30, 2003 at 06:32:36PM -0500, Bob Fischer wrote:
> It also fails on an even simpler example.  I am logged on as root, and
> the ssh client and server are the same machine:
> 
> suse-server # /usr/bin/ssh -f -L 5600:localhost:25 localhost sleep 100
> Password:
> suse-server # telnet localhost 5600
> Trying ::1...
> channel 3: open failed: connect failed: Connection refused
> Connected to localhost.
> Escape character is '^]'.
> Connection closed by foreign host.

I'd say the problem is IPv6 - if you do "-L" forwarding, the ssh daemon
will use whatever transport is available (!) to connect to "localhost:25".

So if you have "localhost = ::1" in /etc/hosts, and your SMTP server is
not listening on IPv6, it will fail.

If you have a machine that runs IPv4 and IPv6, but your services don't
do IPv6, specify the target host as IPv4 literal:

ssh ... -L 5600:127.0.0.1:25 ...

gert

-- 
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             gert at greenie.muc.de
fax: +49-89-35655025                        gert at net.informatik.tu-muenchen.de




More information about the openssh-unix-dev mailing list