Originally Posted by COFFEE BOY
How do you block ports
With a little more information about your problem, we would be able to give a more precise answer. Here is what I can say:
Some newer distro use a command-line tool named firewall-cmd.
Most distros have a tool names iptables.
Distros with a GUI often have a GUI tool for firewall configuration.