You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Thomas Wolf (Jira)" <ji...@apache.org> on 2022/06/13 17:52:00 UTC

[jira] [Created] (SSHD-1269) TCP/IP remote port forwarding with wildcard IP addresses doesn't work with OpenSSH

Thomas Wolf created SSHD-1269:
---------------------------------

             Summary: TCP/IP remote port forwarding with wildcard IP addresses doesn't work with OpenSSH
                 Key: SSHD-1269
                 URL: https://issues.apache.org/jira/browse/SSHD-1269
             Project: MINA SSHD
          Issue Type: Bug
    Affects Versions: 2.8.0
            Reporter: Thomas Wolf


Looks like a recurrence of SSHD-792.

To reproduce, take the {{Sshd1055Test}} from [PR 227|https://github.com/apache/mina-sshd/pull/227]. That one uses OpenSSH 9.0 to set up a remote port forwarding on an Apache MINA sshd server using

{code}
ssh ... -R 127.0.0.1:0:someHost:somePort ...
{code}

That works. The server chooses a port A, and a client connecting to 127.0.0.1:A is forwarded to someHost:somePort.

Now change that test to use either {{-R 0.0.0.0:0:someHost:somePort}} or {{-R 0:someHost:somePort}}. These should work equally well.

However, the test then fails; the OpenSSH client complains about

{code}
debug1: client_request_forwarded_tcpip: listen 127.0.0.1 port 56054, originator 127.0.0.1 port 56055
WARNING: Server requests forwarding for unknown listen_port 56054
{code}

where 56054 is the port chosen by the server.

This appears to be caused by the Apache MINA sshd server sending back in the "forwarded-tcpip" request the _bound_ address (127.0.0.1); but OpenSSH expects the original (0.0.0.0, or empty). Probably Apache MINA sshd should send back the original address, but with the bound port.

(Note: this is also reproducible using OpenSSH 7.9.)



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org