Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Anyone knows if it is possible to setup port forwarding with a telnet client, like it is with SSH?

share|improve this question
add comment

3 Answers 3

up vote 5 down vote accepted

You can do it with netcat, but it's a huge security hole:

http://www.stearns.org/nc/

http://forums.remote-exploit.org/newbie-area/5857-netcat-port-redirection.html

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...

share|improve this answer
    
This would require the client to install netcat though, which as far as I know not available for Windows. –  mr-euro Sep 18 '09 at 14:15
1  
netcat by all means runs on windows. –  geeklin Sep 18 '09 at 14:59
    
OK, i located an unofficial port for Windows with Google. Still, i was looking for an integrated part of Windows so all users had the right tool without any further downloads. Thanks for the idea though, never thought of netcat being used as a proxy. Cheers! –  mr-euro Sep 18 '09 at 16:36
    
Not really the exact answer, but inspired me to use nc for other stuff. Thx. –  mr-euro Oct 26 '09 at 15:57
add comment

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.

share|improve this answer
    
Yes, exactly the same feature as sshd is what i am looking for. Basically a SSH tunnel but no encryption at all (I do not need it). –  mr-euro Sep 18 '09 at 14:14
2  
Okay, yes, you could jump through some hoops to do it but like Tim pointed out it's a huge huge security hole since anyone can read traffic in plaintext. Why jump through hoops to do it when you can do it with SSHD? –  Bart Silverstrim Sep 18 '09 at 14:17
    
Well, telnet is on all Windows machines. A SSH client is not. Besides in this task I do not need an encryption so I thought of "downgrading" to telnet. The data being in plain text (even the credentials) is fine for this specific usage. –  mr-euro Sep 18 '09 at 16:39
    
it kind of is a downgrade...and ssh is readily available for most platforms. Port forwarding is done on the server anyway, not on the client. You can use PuTTY as a standalone freeware ssh client for Windows. –  Bart Silverstrim Sep 18 '09 at 17:11
add comment

Yes.

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? :)

share|improve this answer
    
Have not used telnet for ages, but I needed a application to port forward that is on all Windows machines and thought of telnet perhaps being a candidate. It looks though as it is not feasible. –  mr-euro Sep 18 '09 at 16:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.