How, exactly, you've discovered that you're being attacked? There are great tools to take measures like fail2ban. If you've discovered by logs that you're suffering DoS/DDoS/Brute-Force attacks, you can configure it to analyse your logs and create iptables rules to block the attacking hosts.
EDIT: You can also use the iptables "recent" module, like this:
iptables -t filter -I INPUT -p all --dport 25565 -i eth0 -m state --state NEW -m recent --set
iptables -t filter -I INPUT -p all --dport 25565 -i eth0 -m state --state NEW -m recent --update --seconds 60 --hitcount 5 -j DROP
That will allow just 5 hits in your 25565 port per minute. Of course, you'll have to adjust it to your needs, since I don't know how your application works in the network...
EDIT: Here's how you log connections with iptables to your MySQL service:
iptables -t filter -I INPUT -p all --dport 3306 -m state --state NEW -j LOG --log-prefix "MySQL connection: " --log-level info
Logs will be shown in your /var/log/syslog file. You can grep
it to filter just what matters to you like this:
tail -f /var/log/syslog | grep "MySQL connection"
Also, you can use this command to see how many connections a host is maintaining to your VPS:
netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n
Hope this helps!