Hi, how to prevent the same IP to enter more than 2 or 3 times to my game (web-based)?
Options
The thing is, if a player can enter "n" times repeatedly to a game(web-based), and get a nickname, he or she can take all CCU, and block the game.
0
Best Answers
-
Hi @Siggy2020,
Thank you for choosing Photon!
I will add the following to @jeanfabre's answer:
- you could make use of custom authentication by sending the IP to the authentication endpoint to verify if it's not already connected, you could prevent a user from authenticating based on this.
- you could make use of WebHooks + Actor Properties to know from your web server which IP address (actor) is joined to which room (but WebHooks can't help preventing a client from joining, you could only prevent from creating rooms).
So there are two things:
1- how to know the IP address of each user
2- how to know if an IP address is being used or not5 -
Thank you John, also very helpful. Luis0
Answers
-
Hi,
this is something you can do in various ways:
- each client could store their ip, and the master client could warn clients with similar IP that only one is allowed, or take more abrupt actions and remove redundant users from the room.
- we have plugins on enterprise level plans where you can act on connections and all actions right within the server and thus catching early this kind of behavior and prevent connections and provide better matchmaking. https://www.photonengine.com/en/PUN/pricing
Bye,
Jean
0 -
Thank you Jean. I'll check on that. Keep well and safe. Luis
0 -
Hi @Siggy2020,
Thank you for choosing Photon!
I will add the following to @jeanfabre's answer:
- you could make use of custom authentication by sending the IP to the authentication endpoint to verify if it's not already connected, you could prevent a user from authenticating based on this.
- you could make use of WebHooks + Actor Properties to know from your web server which IP address (actor) is joined to which room (but WebHooks can't help preventing a client from joining, you could only prevent from creating rooms).
So there are two things:
1- how to know the IP address of each user
2- how to know if an IP address is being used or not5 -
Thank you John, also very helpful. Luis0