Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to block a user? [duplicate]

Tags:

php

networking

ip

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?

like image 898
Sylnois Avatar asked Feb 27 '13 16:02

Sylnois


2 Answers

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
like image 106
rekire Avatar answered Nov 05 '22 09:11

rekire


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

like image 20
Serge Kuharev Avatar answered Nov 05 '22 10:11

Serge Kuharev