I am considering developing my first multi-player RTS game, and I will naturally use UDP sockets to receive / send data.
One thing I was trying to figure out was to protect these ports from being flooded with fake packets in a DoS attack. Typically, the firewall protects against floods, but I will need to allow packets on the ports that I use, and I will have to rely on my own software to reject the dummy packets. What is stopping people from sniffing my packets by watching any authentication or special structure that I use and spamming me with similar packets? The source addresses can be easily changed to make it impossible to detect and prohibit criminals. Are there generally accepted methods of protection against such attacks?
I know all about the differences between UDP and TCP and therefore, please do not include this in the lecture on this.
====================== EDIT ============================= ===============================================
I must add that I am also trying to decide how to protect the game from “hacking” and cheating by sending packages that I think come from my game. Sequencing / sync numbers or identifier can be easily faked. I could use encryption, but it bothers me how much this will slow down my server, and it will not provide protection against DoS.
I know that these are the main problems that every programmer who uses the UDP socket should face, but for the rest of my life I can’t find the appropriate documentation about the methods of their work!
Any direction will be appreciated!
source share