5

I want to create a php script which blocks a user and not a whole network(modem). I know i can get the IP from the modem, but how can my server differentiate the user behind the modem? Is there a possible solution?

Abdusalam Ben Haj
  • 5,343
  • 5
  • 31
  • 45
Sylnois
  • 1,589
  • 6
  • 23
  • 47
  • 2
    There is no way just to block one user. You could block the combination of user agent and ip, but the user could change the browser. A hacker could cange his user agent as well so far almost not possible. – rekire Feb 27 '13 at 16:05
  • Maybe you are looking for something like 'Mac Address', [Check this out](http://stackoverflow.com/questions/1420381/how-can-i-get-the-mac-and-the-ip-address-of-a-connected-client-in-php) – Silent Byte Feb 27 '13 at 16:05
  • 5
    @Silent Except that the MAC address is typically not usable, as the answer you link to states. – deceze Feb 27 '13 at 16:06
  • 1
    Permanent, per-user block *are* possible, but you have to know how to hide a body. – Sammitch Feb 27 '13 at 16:09

2 Answers2

5

There is no way just to block one user: You could block the combination of user agent and IP address, but the user could change the browser. A hacker could change his user agent as well so far almost not possible.

Things you could try (but they may fail):

  • Block the combination of User-Agent and IP
  • Set a block cookie
  • Set a block entry in the local storage
  • Create a fingerprint based e.g. on the installed plugins or fonts
rekire
  • 47,260
  • 30
  • 167
  • 264
1

When user is clever enough to know how to clean cookies, it's not possible to do what you want without blocking IP.

Serge Kuharev
  • 1,052
  • 6
  • 16