Here is how to establish a tunnel using netcat to a given host and port.
netcat -L 127.0.0.1:22 -p 8080 -vvv
Listen on port 8080 of the server, and when somebody tries to connect, establish a link with 127.0.0.1:22 (i.e.: SSH server).
netcat -L google.fr:80 -p 25000 -vvv
Listen on port 25000 of the server, and when somebody tries to connect, connect him to Google web server.
Warning : you need a recent version of GNU netcat (GNU netcat 0.7.1 +)
GNU netcat download : http://netcat.sourceforge.net/download.php
netcat -L 127.0.0.1:22 -p 8080 -vvv
Listen on port 8080 of the server, and when somebody tries to connect, establish a link with 127.0.0.1:22 (i.e.: SSH server).
netcat -L google.fr:80 -p 25000 -vvv
Listen on port 25000 of the server, and when somebody tries to connect, connect him to Google web server.
Warning : you need a recent version of GNU netcat (GNU netcat 0.7.1 +)
GNU netcat download : http://netcat.sourceforge.net/download.php