How do I close a port on a Mac? I was wondering if someone could tell me how to close a TCP/UDP port on a Mac completely.
I don't want to kill a process or anything behind it. I want the port to be closed off completely.
Thanks,
PN
If all you need is a firewall, that is well documented how to turn it on and make exceptions to the default rules.

https://support.apple.com/en-us/HT201642

In the advanced settings there is a “block all incoming connections” toggle for that specific simple configuration.