NetTalk Central

Author Topic: NetSimple responsding to Telnet  (Read 8350 times)

Paul Blais

  • Newbie
  • *
  • Posts: 8
    • View Profile
NetSimple responsding to Telnet
« on: August 18, 2011, 06:10:57 PM »
We are connecting to a service provider via NetSimple Server / client. We will submit requests and they will respond (not real time) via a NetSimple Server. They want to be able to do a test with Telnet. This is a VPN connection so it's secure and we can restrict access to the server. The question is How can we respond to a telnet connection using NetTalk? Ideally it's the only thing this NetTalk server thread would do.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11183
    • View Profile
Re: NetSimple responsding to Telnet
« Reply #1 on: August 19, 2011, 05:32:57 AM »
Hi Paul,

the term "telnet" is somewhat broad - in it's most basic form it's really just an open connection. ie you could make a Ternet Server simply by opening a listening port using NetSimple (in Server mode).

so the user types stuff into the "terminal" and um - well - what happens? That depends completely on you I guess. perhaps they type
HELLO
and you reply with
HELLO TO YOU
it's really completely up to you.

now some people think of telnet as a "command line shell to the operating system". You probably don't want to do that in this case though, because the security implications would be fairly dramatic.

But expand on your idea a bit and let's see where it goes.

cheers
Bruce



Paul Blais

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: NetSimple responsding to Telnet
« Reply #2 on: August 23, 2011, 07:12:47 PM »
This is a service provider connection to a client that connects to the NetTalk Server to send back replies that get made. They require a telnet test that replies "OK" We made it work but it was a tad convoluted.

The Server is a NetTalk NetSimple not using WholePacket (see shared knowledge post from today on BIg Endian length). What we do is detect the open connection and just send an OK, then go about the process of catching the packet data and waiting for the final byte. We have assumed that this connection to send is "stuff" will open the connection blast it at us and close the connection without waiting for a thank you very much. We have to send them a thank youi note with our own NetSimple client in a wrapper formatted "yes we got it" so they can bill us. We don't open the package we get just the wrapper.Based on that we send it back then proceed along our merry way with the package we want to process.

This Telnet requirement is over a VPN so the security is not that big an issue. I can only assume they like to do a telnet to make sure the connection is alive from time to time. Should the connection fail as they push us data I suppose some Network technician tries a telnet to "poke us with a stick". I think they also want ping too. If it wasn't as VPN it would be suspect but then again they do a whole lot of this stuff.

Fortunately using the Big Endian length header works and they always send data in a documented XML wrapper that contains a nationally standard package of data used in the pharmacy industry. Yes, the clients are drug dealers - the real ones.