I'm sure that this must be a FAQ item, but I looked and did not find it.

Anyhow, let's say that I have the following setup:


        +-----------------------------------+
        |                                   |
        |                                   |
        |                                   |
        |                                   |
REMOTEFIREWALLHOST                        MYHOST
        |
        |
        |
REMOTEINTERNALHOST


REMOTEFIREWALLHOST has a REAL IP address
REMOTEINTERNALHOST has a fake IP address ( 192.168.2.x )
MYHOST  has a real IP (or fake, but NATed/masqueraded) address


Port 22 (SSH) on REMOTEFIREWALLHOST is forwarded to REMOTEINTERNALHOST
port 22 via  'redir'

I can already SSH from MYHOST to REMOTEFIREWALLHOST and it pushes me
through to REMOTEINTERNALHOST (which runs sshd2).


I want to be able to SSH from MYHOST and have local (MYHOST) ports
forwarded a port on REMOTEINTERNALHOST.  Eg, port 8080 on MYHOST would
forward to port 80 on REMOTEINTERNALHOST.  I can't seem to get this
going.

I've tried:   ssh -L 8080:REMOTEFIREWALLHOST:80 REMOTEFIREWALLHOST
but this does not work.  I'm assuming that this is because
REMOTEINTERNALHOST is not a real IP.

Suppose REMOTEINTERNALHOST's IP (fake) is:  192.168.2.222

I've also tried:
    ssh -L 8080:192.168.2.222:80 REMOTEFIREWALLHOST
    ssh -L 8080:127.0.0.1:80 REMOTEFIREWALLHOST
    ssh -L 8080:localhost:80 REMOTEFIREWALLHOST

The latter two appear to resolve to MYHOST, instead of the localhost
where the sshd2 is running...

Is there an [easy] means to do this?
Does/shouldn't SSH defer the creation of the remote/destination port
until after the connection is established?

I'm guessing that MYHOST tries to resolve the hostname right up front,
rather than letting the sshd2 host resolve the IP/name.

Is my assumption correct or false?

Any help and feedback are greatly appreciated.

Thanks.
-Ralph
[EMAIL PROTECTED]


Reply via email to