Anyone knows if it is possible to setup port forwarding with a telnet client, like it is with SSH?
You can do it with netcat, but it's a huge security hole:
mknod backpipe p nc -l -p 80 0<backpipe | tee -a inflow | nc localhost 81 | tee -a outflow 1>backpipe
FWIW, this is probably a profoundly bad idea.... make sure your firewall is tight as a drum...
Should be, yes...just forward the appropriate TCP port at the border you're doing the forwarding on. I don't know if you mean on the machine, forwarding using SSH, or forwarding through BRANDX router...
EDIT: wait...are you saying using telnetd to forward ports like sshd does? No, telnet is purely a console application that gives shell access to a machine, as far as I know. I thought you meant can you port forward TELNET, not forward ports with telnetd.
machineA $ telnet machineB Username: someguy Password: whoIsGoingToGetHackedForRunningTelnet machineB $ telnet machineC someport (whatever someport does)
Have a program at either end of that that talks through the tunnel, and you're set. You could use expect, or your language of choice, to automate this. You'll only get one port at a time.
But, why do you have telnet open on anything these days? :)