Networking Forums

Networking Forums > Computer Networking > Linux Networking > Redirect telnet to a serial port

Reply
Thread Tools Display Modes

Redirect telnet to a serial port

 
 
Dan C
Guest
Posts: n/a

 
      10-10-2009, 09:20 PM
I'm looking in to how I can redirect an incoming telnet connection to go
out a serial port. What I'm trying to do is be able to telnet to a Slack
box, have the connection go out the serial port, and go to another (DOS)
box's serial port (via a null modem serial cable). That DOS box is
running a BBS program (PCBoard) which I'd like to make reachable over the
internet via telnet. As you may remember, DOS doesn't do TCP/IP, so
that's why this approach is being tried... Any ideas? Thanks.

Followups set to comp.os.linux.networking


--
"Ubuntu" -- an African word, meaning "Slackware is too hard for me".
"Bother!" said Pooh, as he garotted another passing Liberal.
Usenet Improvement Project: http://twovoyagers.com/improve-usenet.org/
 
Reply With Quote
 
 
 
 
pk
Guest
Posts: n/a

 
      10-10-2009, 09:38 PM
Dan C wrote:

> I'm looking in to how I can redirect an incoming telnet connection to go
> out a serial port. What I'm trying to do is be able to telnet to a Slack
> box, have the connection go out the serial port, and go to another (DOS)
> box's serial port (via a null modem serial cable). That DOS box is
> running a BBS program (PCBoard) which I'd like to make reachable over the
> internet via telnet. As you may remember, DOS doesn't do TCP/IP, so
> that's why this approach is being tried... Any ideas? Thanks.


http://ser2net.sourceforge.net/

maybe that could help. Remember that (AFAIK) only one user at a time can use
the serial port.

 
Reply With Quote
 
Dan C
Guest
Posts: n/a

 
      10-10-2009, 10:49 PM
On Sat, 10 Oct 2009 22:38:19 +0100, pk wrote:

> Dan C wrote:
>
>> I'm looking in to how I can redirect an incoming telnet connection to
>> go out a serial port. What I'm trying to do is be able to telnet to a
>> Slack box, have the connection go out the serial port, and go to
>> another (DOS) box's serial port (via a null modem serial cable). That
>> DOS box is running a BBS program (PCBoard) which I'd like to make
>> reachable over the internet via telnet. As you may remember, DOS
>> doesn't do TCP/IP, so that's why this approach is being tried... Any
>> ideas? Thanks.

>
> http://ser2net.sourceforge.net/
>
> maybe that could help. Remember that (AFAIK) only one user at a time can
> use the serial port.


Thanks, I'll be checking that out.


--
"Ubuntu" -- an African word, meaning "Slackware is too hard for me".
"Bother!" said Pooh, as he garotted another passing Liberal.
Usenet Improvement Project: http://twovoyagers.com/improve-usenet.org/
 
Reply With Quote
 
Dan C
Guest
Posts: n/a

 
      10-11-2009, 12:05 AM
On Sat, 10 Oct 2009 19:11:26 -0500, Ron Gibson wrote:

> On 10 Oct 2009 21:20:36 GMT, Dan C <(E-Mail Removed)> wrote:
>
>>I'm looking in to how I can redirect an incoming telnet connection to go
>>out a serial port. What I'm trying to do is be able to telnet to a
>>Slack box, have the connection go out the serial port, and go to another
>>(DOS) box's serial port (via a null modem serial cable). That DOS box
>>is running a BBS program (PCBoard) which I'd like to make reachable over
>>the internet via telnet. As you may remember, DOS doesn't do TCP/IP, so
>>that's why this approach is being tried... Any ideas? Thanks.

>
> Try this page...
>
> http://users.telenet.be/mydotcom/lib...k/dostcpip.htm


That looks promising... thanks.


--
"Ubuntu" -- an African word, meaning "Slackware is too hard for me".
"Bother!" said Pooh, as he garotted another passing Liberal.
Usenet Improvement Project: http://twovoyagers.com/improve-usenet.org/
 
Reply With Quote
 
Aragorn
Guest
Posts: n/a

 
      10-11-2009, 03:21 AM
On Saturday 10 October 2009 23:20 in alt.os.linux, somebody identifying
as Dan C wrote...

> I'm looking in to how I can redirect an incoming telnet connection to
> go out a serial port. What I'm trying to do is be able to telnet to a
> Slack box, have the connection go out the serial port, and go to
> another (DOS) box's serial port (via a null modem serial cable). That
> DOS box is running a BBS program (PCBoard) which I'd like to make
> reachable over the internet via telnet. As you may remember, DOS
> doesn't do TCP/IP, so that's why this approach is being tried... Any
> ideas? Thanks.
>
> Followups set to comp.os.linux.networking


Hmm... I'm not exactly the expert here, but I'm just going to give you
some of my logical thoughts on this. I will be going over this step by
step and typing as the thoughts enter my mind, so bear with me. ;-)

(1) Telnet is a way of sending clear text messages to a device, in this
case a computer reachable via TCP/IP. The telnet server would -
unless specified differently - be listening on port 23.

(2) You have a DOS BBS machine that accepts telnet instructions over its
serial port, and this machine is connected to the computer that
receives the incoming telnet connection.

(3) You want to forward the incoming telnet connection to the nullmodem
connection of the BBS machine.

Now, as I said, I'm not an expert on this, but I suppose the serial port
with the nullmodem cable on the GNU/Linux box could be reached from
within GNU/Linux as */dev/ttS01* (or whatever serial port it may be).
So we need to forward whatever is coming in on TCP port 23 on the
TCP/IP side to */dev/ttS01.*

That which is listening on that port 23 will be the /telnetd/ daemon on
your GNU/Linux box. Now, again with my understanding of
things, /telnetd/ can be used as an unencrypted remote login to the
system, which will then spawn off a shell, and send whatever you type
in the client's telnet session to that shell on the remote host.

It should therefore be possible, to instead of having the telnetd daemon
forward its incoming text strings to a shell, send those text strings
into a named pipe, with */dev/ttyS01* - or whatever serial port it is -
at its other end.

Now, I don't have telnetd installed on this machine here so I can't view
the /man/ page to it, but as I understand it, it should be possible to
configure it to route its output to whatever you want, and thus also to
a pipe. You could then even use /tee/ to log the whole session.

The caveat however would be that you'd have to know in advance which TTY
device is assigned to the incoming telnet connection on the UNIX box
itself; possibly this could be one of the /devpts/ devices, but you'd
have to know which one. So you'd basically be piping - say -
*/dev/pts/1* (or something like that) to */dev/ttyS01,* and the
difficulty would be to reserve a pre-set pseudo-terminal slave device
exclusively for the incoming telnet session. Considering that device
special files these days are given their name by the /udev/ system,
you'd have to set up a persistent rule that always assigns the
same /devpts/ device number to the telnet session, regardless of how
many other pseudo-terminal slaves you have open on the same machine - a
couple of terminal windows in X for instance.

I know the above is not much to go on, and that it's all pretty
abstract, but it might get you in the proper direction of doing what
you intend to do, so I hope it was useful. ;-) It is either way an
interesting project. ;-)

--
*Aragorn*
(registered GNU/Linux user #223157)
 
Reply With Quote
 
Andy
Guest
Posts: n/a

 
      10-11-2009, 03:26 AM
Dan C wrote:

> I'm looking in to how I can redirect an incoming telnet connection to go
> out a serial port. What I'm trying to do is be able to telnet to a Slack
> box, have the connection go out the serial port, and go to another (DOS)
> box's serial port (via a null modem serial cable). That DOS box is
> running a BBS program (PCBoard) which I'd like to make reachable over the
> internet via telnet. As you may remember, DOS doesn't do TCP/IP, so
> that's why this approach is being tried... Any ideas? Thanks.
>
> Followups set to comp.os.linux.networking
>
>

I can think of a few solutions off the top of my head:
1. Run the DOS in a VM and link the serial port to a socket.
2. Get a hardware serial server.
3. I recall using TCP/IP in DOS way back when, but I don't remember who's
stack it was. Shouldn't be too hard to find. Hummingbird maybe?
4. Run the DOS app in DOS mode W95 or W98, which has TCP/IP available.

Andy

 
Reply With Quote
 
Aragorn
Guest
Posts: n/a

 
      10-11-2009, 03:36 AM
On Sunday 11 October 2009 05:26 in comp.os.linux.networking, somebody
identifying as Andy wrote...

> [...]
> 3. I recall using TCP/IP in DOS way back when, but I don't remember
> who's stack it was. Shouldn't be too hard to find. Hummingbird
> maybe?
> 4. Run the DOS app in DOS mode W95 or W98, which has TCP/IP available.


If I recall correctly, then FreeDOS - or at least the most recent
version of it - does support TCP/IP.

YYMV. ;-)

--
*Aragorn*
(registered GNU/Linux user #223157)
 
Reply With Quote
 
Dan C
Guest
Posts: n/a

 
      10-11-2009, 04:32 AM
On Sat, 10 Oct 2009 23:12:14 -0400, Old Man wrote:

> Dan C wrote:
>
>> I'm looking in to how I can redirect an incoming telnet connection to
>> go out a serial port. What I'm trying to do is be able to telnet to a
>> Slack box, have the connection go out the serial port, and go to
>> another (DOS) box's serial port (via a null modem serial cable). That
>> DOS box is running a BBS program (PCBoard) which I'd like to make
>> reachable over the internet via telnet. As you may remember, DOS
>> doesn't do TCP/IP, so that's why this approach is being tried... Any
>> ideas? Thanks.
>>
>> Followups set to comp.os.linux.networking
>>
>>
>>

> Telnet into box A. Run minicom on box A to communicate with box B.
> What am I missing?


You're missing the fact that I'd like this to be "unattended". The
incoming telnet connection needs to be automatically redirected out the
box's serial port, with no human interaction. I don't think minicom can
do that. Thanks, though.


--
"Ubuntu" -- an African word, meaning "Slackware is too hard for me".
"Bother!" said Pooh, as he garotted another passing Liberal.
Usenet Improvement Project: http://twovoyagers.com/improve-usenet.org/
 
Reply With Quote
 
Dan C
Guest
Posts: n/a

 
      10-11-2009, 04:33 AM
On Sun, 11 Oct 2009 05:21:35 +0200, Aragorn wrote:

> On Saturday 10 October 2009 23:20 in alt.os.linux, somebody identifying
> as Dan C wrote...
>
>> I'm looking in to how I can redirect an incoming telnet connection to
>> go out a serial port. What I'm trying to do is be able to telnet to a
>> Slack box, have the connection go out the serial port, and go to
>> another (DOS) box's serial port (via a null modem serial cable). That
>> DOS box is running a BBS program (PCBoard) which I'd like to make
>> reachable over the internet via telnet. As you may remember, DOS
>> doesn't do TCP/IP, so that's why this approach is being tried... Any
>> ideas? Thanks.
>>
>> Followups set to comp.os.linux.networking

>
> Hmm... I'm not exactly the expert here, but I'm just going to give you
> some of my logical thoughts on this. I will be going over this step by
> step and typing as the thoughts enter my mind, so bear with me. ;-)
>
> (1) Telnet is a way of sending clear text messages to a device, in this
> case a computer reachable via TCP/IP. The telnet server would -
> unless specified differently - be listening on port 23.
>
> (2) You have a DOS BBS machine that accepts telnet instructions over its
> serial port, and this machine is connected to the computer that
> receives the incoming telnet connection.
>
> (3) You want to forward the incoming telnet connection to the nullmodem
> connection of the BBS machine.
>
> Now, as I said, I'm not an expert on this, but I suppose the serial port
> with the nullmodem cable on the GNU/Linux box could be reached from
> within GNU/Linux as */dev/ttS01* (or whatever serial port it may be). So
> we need to forward whatever is coming in on TCP port 23 on the TCP/IP
> side to */dev/ttS01.*
>
> That which is listening on that port 23 will be the /telnetd/ daemon on
> your GNU/Linux box. Now, again with my understanding of things,
> /telnetd/ can be used as an unencrypted remote login to the system,
> which will then spawn off a shell, and send whatever you type in the
> client's telnet session to that shell on the remote host.
>
> It should therefore be possible, to instead of having the telnetd daemon
> forward its incoming text strings to a shell, send those text strings
> into a named pipe, with */dev/ttyS01* - or whatever serial port it is -
> at its other end.
>
> Now, I don't have telnetd installed on this machine here so I can't view
> the /man/ page to it, but as I understand it, it should be possible to
> configure it to route its output to whatever you want, and thus also to
> a pipe. You could then even use /tee/ to log the whole session.
>
> The caveat however would be that you'd have to know in advance which TTY
> device is assigned to the incoming telnet connection on the UNIX box
> itself; possibly this could be one of the /devpts/ devices, but you'd
> have to know which one. So you'd basically be piping - say -
> */dev/pts/1* (or something like that) to */dev/ttyS01,* and the
> difficulty would be to reserve a pre-set pseudo-terminal slave device
> exclusively for the incoming telnet session. Considering that device
> special files these days are given their name by the /udev/ system,
> you'd have to set up a persistent rule that always assigns the same
> /devpts/ device number to the telnet session, regardless of how many
> other pseudo-terminal slaves you have open on the same machine - a
> couple of terminal windows in X for instance.
>
> I know the above is not much to go on, and that it's all pretty
> abstract, but it might get you in the proper direction of doing what you
> intend to do, so I hope it was useful. ;-) It is either way an
> interesting project. ;-)


Yes, this is the direction I'm trying to go. Thanks for the input. I've
got a lot of reading/links to look at. Hopefully I'll report back with a
success story... Appreciate the reply.


--
"Ubuntu" -- an African word, meaning "Slackware is too hard for me".
"Bother!" said Pooh, as he garotted another passing Liberal.
Usenet Improvement Project: http://twovoyagers.com/improve-usenet.org/
 
Reply With Quote
 
Dan C
Guest
Posts: n/a

 
      10-11-2009, 04:38 AM
On Sat, 10 Oct 2009 22:26:23 -0500, Andy wrote:

> Dan C wrote:
>
>> I'm looking in to how I can redirect an incoming telnet connection to
>> go out a serial port. What I'm trying to do is be able to telnet to a
>> Slack box, have the connection go out the serial port, and go to
>> another (DOS) box's serial port (via a null modem serial cable). That
>> DOS box is running a BBS program (PCBoard) which I'd like to make
>> reachable over the internet via telnet. As you may remember, DOS
>> doesn't do TCP/IP, so that's why this approach is being tried... Any
>> ideas? Thanks.
>>
>> Followups set to comp.os.linux.networking
>>
>>

> I can think of a few solutions off the top of my head:
> 1. Run the DOS in a VM and link the serial port to a socket.


Some of the BBS utils and doors don't like the VM. Tried that and they
lock up unless running in "pure" DOS. Not sure why, but it's true.

> 2. Get a hardware serial server.


Not sure what that is. Does it get around the fact that DOS doesn't know
anything about TCP/IP?

> 3. I recall using TCP/IP in DOS way back when, but I don't remember
> who's stack it was. Shouldn't be too hard to find. Hummingbird maybe?


My initial searching shows that this may be possible. Trumpet was one
that made such a stack.

> 4. Run the DOS app in DOS mode W95 or W98, which has TCP/IP available.


Trying to avoid using any Windows, and have already found that some of
the utils/doors don't like that any more than a VM.

Thanks for the input.



--
"Ubuntu" -- an African word, meaning "Slackware is too hard for me".
"Bother!" said Pooh, as he garotted another passing Liberal.
Usenet Improvement Project: http://twovoyagers.com/improve-usenet.org/
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
no serial port and no parrallel port how do i console to a router sloan949@gmail.com Linux Networking 4 02-13-2007 07:02 PM
Serial Port Multiplexing (2 apps to 1 port) Onslo Linux Networking 0 10-06-2004 08:53 AM
Redirect port 80 to another port on another computer? Open Wound Wireless Internet 0 12-31-2003 03:07 AM
difference between port redirect and port forwarding Anil Kommareddy Linux Networking 1 10-31-2003 08:57 PM
telnet redirect Ajit Varahala Linux Networking 0 09-15-2003 09:00 PM



1 2 3 4 5 6 7 8 9 10 11