Firewalls protect computers from network attacks by blocking or limiting access to open network ports. Application firewalls limit which applications are allowed to communicate over the network.
Check
Verify the macOS system is configured to enable the built-in firewall with the following command: