Solved

telnet question

Posted on 2006-06-14
12
280 Views
Last Modified: 2010-04-05
Hi, is there a way to make a reverse telnet [i dont know if the name is correct] using delphi.... what i'm trying to do is establish a telnet connection but, instead of I connect with the server, the server connects to me and wait for the commands...
0
Comment
Question by:plinho
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
12 Comments
 
LVL 4

Expert Comment

by:LMuadDIb
ID: 16908308
so you want a telent server that once started, will "call home" via telnet to inform you its running, and then act like a telnet server?

0
 
LVL 17

Accepted Solution

by:
TheRealLoki earned 125 total points
ID: 16908407
That is not the nature of the telnet protocol.
you would have to use a telnet client at the "remote" end, and run a telnet server at your end.
Indy (which ships with with some Delphi versions) has a TIdTelnetServer and client
0
 
LVL 17

Expert Comment

by:TheRealLoki
ID: 16908585
I am guessing you are trying to get past a firewall that does not allow the telnet into the telnet server from outside the network.
You can bypass this only by having something on the server machine, or within its' network with access to the server.
1 ugly way I can think of, off the top of my head is using an intermediary program to relay the commands. The server will need to know what address to connect to, so if you want to talk to the server from many different places, you will need to let it know somehow. This is the tricky part. you could use 1 line in a webpage if it comes to it.. but I'll explain a method to do the actual communication, and you can ignore the rest if this is not suitable.

Nework A
======
Server A - the Telnet server

Relay Application "C" (running within Network A)

Application B (containing Server B) - running outside of Network A (where you are) this is what you want Server A to connect to.
---
Relay Application "C" - contains a telnet client for talking to Server, and another client (telnet or TCP) for talking to Application B (where you are)

Application B uses a Server (telnet or TCP). You start this when you want Server A to connect to you

The idea is that Relay Application "C" will periodically try to connect to the server on Application B (once it works out where you are)
If it can connect (ie you have started Project2, which has the server)
Relay Application "C" will then connect to the Server on network A, and relay what you type on Application B to Server A, and the responses back to Application B

like I said, it's ugly, but it does work
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Expert Comment

by:LMuadDIb
ID: 16908616
to be honest I was thinking it was gonna be used for something illegal...a backdoor

thats why I didnt give much info in my first response...  =)
0
 
LVL 17

Expert Comment

by:TheRealLoki
ID: 16908646
hmm, maybe. I see he has asked this before on 01/15/2006 and the question got deleted
maybe I should be more careful in the future :-)
still, it might be a fair question, I had to do a similar thing for my dsl at home until i got a router that supported NAT (tcp tho, not telnet)
0
 

Author Comment

by:plinho
ID: 16913088
I'm just studying delphi and now i'm interested in server-clients programs.... I never made a course so thats why I'm here... I'd like to know what is possible and what's not... there's no "hacker" objectives on it, by the way, I got "hacked" too many times to know that this kind of behavior is totally stupid...
PS: I have a "fixed ip" [dont know if it's the right name in english, my ip is always the same)
0
 

Author Comment

by:plinho
ID: 16979257
so...
0
 
LVL 17

Expert Comment

by:TheRealLoki
ID: 16980396
well.. my example above still holds true.. have you tried it out?
0
 

Author Comment

by:plinho
ID: 17014956
I just didn't understand this part "you could use 1 line in a webpage if it comes to it".... What do you mean?
0
 
LVL 17

Expert Comment

by:TheRealLoki
ID: 17015148
it doesn't matter, since you have a fixed IP. if you didn't though, you could have potentially uploaded it to 1 of the free webservers around the place, so you could "download" the ip as a webpage from elsewhere. But not needed for you.

Typically, a client connects to a server, and then sends commands to the server. There are some implementations of a client-server relationship where the client connects, and the server issues the commands, but it would have to be a specific case and designed that way
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

687 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question