Problem: I'm trying to forward a port (say, port 25) of a SuSE 9.0 Linux system to an external client system (in this case running RedHat 9.0). It doesn't work, and the problem seems to be on the SuSE side. Details ======On the client system, I run (where "suse-server" is the IP address of my SuSE server system to which I'm trying to connect) client> /usr/bin/ssh -f -L 5599:localhost:25 suse-server sleep 100 client> telnet localhost 5599 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. channel 2: open failed: connect failed: Connection refused Connection closed by foreign host. This is a problem with the port forwarding. When I connect to the same port from the suse-server computer, it works: suse-server> telnet localhost 25 Trying ::1... telnet: connect to address ::1: Connection refused Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 catfish.home ESMTP Postfix I've pulled my hair out over this one, to no avail, nor have I found anyone else with the problem. More details: client> rpm --query openssh openssh-3.6.1p2-19 client> rpm --query openssl openssl-0.9.7a-23 suse-server> rpm --query openssh openssh-3.7.1p2-18 suse-server> rpm --query openssl openssl-0.9.7b-74 Thanks, -- Bob
On Sun, 2003-11-30 at 17:42, Andrew Farmer wrote:> On Sun, 30 Nov 2003 08:37:51 -0800, Bob Fischer muttered: > > Problem: I'm trying to forward a port (say, port 25) of a SuSE 9.0 Linux > > system to an external client system (in this case running RedHat 9.0). > > It doesn't work, and the problem seems to be on the SuSE side. > > The problem is that only root can bind to "privileged" ports (<1024). > You'll have to ssh in as root to create this forwarding.Good thought, but already I tried it. Anyway, I get the same problem with unpriviledged ports. Here's the log of hte same problem, ssh-ing into the SuSE server as root: client> /usr/bin/ssh -f -L 5599:localhost:25 root at suse-server sleep 100 Password: client> telnet localhost 5599 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. channel 2: open failed: connect failed: Connection refused Connection closed by foreign host. -- Bob
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. -- Bob
Bob Fischer wrote: [snip]> On the client system, I run (where "suse-server" is the IP address of my > SuSE server system to which I'm trying to connect) > > client> /usr/bin/ssh -f -L 5599:localhost:25 suse-server sleep 100 > client> telnet localhost 5599 > Trying 127.0.0.1... > Connected to localhost. > Escape character is '^]'. > channel 2: open failed: connect failed: Connection refused > Connection closed by foreign host.[snip]> suse-server> telnet localhost 25 > Trying ::1... > telnet: connect to address ::1: Connection refusedTry setting the forward to "-L 5599:127.0.0.1:25". I suspect sshd is trying to connect to the IPv6 address of "localhost", which is refused, and sshd doesn't try the IPv4 address. -- Darren Tucker (dtucker at zip.com.au) GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69 Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.
Seemingly Similar Threads
- [Bridge] [PATCH] net/bridge: Add 'hairpin' port forwarding mode
- [Bridge] [PATCH] net/bridge: Add 'hairpin' port forwarding mode
- [Bridge] [PATCH] net/bridge: Add 'hairpin' port forwarding mode
- Can I runAsterisk remotely from telnet session?
- lifetable, survivorship.. [forwarded message from Diana Fischer]