2

How do I identify a remote computer with a unique ID.

IP address may not be unique enough on networks which share IP. MAC or other hardware information are not available or depend on OS, Architecture, configuration, etc.

Cookies are a possible solution. I could delete the cookies on my browser, to change the browser. Also I must read a lot of information (each client on each stored cookie). In my database does not exist any relation.

Which could be the solution?

5
  • will you be able to push some software to all machines connected to your network so that client will generate something and send it to the server or there should be no client setup and you want to sniff and uniquely identify all connected machines? I believe there is a way to get the MAC inside the same LAN, how does my router know at home the mac of my Android, PC and Apple box? Commented Nov 14, 2011 at 17:33
  • something like this can be of any help: [codeproject.com/KB/system/GetHardwareInformation.aspx] ? Commented Nov 14, 2011 at 17:34
  • Thanks. The client ask a solution. I am study many sources but i don´t find any solution Commented Nov 14, 2011 at 17:40
  • The MAC is a remote machine on internet. Commented Nov 14, 2011 at 17:41
  • Take a look at clearcode.cc/blog/device-fingerprinting Devise a fingerprint, then whenever a user identifies themselves - associate the fingerprint with them. Keep in mind more than one user can have the same fingerprint, but if you have 1K fingerprints and 100K users that's still 100-fold reduction in who they might be. Commented Nov 7, 2018 at 21:55

2 Answers 2

4

If you want a permanent identifier, the short answer is that you don't have one. The MAC address isn't available to you. It's available to the router, but by the time it gets to you, it's been stripped off (actually, each router between you and the client machine replaces the MAC address with its own).

You've got IP address (and if it's coming from a private, non-routable subnet or if the request is being proxied), all you've got is the single IP address representing the client subnet.

You can get the session id, though:

HttpContext.Current.Session.SessionID 

The problem with that is that it's a fairly transient value. You could alternatively set a persistent cookie with an expiration date far in the future.

The client system, of course, is free to toss the cookie (or not to accept it).

Sign up to request clarification or add additional context in comments.

Comments

0

Another way to skin the cat is to use the IPEndPoint, first send a request to a given connection. From here you will be handed back a return packet, you can use IPEndPoint.GetHashCode().Use that integer as your ID what is nice about it is its 4 bytes and not a complete string hash.

private void ReceiveUdp() { while (IsRunning) { var packet = RavelNet.CreatePacket(); _count = RnetSocket.ReceiveFrom(packet.Data.Array, ref packet.RemoteEp); //I am storing the endpoint in my packet but you can do YourIPEndPoint.GetHashCode(); will return an integer identifier packet.Data.Ptr = _count; packet.ReadHeader(); lock (_inProcess) _inProcess.Enqueue(packet); } } 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.