Check for open TCP ports using Network Utility on Mac
TCP/IP communications between your computer and other computers on the internet pass through numbered logical ports on each computer.
Knowing which ports are open on your computer can help you assess the security of your system or troubleshoot connection problems.
On your Mac, open the Network Utility app , located in the /System/Library/CoreServices/Applications folder.
Click Port Scan, enter your IP address, then click the Scan button.
To find your IP address, choose Apple menu > System Preferences, click Network, then select a network service, such as Ethernet or Wi-Fi.