Vytalyi
Vytalyi

Reputation: 1695

Detect Shared IP

I'm implementing feature which should ban users by IP. Is there any way to identify - is client uses Dedicated IP or Shared IP?

Questions let me know. Thanks.

EDITED:

Or maybe someone have experience how to handle this case?

Upvotes: 0

Views: 111

Answers (2)

Serge
Serge

Reputation: 6095

There is a possibility to reverse-lookup the DNS name from this IP and then do some heuristics on the name if it is auto-generated name like:

\d+[-.]\d+[-.]\d+[-.]\d+[-.](ppp|a?dsl)(\.[-a-z0-9]+)+

but this will give many false positives.

Upvotes: 1

Darin Dimitrov
Darin Dimitrov

Reputation: 1038770

Is there any way to identify - is client uses Dedicated IP or Shared IP?

No, there is no way. This information is not part of the TCP nor the HTTP protocol and thus never sent to the server. All you could get is the client IP that was used to send the request to your site.

Upvotes: 5

Related Questions