I have a server of a videogame hosting in a Google cloud VM using Ubuntu 16. Some people are using bots to stop the server by reaching the connection limit
I was thinking of limiting how many connections a public IP can start, hopefully that will fix the problem. I tried using
iptables -A INPUT -p udp -m connlimit --connlimit-above 5 --connlimit-mask 32 -j REJECT
but i dont know if its working, but its blocking connections to domains like api.steampowered.com
Steam authentication for (player) failed: Could not resolve host: api.steampowered.com - CURL error code 6 (Couldn't resolve host name)
And that works if I remove that IP table.
How can I block the connection limit (per public IP) to a specified port (30145) TCP & UDP to lets say 10?