Port forwarding (portmap) works only locally

networkingwindows-server-2003

There are four hosts

hostA winXP

hostB Win2003

hostC Linux RHEL

hostD Linux RHEL

hostA cannot connect to C and D directly, but B can

hostA connects to hostB using VPN

hostB and hostC belong to the same subnet1

hostD is in subnet2

From hostA I need to connect to hostC and hostD by SSH.

Now I can do it as follows:

1.connecting from hostA to hostB by RDP logon and there:

2.start putty client.

I'd like to omit step 1 and connect from A to C and D directly

On hostB I have admin acoount and configure port forwarding as follows:

netsh interface portproxy add v4tov4 listenport=N1 connectaddress=hostC_IP connectport=N2

netsh interface portproxy add v4tov4 listenport=N3 connectaddress=hostD_IP connectport=N2

netsh interface portproxy show all:

Listen on IPv4:             Connect to IPv4:
Address         Port        Address         Port
--------------- ----------  --------------- ----------
 *               N1          hostC_IP        N2
 *               N3          hostD_IP        N2

Now from hostB I can connect to either C and D:

ssh localhost:N1

ssh localhost:N3

from hostA
ssh hostB:N1 works too, but
ssh hostB:N3 DON'T

I guess the reason might be different subnets, still have no idea how to fix it.
What should I do?

Best Answer

[I never heard of portproxy before so this may be nonsense]

It looks like portproxy was written to enable IPv6 access (http://www.sixxs.net/wiki/PortProxy) (http://technet.microsoft.com/en-us/library/cc776297%28WS.10%29.aspx)

This article http://support.microsoft.com/kb/555744 says:

Symtpons: "Rules for port redirection are set by using command but are not working."

Cause: "The command is sent to the IPV6MON.DLL helper, and because of that it will work only if IPv6 protocol is installed."

Resolution: "Install IPv6 protocol."

Since the local one works and the other doesn't this is possibly irrelevant, but should be checked.

[have you considered installing an ssh server instead ?]

Related Topic