[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


get some info of client computer

Posted on 2006-05-16
Medium Priority
Last Modified: 2010-04-05
Im using TIdTCPServer in server application and TIdTCPClient in client application to communicate via internet.
when client connected to server, I can get client remote IP only.

Can I get local ip or computer name of client from server ?
Question by:lhquang
  • 3
  • 2
  • 2
LVL 17

Accepted Solution

TheRealLoki earned 1000 total points
ID: 16696326
The only info you can get from teh client connection is the ip and port
will give you the client's ip address
will give you te port it is using

But to get the computer name or it's local ip (in it's lan, instead of the router's ip) over the internet, the client will have to send it to you
IdTCPClient1.IOHandler.WriteLN('hi, my pc name is "bob" and my lan ip is "x.x.x.x"');

Author Comment

ID: 16696425
because someone can make new client and send command to my server, someone can send bad lan ip,bad computer name too.

my purpose : limit the connection ( from one computer to my server) to 1.

if that computer run more than one client, only one client can connect, my server will disconnect other client.

I cannot count base on internet IP address because if that computer belonged to LAN with many computers use one internet IP address.

LVL 28

Expert Comment

ID: 16697686
this is an old issue and is generally found in "clone-detection" schematics. the best solution for this at this point is to have another system that creates users and in that system you can implement as many restrictions as you want (or can, considering the limitations of the tehnology used). then, that user will be used by the client upon connecting. it is not 100% efficient, maybe not even 90%, but it's one of the best ways to stop clone connections considering that you can't control the making of the client software.
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.


Author Comment

ID: 16700530
I want to make out public chat without creating account, so there is no way to limit ? T_T
LVL 28

Expert Comment

ID: 16701106
not unless you explicitly ask in the chat protocol that the client must send out some identification that must be computed from some system information like:
- netcard MAC
- maybe other irrelevant stuff
you can verify at a rate of 80% that the received MAC is a valid network card MAC or a router MAC (there are, or at least were a few years back when I was searching for such stuff) public lists with manufacturer and their codes and product codes (you will have to decode the MAC for that))
- if the client doesn't send out a valid MAC you just close the connection. if it's a router mac then somebody is trying to trick you (remember, the client sends out the AMC of it's own network card ;) )
you might also ask for some info already found in the MAC address just to make sure that someone is not trying to trick you. but even so, the chanes are not higher than 98% in accuracy of clone detection.
LVL 17

Expert Comment

ID: 16704295
I agree, I don't think it's possible to do what you want.
You will have to rely on a "login" system, and/or a limit per user, rather than connection
that way, if someone gets a user login, they can still only logon once, no matter how many machines they have.
If however, you do want them to be able to log on with 2+ machines in their cyber cafe (for example) they would have to use a different login for each computer.

Author Comment

ID: 16705914
yes, some can make may accounts and login  many accounts.

I just want to limit connection in one computer.

and there is no way.

Featured Post

Technology Partners: 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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

873 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