2
\$\begingroup\$

There's a common issue in multiplayer PC games like the older versions of Call of Duty where any connected player in a match can easily sniff the game packets and read the IP addresses of all the connected players. This is undesirable privacy-wise.

How can I reasonably protect players from malicious actors that may use their IP for nefarious purposes?

\$\endgroup\$
4
  • \$\begingroup\$ The host is always able to cheat. Your question is not very clear... \$\endgroup\$
    – Vaillancourt
    Commented May 5, 2016 at 1:13
  • \$\begingroup\$ Thats what I thought but then why in those call of duty matches did u not get some 9 year old dosing everyone like surely the IP's must be masked in some way or something but I literally can't see how \$\endgroup\$ Commented May 5, 2016 at 1:23
  • \$\begingroup\$ @MatthewHewitt The IPs are not masked. If the host didn't know the IP, how would the network know where to send packets? \$\endgroup\$ Commented May 5, 2016 at 1:30
  • \$\begingroup\$ Your client doesn't even get the packets sent to the other clients \$\endgroup\$
    – tkausl
    Commented May 5, 2016 at 1:33

3 Answers 3

2
\$\begingroup\$

In any direct peer-to-peer game where one player is the host of the game server, you won't be able to hide players' IPs from the host nor protect the host from the players.

However, if you design your game with all players directly connecting to your hosted game servers and only allow packets in your game to be passed between the authoritative server and the players' clients there is no way in theory that any players would be able to discover an other's IP (unless you leak information through your game's protocol in some way, like broadcasting it with player lists or doing voice chat through a peer-to-peer plugin).

\$\endgroup\$
1
\$\begingroup\$

As Matt Jens Jensen already pointed out, there is no way to always protect your players privacy without hosting the servers yourself.

However, to accommodate more privacy-conscious players you could develop and offer a proxy server application for your game (client connects to proxy, proxy connects to host on their behalf and forwards all network messages). They can then install it on a server they trust, or you can offer to host instances of that tool yourself (which would of course only make sense if your server requires lots of CPU power but not that much bandwidth). This will increase latency but protect the users privacy. It can also be useful as a reverse proxy for players who want to host a server when behind a NAT or who don't want to reveal the real IP for the server. Such a tool is available for Half Life 1, for example.

\$\endgroup\$
1
  • \$\begingroup\$ Despite the latency cost, helping with the pain in the Arsch issues that come with NAT would make it worth offering to your players. \$\endgroup\$
    – user5665
    Commented May 5, 2016 at 11:06
0
\$\begingroup\$

Anonymity in P2P systems is possible—it's just hard, and too slow for most action games.

For example, the Tor network is serverless, and enforces anonymity by delivering all messages via intermediary peers, so that the receiver can't tell who originally sent them.

Such systems are of course much slower than a direct connection, but remain feasible for slower-paced genres such as turn-based strategy games.

\$\endgroup\$
1
  • 2
    \$\begingroup\$ Tor is a really great technology, but it's a very risky thing for some of the players. It's important to notice that Tor anonymity can be broken by many actors quite easily and that using Tor in some countries can make you a target for state suspicion. It's not entirely a consumer technology in many places and can complicate the lives of players in certain countries across the world. \$\endgroup\$
    – user5665
    Commented May 12, 2016 at 17:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .