[ale] port forwarding with nc

James P. Kinney III jkinney at localnetsolutions.com
Thu Aug 25 17:27:16 EDT 2005


On Thu, 2005-08-25 at 17:10 -0400, H. A. Story wrote:
> Wow,  This is cool  You know you can get Digi Terminal Servers for about 
> $1000.00 or close to it?  And they don't even do ssh I think

Yep. A direct application of this would be serial line access to
consoles over an ssh connection.

Would need a motherboard capable of console over serial port (my 4 dual
PIII 1.4GHz systems do, Tyan) and enough serial ports on a separate
machine to accept the data. Now pump the data streams through multiple
tunnels and direct their final output to screen for viewing multiple
consoles.

The _really_ fun part of this project was when I found out the maximum
speed supported by the obnoxious DOS app is 28.8k AARRGGHH!!! NO WONDER
IT'S SO SLOW!!!!
> 
> James P. Kinney III wrote:
> 
> >OK. So I reverse the ends and run the ssh tunnel from B to A and it
> >works.
> >
> >There is a firewall between B and the internet but it was set for full
> >forwarding (which is getting closed up now). 
> >
> >On Thu, 2005-08-25 at 12:47 -0400, James P. Kinney III wrote:
> >  
> >
> >>More stuff:
> >>
> >>established an ssh tunnel from A to B with:
> >>ssh -fNL 26150:machineB:26150 machineB &
> >>
> >>now try to simply connect netcat to the localhost port 26150:
> >>nc localhost 26150
> >>
> >>I get the error message:
> >>
> >>channel 1: open failed: connect failed: No route to host
> >>
> >>????? I'm connecting to localhost. ?!?!?!?!?
> >>
> >>On Thu, 2005-08-25 at 09:51 -0400, James P. Kinney III wrote:
> >>    
> >>
> >>>The scenario:
> >>>
> >>>take serial port data from /dev/ttyS14 on machineA and route it securely
> >>>with an ssh tunnel to machineB where it is picked up and put onto serial
> >>>port /dev/ttyS1
> >>>
> >>>I have been trying to do it with a combination of nc and ssh as follows:
> >>>
> >>>on machineA:
> >>>#!/bin/sh
> >>>
> >>>TCP_PORT=26150
> >>>SERIAL_PORT=/dev/ttyS14
> >>>BAUDRATE=38400
> >>>
> >>>while (true)
> >>>        do
> >>>        (stty $BAUDRATE -echo clocal raw pass8 ; exec nc -l -p
> >>>$TCP_PORT)  < $SERIAL_PORT > $SERIAL_PORT
> >>>done
> >>>
> >>>followed by:
> >>>
> >>>ssh -L 26150:machineB:26150 machineB
> >>>(ssh connection is with keys)
> >>>
> >>>And on machineB the same script as above with SERIAL_PORT=/dev/ttyS1
> >>>
> >>>I keep running into the issue of not being able to "share connections"
> >>>to port 26150 on machineA. Both nc and ssh want to lock it on their
> >>>connection. How do I get around this?
> >>>
> >>>(stupid, ancient DOS app that can't be run over a nice fast network
> >>>line)
> >>>
> >>>
> >>>_______________________________________________
> >>>Ale mailing list
> >>>Ale at ale.org
> >>>http://www.ale.org/mailman/listinfo/ale
> >>>      
> >>>
> >>_______________________________________________
> >>Ale mailing list
> >>Ale at ale.org
> >>http://www.ale.org/mailman/listinfo/ale
> >>    
> >>
> >>------------------------------------------------------------------------
> >>
> >>_______________________________________________
> >>Ale mailing list
> >>Ale at ale.org
> >>http://www.ale.org/mailman/listinfo/ale
> >>
> 
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
-- 
James P. Kinney III          \Changing the mobile computing world/
CEO & Director of Engineering \          one Linux user         /
Local Net Solutions,LLC        \           at a time.          /
770-493-8244                    \.___________________________./
http://www.localnetsolutions.com

GPG ID: 829C6CA7 James P. Kinney III (M.S. Physics)
<jkinney at localnetsolutions.com>
Fingerprint = 3C9E 6366 54FC A3FE BA4D 0659 6190 ADC3 829C 6CA7
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part




More information about the Ale mailing list