Solved

telnet question

Posted on 2006-06-14
12
267 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
  • 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

863 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now