Specific ports can be blocked by using the iptables,you can follow the given steps to do that.

discover where your GUI-firewall tool is keeping its “iptables” script. (This is a text file with a list of iptables command in it.)

As root, add these two line to that script,

iptables -A INPUT -p TCP –dport <PORT_NUMBER_TO_BE_BLOCKED> -j DROP
iptables -A INPUT -p UDP –dport <PORT_NUMBER_TO_BE_BLOCKED> -j DROP

Source that script (which means run it) syntax:
. <filename of the script>

For example, if the name of the script is /tmp/fun, you would say:
. /tmp/fun

As root, issue the command “iptables-save” .This command will write your iptables configuration to the file:”/etc/sysconfig/iptables”. This file is executed by your system at reboot time to restore your iptables configuration.

Save a copy of the iptables script you modified above just in case you ever need to add anything else to your firewall. You will, eventually, probably want to add or delete something from it.

Never,ever run the GUI-Firewall tool again. It will very likely destroy/overwrite the port blocks you just added.