The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Special Forums > IP Networking
.
google unix.com




Thread: Blocked ports
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 02-11-2009
cbkihong cbkihong is offline Forum Advisor  
Advisor
  
 

Join Date: Sep 2002
Location: Hong Kong, China
Posts: 1,624
As far as I can recall, here is a quick illustration.

Code:
ssh -l user my.host -L local_port:localhost:blocked_port
Once logged in, the port "local_port" will be listening on your local host. You must leave this SSH session open throughout. By now, traffic to "local_port" at localhost will be routed to the "blocked_port" at "my.host" instead (until the SSH session is torn down).

This is good for exposing a few blocked ports without all the hassle of setting up VPN. And apart from exposing blocked ports on the SSH'ed host itself you can even bridge to a port at an internal host behind NAT.