Iptables rules
Here is an example of a firewall rules that can be used for a minecraft server, to block exploits...
How it works ?
Download the script, modify it to adapt it to your own ports and run it.
How can I reset the rules ?
Download and run the reset file in the repo.