这个是SSH的解决方法,道理就和windows下的端口转发一样的
-L port:host:hostport
Specifies that the given port on the local (client) host is to be forwarded to the given host and port on the
remote side. This works by allocating a socket to listen to port on the local side, and whenever a connec-
tion is made to this port, the connection is forwarded over the secure channel, and a connection is made to
host port hostport from the remote machine. Port forwardings can also be specified in the configuration
file. Only root can forward privileged ports. IPv6 addresses can be specified with an alternative syntax:
port/host/hostport
-R port:host:hostport
Specifies that the given port on the remote (server) host is to be forwarded to the given host and port on
the local side. This works by allocating a socket to listen to port on the remote side, and whenever a con-
nection is made to this port, the connection is forwarded over the secure channel, and a connection is made
to host port hostport from the local machine. Port forwardings can also be specified in the configuration
file. Privileged ports can be forwarded only when logging in as root on the remote machine. IPv6 addresses
can be specified with an alternative syntax: port/host/hostport
还可以用stunnel来解决……
http://www-900.ibm.com/developer ... /s-stun/index.shtml
http://hammer.prohosting.com/~cachenow/forum/messages/6266.html
你可以参考这两个文章的 |