永久关闭Bash中的端口

I am trying to kill a process (in Centos) that is listening to a port that was set up with port forwarding. I have tried all the answers here: https://stackoverflow.com/questions/9346211/how-to-kill-a-process-on-a-port-on-ubuntu but a new process, with a new pid seems to be "resurrecting" the listening to the port. Every time I kill on pid, a new one takes its place. I also tried: sudo ufw deny $port_number but got an error as well

How can I permanently close port? (cross-posted from here: https://stackoverflow.com/questions/61687398/kill-processes-listening-to-a-port to this more appropriate forum)