> I was wondering if it was possible to forward tcp requests on port X to
> port Y. I have netcat (nc) installed on my box, but I don't know if
> this is the right program to do this with.
I'm assuming you just want to forward ports on the same box, but if not,
these commands can be easily tweaked to forward information to other
hosts too.
I tried this first:
nc -l -p Y | nc localhost X
It forwards requests, but...
1. You don't get the response back.
2. netcat closes down after the first client disconnects (it seems)
Maybe try ssh tunneling instead? It's not that hard:
ssh -L X:localhost:Y localhost
Of course, you have to have sshd running on your box for this to work.
Also, add a -g if you want other hosts to be able to connect to your
machine, like this:
ssh -g -L X:localhost:Y localhost
Now you can connect from any outside machine (assuming you don't have a
firewall preventing it) to your machine on port X, and it will go to
port Y instead.
Good luck,
Phillip
--
Phillip Hellewell <phillip AT hellewell.homeip.net>
--------------------
BYU Unix Users Group
http://uug.byu.edu/
The opinions expressed in this message are the responsibility of their
author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG.
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/